Buckets:

download
raw
3.11 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The admin UI JS that posts access_token to /admin/info (greatapi/admin/templates/dashboard/account.html:134, settings.html:87 in git HEAD) is tracked in git but absent from the cloned working tree (only __init__.py under greatapi/admin/templates), so it cannot be cited; no other in-repo client exists."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "fetch_admin_info",
"file": "greatapi/admin/sites.py",
"lines": "253",
"notes": "POST /admin/info handler in AdminSite (route at admin/sites.py:252, wired via _cbv(admin_router, AdminSite, ...) and app.include_router(admin_router) in greatapi/conf/project_template/main.py-tpl:31,34). It reads the access_token form field and itself refuses with 401 (expired/invalid) or 403 (not admin); there is no separate helper, so it is also the Verifier. Lookalike: get_current_user (core/auth/jwt_token.py:32) guarding the demo route in core/test_auth/sites.py:24 was not used."
},
{
"role": "Verifier",
"status": "present",
"symbol": "fetch_admin_info",
"file": "greatapi/admin/sites.py",
"lines": "253",
"notes": "Same method as the Enforcer (inline check, no smaller helper): jwt.decode at admin/sites.py:255 verifies the HS256 MAC and expiry, extracts 'sub' as the principal email, and maps ExpiredSignatureError/JWTError to 401. Sibling handlers check_admin:237, change_password:277, delete_user:314, change_value:347 repeat the same inline check; get_current_user (jwt_token.py:32) is the test_auth lookalike."
},
{
"role": "Key manager",
"status": "present",
"symbol": "SECRET_KEY",
"file": "greatapi/core/auth/jwt_token.py",
"lines": "16",
"notes": "Used by the Verifier's jwt.decode(access_token, SECRET_KEY, algorithms=[ALGORITHM]) at greatapi/admin/sites.py:255, imported at admin/sites.py:24. No key-retrieving method exists; it is a hard-coded HS256 secret constant, also used for signing in create_access_token (jwt_token.py:25)."
},
{
"role": "Cryptographer",
"status": "external",
"symbol": "decode",
"file": "greatapi/admin/sites.py",
"lines": "255",
"notes": "Called inline by the Verifier fetch_admin_info at admin/sites.py:255; python-jose's jwt.decode (imported at admin/sites.py:16) checks the HS256 MAC and exp claim. Token generation uses jose jwt.encode at core/auth/jwt_token.py:25."
},
{
"role": "System",
"status": "present",
"symbol": "fetch_admin_info",
"file": "greatapi/admin/sites.py",
"lines": "253",
"notes": "The guarded business action is in the same handler: after the inline check passes it confirms the admin role via is_user_admin (admin/sites.py:230) and returns the user record via get_user_by_email (greatapi/utils/component.py:84). The test_auth route get_user (core/test_auth/sites.py:24) is a demo lookalike and was not used."
}
]
}

Xet Storage Details

Size:
3.11 kB
·
Xet hash:
25e138a5054b08a39fc4a086d6cbda248f41cd4e52a5556b7b052756a48b090d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.