Engineering guide · ICAM
AI Workload Principals And Delegation
On this page
Authority And PersistencePrerequisitesManagement APIRegister And Activate An AgentAuthenticate With private_key_jwtDelegate A Human SubjectAgent-To-Agent ExchangeBind The Agent To A ResourceExternal Provider Operations And End-User ConsentFailure And Evidence SemanticsVerificationAtlas represents an AI agent as a first-class, tenant-scoped workload principal rather than treating an OAuth client name as the agent identity. The API is intentionally compatible with the resource shape used by current AI identity platforms while adding server-owned identifiers, two-person activation, optimistic concurrency, reference-only credential handling, and runtime revocation.
The standards and interoperability baselines are RFC 8693 OAuth Token Exchange, Okta AI agent lifecycle, Okta AI agent JWK API, and Okta AI agent token exchange, and Okta agent-to-agent token exchange.
Authority And Persistence
The API-access service is the sole authority for:
-
the AI agent aggregate and its public JWKs;
-
OAuth-client-to-agent binding;
-
explicit subject-client or agent delegation links;
-
first-class MCP/API resource authority and agent-to-resource token-exchange connections;
-
one-time client-assertion JTI evidence;
-
ID-JAG registration and consumption evidence.
-
ordered, bounded RFC 8693 nested actor-chain evidence.
-
provider-verified, subject-bound consent and revocation evidence; and
-
durable provider provisioning and deprovisioning operation resources.
All records are tenant-scoped PostgreSQL platform records. Agent state and its JWK set are one compare-and-swap aggregate. This prevents a replica from observing a newly activated key without the corresponding agent revision, or an active agent without exactly one active verification key. Atlas derives the agent identifier from tenant and client identifiers and uses atomic create-only persistence, so concurrent registrations cannot bind multiple agents to one client.
Private keys, client secrets, assertion bodies, ID-JAG bodies, refresh tokens, provider responses, authorization codes, raw provider grant identifiers, and resource credentials are not persisted in these records. Only public JWK material, Vault Transit ciphertext for bounded continuation state, and SHA-256 evidence digests enter durable state.
Prerequisites
Before registration, create an approved, enabled, confidential OAuth client
whose grant types include
urn:ietf:params:oauth:grant-type:token-exchange.
The owning actor needs fresh AAL2 and workload.ai-agents.manage.
An independent approver needs fresh AAL3 and
workload.ai-agents.approve.
The lifecycle is:
approved confidential client
-> STAGED agent
-> INACTIVE public JWK
-> ACTIVE public JWK
-> ACTIVE agent
-> explicit delegation link
-> active metadata-validated resource server
-> explicit resource connection
-> RFC 8693 exchange
An active agent cannot have its owner metadata changed or its active key removed. Deactivate the workload before changing ownership, deactivating the active key, or retiring the principal. Runtime authorization rechecks the agent, delegation, connection, and all bound clients; deactivation or revocation therefore takes effect without waiting for copied policy state.
Management API
| Route | Purpose | Capability | Assurance |
|---|---|---|---|
|
List or register staged agents. |
|
AAL1 or fresh AAL2 |
|
Read, update an inactive agent, or retire an inactive agent. |
read, manage, or approve capability |
AAL1, fresh AAL2, or fresh AAL3 |
|
Change workload availability. |
|
fresh AAL3 |
|
List or add public verification keys. |
read or |
AAL1 or fresh AAL2 |
|
Read or delete an inactive public key. |
read or credentials-manage capability |
AAL1 or fresh AAL2 |
|
Atomically select or deactivate the verification key. |
|
fresh AAL3 |
|
List or create a pending delegation. |
delegation read or manage capability |
AAL1 or fresh AAL2 |
|
Read or immediately revoke a link. |
delegation read or approve capability |
AAL1 or fresh AAL3 |
|
Independently approve a pending link. |
|
fresh AAL3 |
|
List or create the agent’s resource connections. |
token-exchange read or manage capability |
AAL1 or fresh AAL2 |
|
Read or revoke a resource connection. |
token-exchange read or approve capability |
AAL1 or fresh AAL3 |
|
Independently activate or deactivate a connection. |
|
fresh AAL3 |
Every mutation after create uses the current ETag value in If-Match.
Lifecycle bodies contain a nonempty reason.
Activation rejects the actor who created the agent, key, delegation, or
connection as appropriate.
Stale ETags fail rather than overwriting a concurrent security decision.
Register And Activate An Agent
Register a staged workload:
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H "Content-Type: application/json" \
-X POST https://id.atlas.example/workload-principals/api/v1/ai-agents \
--data '{
"name": "Mission planning agent",
"description": "Bounded planning workload",
"ownerId": "team-mission-systems",
"clientId": "agent-oauth-client"
}'
Atlas returns 201, a Location, an ETag, and a STAGED agent.
The server ignores any caller-provided identifier and returns its durable
server-owned identifier.
Generate the signing key inside the workload’s HSM, KMS, TPM, or protected runtime. Send only the public JWK:
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H 'If-Match: "CURRENT_AGENT_EVIDENCE_SHA256"' \
-H "Content-Type: application/json" \
-X POST \
"https://id.atlas.example/workload-principals/api/v1/ai-agents/${AGENT_ID}/credentials/jwks" \
--data '{
"kid": "agent-signing-2026-07",
"kty": "EC",
"alg": "ES384",
"use": "sig",
"crv": "P-384",
"x": "'"${PUBLIC_JWK_X}"'",
"y": "'"${PUBLIC_JWK_Y}"'"
}'
Atlas accepts P-384/ES384 or RSA/RS256 public signing keys.
RSA moduli must be at least 2048 bits with a safe odd exponent.
Private JWK members are rejected as unknown input.
New keys are INACTIVE.
An independent AAL3 actor activates the key using the newest aggregate ETag, then activates the agent using the ETag returned by key activation:
curl --fail-with-body \
-H "Authorization: Bearer ${INDEPENDENT_AAL3_TOKEN}" \
-H 'If-Match: "'"${CURRENT_AGENT_EVIDENCE_SHA256}"'"' \
-H "Content-Type: application/json" \
-X POST \
"https://id.atlas.example/workload-principals/api/v1/ai-agents/${AGENT_ID}/credentials/jwks/${KEY_ID}/lifecycle/activate" \
--data '{"reason":"key provenance and workload custody reviewed"}'
curl --fail-with-body \
-H "Authorization: Bearer ${INDEPENDENT_AAL3_TOKEN}" \
-H 'If-Match: "'"${NEXT_AGENT_EVIDENCE_SHA256}"'"' \
-H "Content-Type: application/json" \
-X POST \
"https://id.atlas.example/workload-principals/api/v1/ai-agents/${AGENT_ID}/lifecycle/activate" \
--data '{"reason":"owner, client, and signing key independently approved"}'
Activating a replacement key and demoting the prior key occur in one atomic agent revision.
Authenticate With private_key_jwt
The workload authenticates at the tenant token endpoint with a signed client assertion instead of a reusable client secret. The JWT must contain:
-
issandsubequal to the bound OAuth client identifier; -
audequal to the exact token endpoint URL; -
an
iatno more than one minute in the future; -
an
expafteriat, no more than five minutes later, and not expired; -
a bounded, unique
jti; -
a
kidnaming the active registered JWK; -
ES384orRS256matching that key.
curl --fail-with-body \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST "https://id.atlas.example/oauth2/${TENANT_ID}/v1/token" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope=profile" \
--data-urlencode \
"client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer" \
--data-urlencode "client_assertion=${SIGNED_CLIENT_ASSERTION}"
client_id may be supplied explicitly or inferred from equal iss and sub
claims.
HTTP Basic and client_assertion in the same request are rejected.
Atlas verifies the signature against the active public key and atomically
records a tenant-bound JTI and assertion digest before token issuance.
The same assertion succeeds at most once across replicas.
Replay, inactive workload, inactive key, wrong audience, excessive lifetime,
future timestamp, or algorithm mismatch returns invalid_client without
revealing which check failed.
Discovery advertises private_key_jwt in
token_endpoint_auth_methods_supported.
Delegate A Human Subject
A delegation link is an explicit policy edge from an OAUTH_CLIENT or
AI_AGENT to a target agent.
It allowlists exact subject-token types and scopes:
{
"fromType": "OAUTH_CLIENT",
"fromId": "mission-portal",
"toAgentId": "agent_...",
"connectionType": "IDENTITY_ASSERTION_APP_INSTANCE",
"tokenType": "urn:ietf:params:oauth:token-type:id_token",
"subjectTokenTypes": [
"urn:ietf:params:oauth:token-type:id_token"
],
"allowedScopes": ["profile", "read:users"]
}
Creation produces PENDING.
tokenType selects one exact member of subjectTokenTypes; a resource
connection must repeat the same value. connectionType is currently
IDENTITY_ASSERTION_APP_INSTANCE. Atlas rejects ambiguous or mismatched
values rather than inferring a broader set at runtime.
Independent activation revalidates that both endpoints are still enabled,
approved, and active.
Revocation is immediate.
Atlas admin-authorized delegation is separate from an external resource
provider’s end-user consent interaction.
Set providerConsentRequired when both are required.
Atlas then refuses to register the subject’s ID-JAG unless a current provider
approval exactly covers the connection, subject, audience, and requested
scopes.
An AI_AGENT link records and independently approves the source-agent to
target-agent policy edge.
It authorizes an Atlas access token with
subject_token_type=urn:ietf:params:oauth:token-type:access_token only when:
-
the source and target agents remain active;
-
the incoming token’s immediate
act.subequals the source agent client; -
its
resourceis the target agent’s exact active, metadata-validated resource audience; -
the target agent authenticates at the token endpoint;
-
the requested downstream resource and scopes match the target agent’s independently active connection;
-
the ordered actor chain is valid, contains no repeated subject, and remains within Atlas’s five-entry maximum.
An OAUTH_CLIENT link can authorize either an ID token for a human subject or
an access token for a service identity.
The service flow requires client_credentials with an exact resource
parameter naming the first agent’s active resource audience.
The resulting subject is the service client, sub_profile is service, and
no synthetic user is introduced.
Agent-To-Agent Exchange
Each agent that can receive a call is registered twice for different authorities:
-
as an active AI workload principal, which authenticates the agent; and
-
as an active API resource server whose Atlas XAA binding uses that agent’s OAuth client, which defines the exact audience at which the agent may receive a token.
This is intentional. Being allowed to authenticate does not imply being allowed to receive delegated traffic.
For origin-service → agent-one → agent-two → mission-api, configure:
-
an
OAUTH_CLIENTaccess-token link fromorigin-servicetoagent-one; -
an
AI_AGENTaccess-token link fromagent-onetoagent-two; -
a connection on
agent-onewhose resource isagent-two; -
a connection on
agent-twowhose resource ismission-api; and -
active resource registrations for
agent-one,agent-two, andmission-api.
The origin obtains a resource-bound service token:
curl --fail-with-body \
--user "origin-service:${ORIGIN_CLIENT_SECRET}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST "https://id.atlas.example/oauth2/${TENANT_ID}/v1/token" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope=profile" \
--data-urlencode "resource=https://agent-one.example.mil"
agent-one requests an ID-JAG for agent-two:
curl --fail-with-body \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST "https://id.atlas.example/oauth2/${TENANT_ID}/v1/token" \
--data-urlencode \
"grant_type=urn:ietf:params:oauth:grant-type:token-exchange" \
--data-urlencode "subject_token=${ORIGIN_SERVICE_ACCESS_TOKEN}" \
--data-urlencode \
"subject_token_type=urn:ietf:params:oauth:token-type:access_token" \
--data-urlencode \
"requested_token_type=urn:ietf:params:oauth:token-type:id-jag" \
--data-urlencode "audience=https://id.atlas.example/oauth2/${TENANT_ID}" \
--data-urlencode "resource=https://agent-two.example.mil" \
--data-urlencode "scope=profile" \
--data-urlencode \
"client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer" \
--data-urlencode "client_assertion=${AGENT_ONE_ASSERTION}"
The ID-JAG has the authorization-server issuer in aud, the downstream agent
URI in resource, the original service in sub, and this actor chain:
{
"sub": "origin-service",
"sub_profile": "service",
"resource": "https://agent-two.example.mil",
"act": {
"sub": "agent-one",
"sub_profile": "ai_agent",
"act": {
"sub": "origin-service",
"sub_profile": "service"
}
}
}
agent-two consumes that one-time ID-JAG to obtain an access token addressed
to its registered resource URI.
It may then use that access token as the subject token for the next exchange.
Atlas prepends agent-two and preserves the earlier entries:
{
"sub": "origin-service",
"sub_profile": "service",
"resource": "https://mission-api.example.mil",
"act": {
"sub": "agent-two",
"sub_profile": "ai_agent",
"act": {
"sub": "agent-one",
"sub_profile": "ai_agent",
"act": {
"sub": "origin-service",
"sub_profile": "service"
}
}
}
}
The actor order is immediate caller to origin.
Every sub is unique.
Only ai_agent entries may precede the final service entry.
Atlas rejects a sixth entry, a repeated subject, an actor inserted after the
originating service, a source-agent mismatch, a token addressed to another
agent, and scope expansion.
The management authority stores the subject profile, ordered actor entries, incoming resource, authorization audience, downstream resource, connection and delegation evidence hashes, resource and authorization-server evidence hashes, token digest, JTI, and expiry. It never stores the token body. ID-JAG consumption performs a compare-and-swap, so exactly one consumer wins across replicas. Revoking or revising any bound connection, delegation, agent, resource, or authorization binding invalidates in-flight evidence; reactivation cannot revive an older lifecycle epoch.
Bind The Agent To A Resource
First register, validate, and independently activate the MCP or API authority described in MCP And API Resource Servers. Create the connection beneath the agent after the delegation and resource are active:
{
"name": "mission agent to logistics API",
"delegationLinkId": "delegation_...",
"inboundResourceServerId": "receiving_agent_resource_server_...",
"resourceServerId": "resource_server_...",
"resourceAuthorizationServerId": "resource_authorization_server_...",
"connectionType": "IDENTITY_ASSERTION_APP_INSTANCE",
"tokenType": "urn:ietf:params:oauth:token-type:id_token",
"agentClientId": "agent-oauth-client",
"subjectClientId": "mission-portal",
"resourceClientId": "logistics-api",
"audience": "https://logistics.example.mil",
"allowedScopes": ["profile", "read:users"],
"idJagTtlSeconds": 120
}
The path supplies and enforces agentId.
The connection binds the exact agent, delegation link, agent client, subject
client, optional inbound first-class resource server, downstream first-class
resource server, authorization-server configuration, resource client,
exact token type, connection type, audience, scope allowlist, and
30-to-300-second ID-JAG lifetime.
inboundResourceServerId is required when the delegation link accepts access
tokens and is omitted for an ID-token-only human edge.
All clients are distinct and must be approved for their required protocol
roles.
Independent AAL3 activation rechecks the complete graph.
Exchange authorization and both ID-JAG stages recheck active resource state,
exact resource audience, binding, scopes, client, and unexpired readiness evidence.
GET /workload-principals/api/v1/potential-connections lists only active,
unexpired Atlas XAA bindings that can actually satisfy these checks.
External Provider Operations And End-User Consent
An external-provider binding is optional.
When present, providerId and providerAdapterId are required together.
A delegation link also supplies providerAudience; a resource connection
uses its existing exact audience.
An unknown adapter fails creation closed.
External materialization is intentionally asynchronous:
PENDING target
-> PENDING provider operation
-> RUNNING
-> WAITING_PROVIDER (zero or more polls)
-> SUCCEEDED
-> independent Atlas activation
The actor who requests the operation cannot execute it.
Both creation and execution require fresh AAL3, a reason, If-Match, and an
actor-bound idempotency key on creation.
Atlas activates an adapter-bound target only when a PROVISION operation
succeeded against that target’s current evidence hash.
An invocation timeout has an uncertain external result, so Atlas records
WAITING_PROVIDER with a hashed error and permits an idempotent poll; it does
not falsely record FAILED.
Explicit provider rejection becomes a terminal FAILED tombstone.
Local revocation commits before a DEPROVISION operation may be created, so
provider latency can never extend Atlas authorization.
The nested operation routes are available under both:
-
/workload-principals/api/v1/ai-agents/{agentId}/connections/{connectionId}/operations -
/workload-principals/api/v1/delegation-links/{delegationLinkId}/operations
Collection POST returns 202.
GET lists resources.
Item GET returns the current ETag.
POST …/{operationId}/lifecycle/execute executes or polls, and
POST …/{operationId}/lifecycle/cancel cancels only a pending or waiting
operation.
If the binding sets providerConsentRequired, the end user uses the
corresponding nested provider-consents collection:
-
POSTwith the exact audience, a scope subset, an HTTPS callback URI, and idempotency key; -
follow the single-delivery
authorizationUrl; -
POST …/{consentId}/completewith the provider response and currentIf-Match; and -
optionally
POST …/{consentId}/revoke.
The provider response is transient. The adapter must verify it and return the exact subject, audience, and scope set. Any mismatch fails without changing the pending record. Continuation state is encrypted before PostgreSQL and is cleared on approval, denial, or revocation. The public consent contains only provider grant and evidence SHA-256 digests. Self-revocation requires fresh AAL2 and takes effect locally before the request returns.
The adapter contract is compiled code, not a user-selected callback:
BeginConsent, CompleteConsent, and idempotent ExecuteOperation.
Production adapters use a stable Vault Transit protector and must never
return tokens or credentials.
No adapter means the Atlas-native administrative connection path remains
available, while every adapter-bound mutation fails closed.
This authority is distinct from application Cross App Access. Atlas application XAA already supports exact active OIDC and SAML application contracts, bilateral owner consent, signed aggregate state, and durable operations; see Cross App Access. The provider-consent API does not create a second SAML trust authority.
Use OAuth Grants, Refresh Tokens, And Token Exchange for the common two-stage exchange contract. The same contract accepts a resource-bound service or prior-agent access token to issue the next single-use ID-JAG, then exchanges that ID-JAG for a grant-bound Atlas access token while preserving the complete actor chain.
Failure And Evidence Semantics
| Result | Meaning |
|---|---|
|
The bounded JSON or JWK contract is invalid. |
|
Workload assertion authentication failed without principal enumeration. |
|
The actor lacks capability, assurance, freshness, or independent-approval authority. |
|
The tenant-scoped object is absent or outside the requested parent. |
|
A lifecycle invariant, one-agent-per-client constraint, stale provider generation, terminal-operation tombstone, or compare-and-swap conflict failed. |
|
|
Each successful mutation advances a version, changes the SHA-256 evidence hash, and appends a typed evidence reference. Authentication stores the public key identifier, client and agent bindings, JTI, token digest, issue time, and expiry, never the assertion. Management responses are safe to log only under the deployment’s normal identity-record policy; they never contain private keys.
Verification
Run the authority, protocol, HTTP, and OpenAPI tests:
Internal implementation checks are omitted from this public guide.
Compile the PostgreSQL suite without starting Docker:
Internal implementation checks are omitted from this public guide.
The Docker-tagged API-access tests create the clients, source and target
agents, keys, receiving-agent and final resource registrations, authorization
bindings, AI_AGENT delegation, connection, readiness, nested actor evidence,
and one-time assertion evidence; reopen PostgreSQL; then verify restored
policy, one-time ID-JAG consumption, replay denial, active resource readiness,
complete service/agent chain recovery, evidence hashes, and public-key-only
persistence.
The dedicated provider suite additionally applies migration 088, persists
encrypted consent and operation continuation state, restarts between provider
polls, verifies the ID-JAG consent gate, and attempts SQL tampering:
scripts/test/run-ai-provider-connections-docker-validation.sh
The focused tmpfs PostgreSQL provider suite passed on 2026-07-26. Its
hash-manifested evidence is under
artifacts/ai-provider-connections-validation/20260726T225530Z/.
This local proof does not certify an external provider or its platform
attestation.