Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /session_based_access_control /li-boxuan_OpenDevin.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The caller of the /webhooks endpoints is the V1 agent server running inside the sandbox (external openhands software-agent-sdk), which sends X-Session-API-Key; no in-repo client targets valid_sandbox. In-repo senders of X-Session-API-Key (e.g. openhands/events/nested_event_store.py:48, live_status_app_conversation_service.py) call the sandbox, not this enforcer." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "present", | |
| "symbol": "valid_sandbox", | |
| "file": "openhands/app_server/event_callback/webhook_router.py", | |
| "lines": "58", | |
| "notes": "FastAPI dependency installed on the webhook routes via Depends(valid_sandbox) (webhook_router.py:102, :139); router wired via v1_router.py:18 and openhands/server/app.py:102. Reads the opaque X-Session-API-Key header, returns 401 if absent or if the Verifier (call at webhook_router.py:70) finds no sandbox." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "get_sandbox_by_session_api_key", | |
| "file": "openhands/app_server/sandbox/docker_sandbox_service.py", | |
| "lines": "274", | |
| "notes": "Called by valid_sandbox at webhook_router.py:70; DockerSandboxService is the default sandbox service (config.py:225, used unless RUNTIME=remote/process, whose ProcessSandboxService:278 / RemoteSandboxService:340 are alternatives). Matches the session key against each sandbox container's stored key and returns the SandboxInfo (principal incl. created_by_user_id) or None." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "present", | |
| "symbol": "_get_container_env_vars", | |
| "file": "openhands/app_server/sandbox/docker_sandbox_service.py", | |
| "lines": "108", | |
| "notes": "Called by get_sandbox_by_session_api_key at docker_sandbox_service.py:287 after listing containers (docker_client.containers.list at :280); retrieves the session key stored per open sandbox in env var OH_SESSION_API_KEYS_0 (set at start_sandbox, :316-320 with random os.urandom key). Caveat: the session state itself lives in the Docker daemon's container config, keys stored in plaintext." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "present", | |
| "symbol": "valid_conversation", | |
| "file": "openhands/app_server/event_callback/webhook_router.py", | |
| "lines": "78", | |
| "notes": "Called by the System handlers with the authenticated sandbox principal (on_event at webhook_router.py:145, on_conversation_update at :106); raises AuthError when the conversation was not created by the sandbox's user. Decision is inline, so it is also the Decider." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "present", | |
| "symbol": "valid_conversation", | |
| "file": "openhands/app_server/event_callback/webhook_router.py", | |
| "lines": "78", | |
| "notes": "Same method as the Authorisation enforcer (decision inline at webhook_router.py:93): compares app_conversation_info.created_by_user_id with sandbox_info.created_by_user_id (ownership policy); missing conversations are allowed as a stub owned by the sandbox user." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "present", | |
| "symbol": "get_app_conversation_info", | |
| "file": "openhands/app_server/app_conversation/sql_app_conversation_info_service.py", | |
| "lines": "276", | |
| "notes": "Called by valid_conversation at webhook_router.py:84 (SQLAppConversationInfoService is the default injector, config.py:236); SQL lookup of StoredConversationMetadata whose user_id column holds the conversation owner used by the ownership check." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "on_event", | |
| "file": "openhands/app_server/event_callback/webhook_router.py", | |
| "lines": "136", | |
| "notes": "POST /webhooks/events/{conversation_id} handler, guarded by Depends(valid_sandbox) (:139) and valid_conversation (:145); saves the events, processes stats and runs callbacks. on_conversation_update (:100) is a sibling handler on the same path." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 4.19 kB
- Xet hash:
- 30f7d01b77ae09e07d4514b8be44b063b8c173ac0a5b74a5ec1f55060841201e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.