Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /session_based_access_control /allen0099_FastAPI-CacheX.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Library repo; the client sending the X-Session-Token / Bearer / cookie token is outside the repo. Only tests exercise it." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "present", | |
| "symbol": "__call__", | |
| "file": "fastapi_cachex/session/middleware.py", | |
| "lines": "295", | |
| "notes": "__call__ of FastAPICacheXSessionMiddleware (exported in session/__init__.py) intercepts every HTTP/websocket request, extracts the session token from header/bearer/cookie (middleware.py:322-323) and calls SessionManager.get_session at middleware.py:328, storing the resolved session in request state. The middleware itself does not reject; the 401 refusal is done by the get_session dependency (dependencies.py:47) reading that state. Deprecated SessionMiddleware.dispatch (middleware.py:165) is the older equivalent." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "get_session", | |
| "file": "fastapi_cachex/session/manager.py", | |
| "lines": "168", | |
| "notes": "SessionManager.get_session, called by the enforcer at middleware.py:328, parses the token, checks the HMAC signature in default 'simple' format (SecurityManager.verify_signature, manager.py:200), loads the session from the backend (manager.py:211) and rejects missing, inactive, expired, IP/UA-mismatched sessions by raising SessionError subclasses; returns the Session (principal) otherwise." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "present", | |
| "symbol": "_load_session_by_key", | |
| "file": "fastapi_cachex/session/manager.py", | |
| "lines": "469", | |
| "notes": "Reached from Verifier get_session via _load_session (manager.py:211 -> 458 -> 467); _load_session_by_key fetches the serialized Session from the configured server-side cache backend (memory/redis/memcached) with backend.get and deserializes it. Sessions are persisted by _save_session (manager.py:435)." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo authorisation check on the session principal; searched session/, dependencies.py, routes.py for role/permission checks. SessionUser carries roles/permissions fields (models.py:34-35) but nothing in the repo evaluates them." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No decision logic over SessionUser.roles/permissions exists in the library (models.py:34-35 only define the data)." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No authorisation policy store; roles/permissions are only data fields on SessionUser (models.py:34-35) that applications may populate." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Library repo (fastapi_cachex): it provides the middleware and get_session dependency (dependencies.py:32) but has no protected business handler of its own; only tests wire routes." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.34 kB
- Xet hash:
- c8ab67989e59d39e0c2a8ae8fddcebdb55182a9593bfc061dbdac7c6d8339508
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.