Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /verifiable_token_based_authentication /inteliver_inteliver.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends the Bearer token; callers are external (SDKs in docs/libraries are documentation only). Only tests/ send Authorization headers, which do not count; src/inteliver/cli contains admin DB/minio commands, not an HTTP client." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "get_current_user", | |
| "file": "src/inteliver/auth/service.py", | |
| "lines": "365", | |
| "notes": "FastAPI dependency in AuthService that extracts the Bearer token via OAuth2PasswordBearer (service.py:45) and calls decode_access_token (service.py:366), raising 401 on failure. Wired via Depends(AuthService.get_current_user) on storage routes (storage/router.py:24,43,62) and via has_role.role_checker on users routes." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "decode_access_token", | |
| "file": "src/inteliver/auth/service.py", | |
| "lines": "332", | |
| "notes": "Called by Enforcer get_current_user at service.py:366. Verifies the JWT with jwt.decode (signature + exp), maps ExpiredSignatureError/PyJWTError to 401 exceptions and returns TokenData (sub, role, username) as the principal." | |
| }, | |
| { | |
| "role": "Key manager", | |
| "status": "present", | |
| "symbol": "SECRET_KEY", | |
| "file": "src/inteliver/auth/constants.py", | |
| "lines": "3", | |
| "notes": "Verifier decode_access_token passes SECRET_KEY to jwt.decode at service.py:346; no retrieval method exists, the HMAC key is a module constant loaded from settings.jwt_secret_key (config/config.py:55, insecure default 'your-secret-key')." | |
| }, | |
| { | |
| "role": "Cryptographer", | |
| "status": "external", | |
| "symbol": "decode", | |
| "file": "src/inteliver/auth/service.py", | |
| "lines": "346", | |
| "notes": "Verifier decode_access_token calls PyJWT jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM]) at service.py:346 (import at service.py:5), which verifies the HS256 HMAC signature and expiry. Issuing uses jwt.encode in create_access_token (service.py:305)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "upload_image", | |
| "file": "src/inteliver/storage/router.py", | |
| "lines": "21", | |
| "notes": "Protected handler reached after Enforcer get_current_user (Depends at storage/router.py:24); uses the principal current_user.sub to call StorageService.upload_image (router.py:38). Router mounted at routers/__init__.py:21; other storage handlers (list_objects, retrieve_image) are protected the same way." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 2.69 kB
- Xet hash:
- 3976a1a1eda0f545bc4f604a6594f7ead15926ee8cdd16b6423834bfce2b21a0
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.