Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /session_based_access_control /lnbits_lnbits.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The caller is outside the repo; no in-repo client (lnbits/static is absent from this checkout) was found sending a session id to the traced path. Credential sent by the LNbits UI is a JWT cookie (cookie_access_token), not an opaque session id." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No server-side session flow: authentication is a stateless HS256 JWT (cookie/bearer) read by check_access_token (lnbits/decorators.py:228) and enforced by _check_account_exists (lnbits/decorators.py:286), i.e. the verifiable-token pattern. The only opaque-id alternative, the ?usr=<user id> path (decorators.py:304), is a permanent account id gated by AuthMethods.user_id_only, which is off by default (settings.py:940) and is a static identifier, not a session." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Token verification is _decode_access_token (lnbits/decorators.py:513) doing jwt.decode with settings.auth_secret_key, a signature-only JWT check; no lookup of an open session. The auth cache in check_account_id_exists (decorators.py:236) only caches decoded results, it is not a session store." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No server-side session store: login (_auth_success_response, lnbits/core/views/auth_api.py:664) issues a JWT via create_access_token (lnbits/helpers.py:194) and logout (auth_api.py:431) only deletes cookies, nothing is revoked server-side." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "present", | |
| "symbol": "check_admin", | |
| "file": "lnbits/decorators.py", | |
| "lines": "390", | |
| "notes": "FastAPI dependency check_admin receives the principal from Depends(check_account_exists) (decorators.py:278 -> _check_account_exists:286) and raises 403 unless the account is admin/super user with credentials; installed on admin routes, e.g. Depends(check_admin) in api_get_settings (lnbits/core/views/admin_api.py:69). Authentication on this path is JWT, not session." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "present", | |
| "symbol": "check_admin", | |
| "file": "lnbits/decorators.py", | |
| "lines": "390", | |
| "notes": "The admin decision is inline in check_admin (decorators.py:390): account.id compared against settings.super_user and settings.lnbits_admin_users, plus has_password; same method as the Authorisation enforcer (rule 2). check_super_user (decorators.py:408) narrows further; per-extension/ACL decisions exist in check_user_extension_access and _check_account_api_access (decorators.py:549) on other paths." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "present", | |
| "symbol": "lnbits_admin_users", | |
| "file": "lnbits/settings.py", | |
| "lines": "45", | |
| "notes": "check_admin (decorators.py:390) reads settings.lnbits_admin_users (and super_user), the admin-user list field of UsersSettings, editable via admin settings persisted in the DB (lnbits/core/crud/settings.py). Cited as a field since check_admin reads it directly with no retrieving method." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "api_get_settings", | |
| "file": "lnbits/core/views/admin_api.py", | |
| "lines": "69", | |
| "notes": "Admin settings handler on admin_router (included at lnbits/core/__init__.py:34), executed only after Depends(check_admin) (decorators.py:390) passes; returns admin settings. Mapped because the authorisation half of the pattern is present, although authentication is JWT-based." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.92 kB
- Xet hash:
- 12c3811c9088ea679ee6b2441ce1bd606b0bf86c497b28e3effc4de9ce46642f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.