Buckets:

download
raw
3.66 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client sends the bearer token to the backend: the repo contains only backend/, main.py, scripts and tests (no frontend/SDK). The caller of /api/admin/** is outside the repo."
},
{
"role": "Authentication enforcer",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "Credential is a stateless self-contained JWT, not an opaque session id: get_current_db_user_from_token (backend/session.py:80, OAuth2PasswordBearer at backend/security.py:35) validates it via jose jwt.decode in decode_main_access_token (backend/security.py:712/715). That is the verifiable-token pattern, so the session-side enforcer is missing."
},
{
"role": "Verifier",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No lookup of a session id against open sessions; the JWT is verified by signature in decode_main_access_token (backend/security.py:712) and the user row is then loaded by username (backend/session.py:117) with a password_changed_at check. Stateless JWT verifier, not a session verifier."
},
{
"role": "Session manager",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No store of open sessions/tokens. _token_user_cache (backend/session.py:53) is only a 10-second performance cache of already-verified JWTs and user_sessions (backend/session.py:50) holds per-user LLM client state, not authentication sessions; tokens are issued by create_access_token (backend/security.py:315) and never persisted."
},
{
"role": "Authorisation enforcer",
"status": "present",
"symbol": "get_current_admin_user",
"file": "backend/session.py",
"lines": "402",
"notes": "Reached after authentication via Depends(get_current_active_user); installed as router-level dependency on admin_router (backend/routers/admin/__init__.py:24) and on trigger_rss_feed_scraping (backend/routers/admin/rss_management.py:19). Raises 403 'Administrator privileges required' when the check fails; the decision is inline, so it is also the Decider."
},
{
"role": "Decider",
"status": "present",
"symbol": "get_current_admin_user",
"file": "backend/session.py",
"lines": "402",
"notes": "Same method as the Authorisation enforcer: the decision `if not current_user.is_admin` (backend/session.py:403) is inline, no smaller helper exists. The is_admin flag is copied from the DB user in get_current_active_user (backend/session.py:295)."
},
{
"role": "Policy provider",
"status": "present",
"symbol": "is_admin",
"file": "backend/db/models/user.py",
"lines": "27",
"notes": "The privilege consulted by the Decider (backend/session.py:403) is the is_admin column of the User DB model, loaded by get_current_db_user_from_token (backend/session.py:117) and mapped into UserAuthDetails at backend/session.py:295. No method retrieves privileges, so the column is cited."
},
{
"role": "System",
"status": "present",
"symbol": "trigger_rss_feed_scraping",
"file": "backend/routers/admin/rss_management.py",
"lines": "19",
"notes": "Admin action executed only after get_current_admin_user passes (Depends at the same line, plus admin_router dependency at backend/routers/admin/__init__.py:24); submits the RSS scraping task. Representative of all /api/admin/** handlers."
}
]
}

Xet Storage Details

Size:
3.66 kB
·
Xet hash:
1a6a7f21b25967cba6f9649ef0d599676fea12714541c4f94edddeea4f60a874

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