Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /session_based_access_control /als-apg_osprey.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The session cookie is sent by an operator's browser, which is outside the repo. The clone has no frontend JS/HTML for the interfaces. mint_and_announce (src/osprey/interfaces/web_auth.py:1004) only prints the login URL that carries the operator secret, which belongs to the Registrar/exchange step and does not send the session id." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "present", | |
| "symbol": "_authenticate_session", | |
| "file": "src/osprey/interfaces/common_middleware.py", | |
| "lines": "1231", | |
| "notes": "WebAuthMiddleware.__call__ reads the session cookie and dispatches to _authenticate_session (common_middleware.py:1219). The middleware is registered as the outermost middleware on every interface app (src/osprey/interfaces/_app_setup.py:129). _authenticate_session calls verify_session for each cookie candidate (line 1249), returns 401 on failure and otherwise passes the request on (line 1255)." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "verify_session", | |
| "file": "src/osprey/interfaces/web_auth.py", | |
| "lines": "606", | |
| "notes": "Called from _authenticate_session (common_middleware.py:1249). WebCredentials.verify_session sha256-digests the opaque cookie id, purges expired entries and looks the digest up in the server-side sessions map (line 654), then does a compare_digest against a decoy. It returns only a bool, with no principal, because every session is the single operator." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "present", | |
| "symbol": "sessions", | |
| "file": "src/osprey/interfaces/web_auth.py", | |
| "lines": "470", | |
| "notes": "Reached from verify_session (web_auth.py:654), which does the lookup inline. No dedicated get method exists, so the field is cited. WebCredentials.sessions is an in-memory dict {sha256(session id): deadline}. create_session (line 531) fills it with secrets.token_urlsafe ids via mint_secret, and SessionStore optionally persists it to JSON. revoke_session handles logout." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "After _authenticate_session (common_middleware.py:1255) the request goes straight to the app: a valid session grants full operator access, so there is no per-action authorisation. classify/Tier (web_auth.py:1159) gates only the static panel bearer token, which is a different credential. The auth sidecar's card-access check (services/auth_sidecar/routes/verify.py:228) sits on a separate flow based on an itsdangerous-signed cookie and is not on this path." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "There is no authorisation decision on the session-cookie path. The only decision-like units are classify (web_auth.py:1159, panel-token tier only) and settings.access in the auth sidecar's signed-cookie verify route (routes/verify.py:228), and both are off this path." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No privileges are fetched for a session principal. The X-Osprey-Auth-Role header (common_middleware.py:351) is used only for auditing in the interfaces. Role and persona privileges are resolved at deploy time (deployment/web_terminals), not per request on this path." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "chat", | |
| "file": "src/osprey/interfaces/web_terminal/routes/chat.py", | |
| "lines": "251", | |
| "notes": "The handler POST /api/chat is reached after _authenticate_session passes the request on (common_middleware.py:1255). The router is included in the web terminal app (web_terminal/app.py:2621), and that app installs WebAuthMiddleware through configure_interface_app (app.py:2717). Any route on that app is guarded the same way; chat is one representative handler." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 4.22 kB
- Xet hash:
- 68fe5141722e3d4d30ddad9ac4b4b91117d82285937e07b43bde7fc69d7607e0
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.