Buckets:

download
raw
3.96 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client sends the sid session cookie; callers are browsers/clients outside the repo. The CLI (src/OSSS/cli.py:185 client) sends a Keycloak Bearer JWT, not the opaque session id, so it is not the Subject of this session flow."
},
{
"role": "Authentication enforcer",
"status": "present",
"symbol": "me",
"file": "src/OSSS/api/routers/me.py",
"lines": "54",
"notes": "GET /me handler (router mounted at src/OSSS/main.py:762) depends on get_current_user (me.py:54) and refuses with 401 when it returns None (me.py:90-95). It is the only wired route that both resolves the server-side sid session and blocks on failure; get_current_user itself returns None instead of raising, and require_user/require_auth (auth/deps.py:341/348) are not wired to any mounted route."
},
{
"role": "Verifier",
"status": "present",
"symbol": "get_current_user",
"file": "src/OSSS/auth/deps.py",
"lines": "243",
"notes": "Reached from me (me.py:54 Depends(get_current_user)). After an optional Bearer attempt, it reads the 'sid' cookie (deps.py:261), loads the session from Redis via store.get(sid) (deps.py:265) and returns the principal claims from the stored access_token (deps.py:266-273) or None. Caveat: the stored Keycloak access token is additionally JWT-verified via _decode_jwt/verify_with_auto_refresh (deps.py:192)."
},
{
"role": "Session manager",
"status": "present",
"symbol": "get",
"file": "src/OSSS/sessions.py",
"lines": "93",
"notes": "Called by get_current_user at src/OSSS/auth/deps.py:265 (store.get(sid)); RedisSession.get fetches the JSON session blob at key 'sess:<sid>' from Redis. Store is attached in main.py:739 (attach_session_store); sessions are created by ensure_sid_cookie_and_store (sessions.py:250, secrets.token_urlsafe) and filled with tokens by record_tokens_to_session (sessions.py:168) from /auth/token (api/routers/auth_flow.py:255-259)."
},
{
"role": "Authorisation enforcer",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No wired authorisation check after get_current_user. require_roles._dep (src/OSSS/auth/deps.py:300) exists and is applied by factory._deps_for (api/generated_resources/factory.py:455), but register_all.py:144-149 hard-codes require_auth=False and roles_map=None (role-enabled call commented out at register_all.py:136-142). admin_additional_index_router.py:17 imports a non-existent require_admin, so its guard falls back to allow-all; /me performs no role check."
},
{
"role": "Decider",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The role decision logic is inline in require_roles._dep (src/OSSS/auth/deps.py:307-311, any_of/all_of checks raising 403), but it is never reached on a wired route (see Authorisation enforcer)."
},
{
"role": "Policy provider",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The intended per-table policy _roles_for_table (src/OSSS/api/generated_resources/register_all.py:109, read:/manage:<table> roles) is only referenced in commented-out code; principal roles come from Keycloak claims via _extract_roles (auth/deps.py:229). Not on any wired path."
},
{
"role": "System",
"status": "present",
"symbol": "me",
"file": "src/OSSS/api/routers/me.py",
"lines": "54",
"notes": "After get_current_user returns a principal, the success branch of the same me handler (me.py:97-105) returns the authenticated user's claims/roles. The handler is both the enforcing guard and the business action; no authorisation step is in between."
}
]
}

Xet Storage Details

Size:
3.96 kB
·
Xet hash:
35db53fd48fb176a5f229afe40cb36c059c869581ef1e0a786a2f46ea3e5586d

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