Principal.
Operations
Operations are stable strings. Teams map them to their own permission model.Principal
Providers return a generic principal. Agent Control treatsnamespace_key, caller_id,
target_type, and target_id as opaque strings.
namespace_key is the tenancy boundary. Server queries filter by it, and namespace-aware foreign
keys prevent cross-namespace references.
Auth Modes
Management auth is selected byAGENT_CONTROL_AUTH_MODE.
When
AGENT_CONTROL_AUTH_MODE is unset, startup selects api_key if local API-key validation is
enabled and none otherwise.
Runtime auth is selected by AGENT_CONTROL_RUNTIME_AUTH_MODE.
Common combinations:
HTTP Upstream Contract
WhenAGENT_CONTROL_AUTH_MODE=http_upstream, the server sends:
X-API-Key, Authorization, and Cookie headers. Add
deployer-specific header names with AGENT_CONTROL_AUTH_UPSTREAM_EXTRA_FORWARD_HEADERS, for
example:
AGENT_CONTROL_AUTH_UPSTREAM_SERVICE_TOKEN is set, it is forwarded on
AGENT_CONTROL_AUTH_UPSTREAM_SERVICE_TOKEN_HEADER or X-Agent-Control-Service-Token by default.
A successful upstream response is:
namespace_key is always required. target_type and target_id must be returned together
when present. expires_at must include timezone information.
Status handling:
Runtime JWT Claims
/api/v1/auth/runtime-token-exchange is a management-style request. The configured management
provider authorizes runtime.token_exchange for the requested target. Agent Control then mints
its own HS256 JWT with AGENT_CONTROL_RUNTIME_TOKEN_SECRET.
The token payload contains:
domain="runtime", a valid signature, an unexpired
exp, and runtime.use in scopes. The token is accepted only for requests whose target_type
and target_id match the bound target.
The expiry is the earlier of AGENT_CONTROL_RUNTIME_TOKEN_TTL_SECONDS and the upstream grant’s
expires_at when supplied. Runtime token lifetimes are capped at 86400 seconds.