High-level overview
Dome authenticates agents in layers. An API key is the long-lived secret. The Identity service exchanges it for a short-lived session token. Every API call, MCP invocation, and gateway request carries that token. Services verify it locally. When the agent acts for a person, an act-as claim onX-Dome-Act-As can carry verified end-user identity beside the agent.
Issuing credentials and authenticating looks like this:
- An operator registers an agent and creates an API key.
- The runtime calls
ExchangeTokenwith that key, receives a JWT, and sends the JWT on each request. - Dome confirms the agent is active, reads claims from the token, and proceeds to Gateway and Rule checks.
- If the call also carries a verified act-as header, Rules can test
principal.act_asand audit records the end user next to the agent.
The CLI handles token exchange automatically. Run
dome auth login and the CLI manages key exchange, token refresh, and header injection.How authentication works
- API key issuance. Register an agent and create an API key. The key is returned once. Store it immediately.
- Token exchange. The agent sends the API key to the Identity service (
ExchangeTokenwithgrant_type: api_key). The service validates the key, confirms the agent is active, and returns a short-lived JWT. Tune the lifetime per-workspace viaidentity.token_ttl(default10m, range1m–24h). - Session token. The JWT carries the agent’s identity for all subsequent requests. There is no round-trip to the Identity service on every call. The token is self-contained and verified locally.
- Authenticated requests. Every API call, MCP invocation, and gateway request carries the session token. Services extract identity without additional lookups.
Session token
The session token is a JWT (HMAC-SHA256) carrying:
The token is self-contained: any service can verify it locally using the signing key without calling the Identity service. Expiration is enforced on every request.
Act-as identity
Act-as identity identifies the end user represented by a delegated agent. Attach that user’s claims with theX-Dome-Act-As header. Configure providers and the workspace floor on Delegated agents.
What it carries
Verified claims land onprincipal.act_as (sub, email, roles, groups, and custom claims). Claim list for setup: Delegated agents. Attribute types for policy: Rules.
How it’s verified
Act-as claims are untrusted by default. Verification (oidc, hmac, bound, or none for development only) ensures the agent is not fabricating user identities. Method catalog: Delegated agents.
Configure verification at the workspace level as a baseline, or per-agent for tighter control. Workspace enforcement is a floor. Agents can add stricter verification but cannot weaken it.
Act-as in authorization rules
Once verified, act-as claims are available in Cedar rules:rules.cedar
principal.act_as attribute notes are on the Rules reference.
Next steps
With that authentication and act-as model in mind, continue with:- Agents concept for how agents are identified and authenticated
- Identity Patterns concept for standing vs delegated design
- Agents to create keys and manage agents
- Delegated agents for act-as providers, methods, claims, and enforcement
- Architecture concept for where identity sits on the request path