Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /verifiable_token_based_authentication /ddeutils_ddeutil-observe.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends the Bearer access token to the API; callers of /api/v1/auth/token/me/ are external (only tests and the server-side HTMX views exist). Searched templates/static and src for Authorization/Bearer usage." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "get_current_user", | |
| "file": "src/ddeutil/observe/auth/deps.py", | |
| "lines": "39", | |
| "notes": "FastAPI dependency get_current_user (reached via Security(get_current_user) in get_current_active_user, auth/deps.py:76, wired to read_token_me at auth/routes.py:111) takes the token extracted by OAuth2PasswordBearerOrCookie.__call__ (auth/securities.py:31) through get_current_access_token, calls verify_access_token (deps.py:55) and raises 401 on failure or missing scopes. Alternative wired flow: required_current_user (deps.py:195) verifying the refresh-token cookie for HTML views." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "verify_access_token", | |
| "file": "src/ddeutil/observe/auth/crud.py", | |
| "lines": "187", | |
| "notes": "Called by Enforcer get_current_user at auth/deps.py:55. Checks the token is not disabled in the Token table (logout), decodes it via decode_access_token (crud.py:196), extracts sub/scopes into TokenDataSchema, and returns None on jwt.InvalidTokenError (incl. expiry)." | |
| }, | |
| { | |
| "role": "Key manager", | |
| "status": "present", | |
| "symbol": "secret_key", | |
| "file": "src/ddeutil/observe/conf.py", | |
| "lines": "81", | |
| "notes": "Reached from decode_access_token (auth/securities.py:137) which passes config.secret_key to jwt.decode. The secret_key property of the config class returns env CORE_ACCESS_SECRET_KEY with a hard-coded default ACCESS_DEFAULT (HMAC shared secret)." | |
| }, | |
| { | |
| "role": "Cryptographer", | |
| "status": "external", | |
| "symbol": "decode", | |
| "file": "src/ddeutil/observe/auth/securities.py", | |
| "lines": "137", | |
| "notes": "Verifier verify_access_token (crud.py:196) calls wrapper decode_access_token (securities.py:136), which calls PyJWT jwt.decode(token, config.secret_key, algorithms=['HS256']) verifying the HMAC-SHA256 signature and exp claim. Tokens are issued with jwt.encode in create_access_token (securities.py:106)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "read_token_me", | |
| "file": "src/ddeutil/observe/auth/routes.py", | |
| "lines": "110", | |
| "notes": "Route GET /api/v1/auth/token/me/ protected by Depends(get_current_active_user) (routes.py:111) which chains to Enforcer get_current_user; returns the authenticated user principal. Other protected handlers: read_user_by_username/read_user_all via get_current_super_user." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 2.91 kB
- Xet hash:
- a5ca6040fa27d8de2f0abf231f98895dbc9ccd3e1ba85709e34a01e9a4479f9e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.