Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /session_based_access_control /Saturn99X_Etherion.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends a session id; the etherion/ CLI and tui-pkg contain no GraphQL/bearer client for executeGoal. Callers of /graphql are outside the repo and send a JWT, not an opaque session id." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The wired authentication is a stateless JWT check: graphql_auth_middleware (src/etherion_ai/middleware/auth_context.py:59, registered at src/etherion_ai/app.py:272) calls resolve_current_user_from_headers (auth_context.py:15) -> decode_access_token (src/auth/jwt.py:50, jwt.decode signature check) plus a Redis blacklist, which is the verifiable-token pattern. AuthMiddleware.dispatch (src/auth/middleware.py:45) would consult SessionManager but is never registered and _extract_session_id_from_token (middleware.py:168) always returns None." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No opaque session id is ever resolved on the request path; the JWT verifier is decode_access_token at src/auth/jwt.py:50. The unwired AuthMiddleware._validate_token (src/auth/middleware.py:113) also decodes a JWT and its session lookup is dead code." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "SessionManager.get_session (src/auth/session_manager.py:118) is a Redis-backed session store, but it is off the traced path: create_session (session_manager.py:55) is never called and its only caller is the unregistered AuthMiddleware (src/auth/middleware.py:150), where session_id is always None." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "present", | |
| "symbol": "executeGoal", | |
| "file": "src/etherion_ai/graphql_schema/mutations.py", | |
| "lines": "869", | |
| "notes": "Reached after graphql_auth_middleware (auth_context.py:59) puts current_user into request.state.auth_context; the executeGoal resolver builds an authorisation context (mutations.py:890) and refuses with 'Insufficient permissions' if has_permission(Permission.EXECUTE_GOAL) fails (mutations.py:895). The same inline pattern guards createProject (mutations.py:1996) and agent creation (mutations.py:2663)." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "present", | |
| "symbol": "has_permission", | |
| "file": "src/middleware/authorization.py", | |
| "lines": "97", | |
| "notes": "Called by executeGoal at src/etherion_ai/graphql_schema/mutations.py:895; AuthorizationContext.has_permission checks whether the requested Permission is in the role's permission set." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "present", | |
| "symbol": "get_authorization_context_for_user", | |
| "file": "src/middleware/authorization.py", | |
| "lines": "148", | |
| "notes": "Called by executeGoal at mutations.py:890; loads the user/tenant from the DB and builds an AuthorizationContext whose permissions come from the hard-coded ROLE_PERMISSIONS map (authorization.py:52). Caveat: the role is always hard-coded to Role.USER (authorization.py:183)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "execute_goal_celery_task", | |
| "file": "src/services/goal_orchestrator.py", | |
| "lines": "747", | |
| "notes": "Dispatched by executeGoal via execute_goal_celery_task.apply_async (src/etherion_ai/graphql_schema/mutations.py:1140) only after the permission check passes; runs the goal orchestration. Mapped because the authorisation half of the pattern is present, although authentication on this path is by JWT." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.87 kB
- Xet hash:
- 0b447e4d205966f870fbee5ba85cc519e3de7d99d5a1c61fd250f034cd41cc92
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.