Skip to content

Commit 56e44fe

Browse files
feat(server): add runtime auth and namespace scoping (#214)
1 parent 764bd4b commit 56e44fe

73 files changed

Lines changed: 2884 additions & 795 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This repository keeps documentation concise. The full documentation lives on the
1010
- [Controls](https://docs.agentcontrol.dev/concepts/controls) — Define and configure control rules
1111
- [Reference](https://docs.agentcontrol.dev/core/reference) — SDK and server API reference
1212
- [Configuration](https://docs.agentcontrol.dev/core/configuration) — Environment variables, auth, and database settings
13+
- [Authentication](https://docs.agentcontrol.dev/core/authentication) — Pluggable auth modes, HTTP upstream contract, and runtime JWT claims
1314
- [UI Quickstart](https://docs.agentcontrol.dev/core/ui-quickstart) — Run the dashboard and manage controls visually
1415

1516
## Examples

models/src/agent_control_models/server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ class CreateControlBindingRequest(BaseModel):
640640

641641
target_type: ControlBindingTargetField = Field(
642642
...,
643-
description="Opaque attachment kind (caller-defined; e.g. 'env', 'log_stream').",
643+
description="Opaque attachment kind (caller-defined; e.g. 'environment', 'session').",
644644
)
645645
target_id: ControlBindingTargetField = Field(
646646
..., description="Opaque external identifier within the target_type."
@@ -760,4 +760,3 @@ class DeleteControlBindingByKeyResponse(BaseModel):
760760
),
761761
)
762762

763-

sdks/typescript/src/generated/funcs/agents-get-evaluator.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ import { Result } from "../types/fp.js";
3737
* agent_name: Agent identifier
3838
* evaluator_name: Name of the evaluator
3939
* db: Database session (injected)
40-
* namespace_key: Resolved namespace; agents in another namespace
41-
* return 404 (non-disclosing).
40+
* principal: Authorized request principal
4241
*
4342
* Returns:
4443
* EvaluatorSchemaItem with schema details

sdks/typescript/src/generated/funcs/agents-get.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ import { Result } from "../types/fp.js";
3838
* Args:
3939
* agent_name: Agent identifier
4040
* db: Database session (injected)
41-
* namespace_key: Resolved namespace; agents in another namespace
42-
* return 404 (non-disclosing).
41+
* principal: Authorized request principal
4342
*
4443
* Returns:
4544
* GetAgentResponse with agent metadata and step list

sdks/typescript/src/generated/funcs/agents-init.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ import { Result } from "../types/fp.js";
5151
* Args:
5252
* request: Agent metadata and step schemas
5353
* db: Database session (injected)
54+
* principal: Authorized request principal for the agent create operation
55+
* target_principal: Optional principal from the target binding read check
5456
*
5557
* Returns:
5658
* InitAgentResponse with created flag and the effective controls

sdks/typescript/src/generated/funcs/agents-list-controls.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ import { Result } from "../types/fp.js";
5353
* target_type: Optional opaque target kind (paired with target_id)
5454
* target_id: Optional opaque target identifier (paired with target_type)
5555
* db: Database session (injected)
56-
* namespace_key: Namespace scoping for the resolution (injected)
56+
* principal: Authorized request principal for the agent read operation
57+
* target_principal: Optional principal from the target binding read check
5758
*
5859
* Returns:
5960
* AgentControlsResponse with controls matching the requested state filters

sdks/typescript/src/generated/funcs/agents-list-evaluators.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ import { Result } from "../types/fp.js";
4242
* cursor: Optional cursor for pagination (name of last evaluator from previous page)
4343
* limit: Pagination limit (default 20, max 100)
4444
* db: Database session (injected)
45-
* namespace_key: Resolved namespace; agents in another namespace
46-
* return 404 (non-disclosing).
45+
* principal: Authorized request principal
4746
*
4847
* Returns:
4948
* ListEvaluatorsResponse with evaluator schemas and pagination

sdks/typescript/src/generated/funcs/agents-list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import { Result } from "../types/fp.js";
4242
* limit: Pagination limit (default 20, max 100)
4343
* name: Optional name filter (case-insensitive partial match)
4444
* db: Database session (injected)
45-
* namespace_key: Resolved namespace for the request
45+
* principal: Authorized request principal
4646
*
4747
* Returns:
4848
* ListAgentsResponse with agent summaries and pagination info

sdks/typescript/src/generated/funcs/agents-update.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import { Result } from "../types/fp.js";
4040
* agent_name: Agent identifier
4141
* request: Lists of step/evaluator identifiers to remove
4242
* db: Database session (injected)
43+
* principal: Authorized request principal
4344
*
4445
* Returns:
4546
* PatchAgentResponse with lists of actually removed items

sdks/typescript/src/generated/funcs/auth-runtime-token-exchange.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ import { Result } from "../types/fp.js";
3232
* @remarks
3333
* Mint a short-lived runtime token for the requested target.
3434
*
35-
* The caller's credential is authenticated and authorized by the
36-
* installed default authorizer; the resulting :class:`Principal`
37-
* supplies the actor identity and (when the upstream surfaces it)
38-
* the grant scopes and expiry. This endpoint then mints a local HS256
39-
* token whose lifetime cannot outlive the upstream grant.
35+
* The caller's credential is authenticated and authorized before the
36+
* resolved principal supplies the actor identity, grant scopes, and
37+
* expiry. This endpoint then mints a local HS256 token whose lifetime
38+
* cannot outlive the grant.
4039
*
4140
* Runtime auth must be enabled via
4241
* ``AGENT_CONTROL_RUNTIME_TOKEN_SECRET``; otherwise the endpoint

0 commit comments

Comments
 (0)