Buckets:

download
raw
4.24 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No client file exists in the analysed working tree (non-Python files were stripped). git HEAD does contain an in-repo web UI client: zix/default_project/app/static/assets/js/admin.js:64 _fetchUsers calls GET /admin/users via get(), whose getDefaultHeaders (assets/min_js/xhr.min.js:1) sends 'Authorization: Bearer <token>'; it could not be cited because the file is absent from REPO_DIR."
},
{
"role": "Authentication enforcer",
"status": "present",
"symbol": "get_current_user",
"file": "zix/default_project/app/plugins/users/crud.py",
"lines": "24",
"notes": "FastAPI dependency reached from read_users via Depends(get_current_active_admin_user) (admin/routers.py:45 -> users/crud.py:77). In the default mode (USE_AUTH0=false, config/common.py:12) it takes the bearer via OAuth2PasswordBearer (users/crud.py:21), calls auth_crud.get_user_from_token at users/crud.py:61 and raises 401 if None. Alternative Auth0 mode uses AuthenticationMiddleware + OpenIDAuthBackend (zix/server/main.py:59, zix/server/auth0.py:162), off by default."
},
{
"role": "Verifier",
"status": "present",
"symbol": "get_user_from_token",
"file": "zix/default_project/app/plugins/auth/crud.py",
"lines": "101",
"notes": "Called by get_current_user (users/crud.py:61). Resolves the bearer against the DB Token table via get_token (auth/crud.py:103), returns None if no stored token, then jose jwt.decode (HS256, SECRET_KEY) and expiry check against the stored expiration, and loads the user by uid. Caveat: the module never imports 'time' or 'JWTError', so line 112/115 raise NameError at runtime for a found token; the token is a JWT but it only counts because it must exist in the server-side store (logout deletes it)."
},
{
"role": "Session manager",
"status": "present",
"symbol": "get_token",
"file": "zix/default_project/app/plugins/auth/crud.py",
"lines": "62",
"notes": "Called by get_user_from_token at auth/crud.py:103. Queries models.Token (auth/models.py, table 'token' with access_token, expiration, user FK) for the presented access_token; sessions are created by create_access_token (auth/crud.py:22) on SSO login and removed by delete_token on logout (auth/routers.py:306)."
},
{
"role": "Authorisation enforcer",
"status": "present",
"symbol": "get_current_active_admin_user",
"file": "zix/default_project/app/plugins/users/crud.py",
"lines": "76",
"notes": "Dependency of read_users (admin/routers.py:45); receives the principal from get_current_user (users/crud.py:77) and raises 403 'Not allowed' unless the user is active and staff (line 80-81). The check is inline, so it is also the Decider."
},
{
"role": "Decider",
"status": "present",
"symbol": "get_current_active_admin_user",
"file": "zix/default_project/app/plugins/users/crud.py",
"lines": "76",
"notes": "Same method as the Authorisation enforcer: the decision 'not current_user.is_active or not current_user.is_staff' is inline at users/crud.py:80 with no separate helper. Account-level checks (validate_user_account_access, users/crud.py:161) exist but are not on this path."
},
{
"role": "Policy provider",
"status": "present",
"symbol": "is_staff",
"file": "zix/default_project/app/plugins/users/models.py",
"lines": "65",
"notes": "Read by the Decider at users/crud.py:80. The User.is_staff DB column holds the admin privilege; no getter method exists, so the column is cited. It is set in create_user_and_account (users/crud.py:205) when the email equals config.ADMIN_EMAIL."
},
{
"role": "System",
"status": "present",
"symbol": "read_users",
"file": "zix/default_project/app/plugins/admin/routers.py",
"lines": "41",
"notes": "GET {API_PATH}/admin/users handler, runs only after get_current_active_admin_user (admin/routers.py:45) passes; returns the user list or a user looked up by base64 email."
}
]
}

Xet Storage Details

Size:
4.24 kB
·
Xet hash:
c3f44f0de31801a1a7aafa423068beaa8734f251756b974b1bc25945dd7e93eb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.