Skip to content

Commit 8312b99

Browse files
docs(server): keep binding auth comments generic
1 parent 3a5b7e4 commit 8312b99

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

server/src/agent_control_server/endpoints/control_bindings.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@
3636

3737

3838
async def _binding_body_context(request: Request) -> dict[str, Any]:
39-
"""Surface ``(target_type, target_id)`` to the authorizer's context.
39+
"""Surface ``(target_type, target_id)`` to the authorization context.
4040
4141
The body-bearing binding endpoints carry the target identifiers in
42-
the request payload. Upstream authorizers that resolve the target's
43-
owning project (e.g., Galileo's ``check_management_access``) need
44-
those identifiers to make a project-level decision; without them the
45-
upstream returns 400.
42+
the request payload. Authorization providers can use those
43+
identifiers when a request needs target-scoped access checks.
4644
4745
FastAPI caches the parsed body, so the endpoint's own Pydantic
4846
request model still binds normally.
@@ -60,13 +58,12 @@ async def _binding_body_context(request: Request) -> dict[str, Any]:
6058

6159

6260
async def _binding_list_context(request: Request) -> dict[str, Any]:
63-
"""Surface optional target query parameters to the authorizer.
61+
"""Surface optional target query parameters to authorization context.
6462
6563
When the GET list endpoint is called with ``target_type`` and
6664
``target_id`` query params, the request is target-scoped and the
67-
upstream needs the identifiers to make a project-level decision.
68-
When neither is present the request is namespace-wide and forwards
69-
no target context (upstream may then reject if it requires one).
65+
request context includes those identifiers. When neither is present
66+
the request is namespace-wide and forwards no target context.
7067
"""
7168
target_type = request.query_params.get("target_type")
7269
target_id = request.query_params.get("target_id")

0 commit comments

Comments
 (0)