Enterprise AI workflows rarely stop at a single model call—a user-facing orchestrator routinely delegates subtasks to specialized research, CRM, analytics, and ticketing subagents. When orchestrators fall back to static service credentials for downstream hops, they erase the originating user's identity and grant low-privilege employees access to restricted records through an over-privileged subagent.
Key Takeaways
- Passing a single god-mode service token across multi-agent graphs creates severe confused-deputy privilege amplification.
- RFC 8693 OAuth 2.0 Token Exchange swaps a user's subject token and an agent's actor credential for an audience-bound, downscoped downstream JWT.
- Monotonic scope attenuation guarantees every downstream hop holds equal or fewer permissions than both the originating human user and the calling agent.
- Preserving nested act claims alongside tenant_id and org_id maintains strict B2B multi-tenant isolation across asynchronous multi-agent workflows.
The Confused-Deputy Trap in Multi-Agent Orchestration
Consider an enterprise sales assistant backed by three specialized workers: a Deal Researcher, a Contract Reviewer, and a Billing Lookup agent. A regional account executive asks the orchestrator to summarize renewal risks for Acme Corp. If the orchestrator authenticates to the Billing Lookup agent using a shared backend client_credentials token, the Billing API sees a trusted internal service rather than the regional rep—and returns executive compensation clauses or cross-region accounts the rep is forbidden to view.
Forwarding the user's original OIDC access token verbatim down the entire agent chain is equally flawed. That original token was minted for the front-end orchestrator's audience and carries broad session scopes such as profile, email, and workspace administration. Replaying it directly to third-party tool plugins or internal subagents exposes the user's full session credential to every downstream component, violating audience isolation and obscuring which agent actually performed each API call.
- Service-account impersonation strips user RBAC checks, enabling unauthorized cross-department or cross-tenant data disclosure.
- Raw bearer token forwarding leaks broad user credentials to downstream subagents that only need a single narrow read scope.
- Missing actor attribution leaves downstream logs showing only the human user, hiding the fact that an autonomous subagent initiated the call.
- Multi-hop fan-out multiplies blast radius whenever one compromised specialist worker can reuse credentials meant for peer agents.
RFC 8693 On-Behalf-Of Token Exchange and Actor Chains
OAuth 2.0 Token Exchange (RFC 8693) solves multi-agent delegation cleanly without static impersonation or raw token replay. When the orchestrator receives an authenticated user request, it calls the authorization server's token endpoint presenting the user's validated JWT as the subject_token, its own authenticated client or agent identity as the actor_token, the exact downstream target resource URI, and the minimal scope needed for the next hop.
The authorization server verifies both tokens, confirms the agent is authorized for OnBehalfOfUser delegation, intersects permissions, and issues a fresh short-lived JWT tailored strictly for that single downstream worker. The issued token preserves the human user in sub while recording the acting agent inside the RFC 8693 act claim—creating a cryptographically verifiable chain of custody from human prompt to final database query.
POST https://auth.sso.id/oauth/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: Basic <BASE64_ORCHESTRATOR_CLIENT_CREDENTIALS>
grant_type=urn:ietf:params:oauth:grant-type:token-exchange
&subject_token=eyJhbGciOiJSUzI1NiIs...<USER_ACCESS_TOKEN>
&subject_token_type=urn:ietf:params:oauth:token-type:access_token
&actor_token=eyJhbGciOiJSUzI1NiIs...<ORCHESTRATOR_AGENT_JWT>
&actor_token_type=urn:ietf:params:oauth:token-type:access_token
&resource=https://api.acme.internal/billing-readonly
&scope=invoices:read contracts:summary:read
&requested_token_type=urn:ietf:params:oauth:token-type:access_token
Monotonic Scope Attenuation Across Multi-Hop Chains
In a three-hop workflow—Human User to Orchestrator Agent to Contract Reviewer Agent to Document Search API—permissions must strictly attenuate (shrink or stay equal) at every hop. If the human user holds invoices:read and invoices:write, the Orchestrator is capped at invoices:read and contracts:summary:read, and the Contract Reviewer is only allowed contracts:summary:read, then the final exchanged JWT may carry only contracts:summary:read.
Nested act claims preserve the complete multi-hop delegation tree inside the signed payload. When the Document Search API receives the request, it sees that Human User usr_8831a is the subject, Contract Reviewer agt_contract_rev_02 is the immediate actor, and Sales Orchestrator agt_sales_orch_01 delegated the call. No hop can ever escalate scopes, forge an earlier actor, or widen the token's audience.
- Compute effective scopes as the intersection of User Roles, Caller Token Scopes, Target Agent Policy Scopes, and Requested Scopes.
- Cap exchanged token expiration to the minimum of the agent's maxTokenTtlMinutes (for example, 10 minutes) and the remaining lifetime of the user's subject_token.
- Limit maximum delegation depth (commonly 3 to 4 hops) in authorization policy to prevent recursive agent loops from minting unbounded chains.
- Reject token exchange requests whenever any agent in the actor chain is Suspended, Revoked, or Orphaned.
{
"iss": "https://auth.sso.id",
"sub": "usr_8831a",
"aud": "https://api.acme.internal/document-search",
"tenant_id": "7e4b2a10-5c11-4f82-9a3e-11d8c2a0f9b1",
"org_id": "org_emea_enterprise",
"delegation_mode": "OnBehalfOfUser",
"scope": "contracts:summary:read",
"hitl_write_required": true,
"act": {
"sub": "agt_contract_rev_02",
"human_owner": "[email protected]",
"act": {
"sub": "agt_sales_orch_01",
"human_owner": "[email protected]"
}
},
"iat": 1794834000,
"exp": 1794834600
}
Never allow a downstream OBO token to outlive the originating human user's session or exceed the agent's configured maxTokenTtlMinutes. Tight TTL propagation ensures that revoking a user session or agent identity rapidly halts in-flight multi-agent fan-out.
Preserving B2B Tenant and Organization Isolation Across Queues
Multi-tenant SaaS platforms face an acute risk when multi-agent pipelines span asynchronous queues or background workers. If an orchestrator drops tenant_id or org_id context when handing off a task to a worker queue, the downstream agent can inadvertently query vector indexes or relational tables belonging to a neighboring B2B customer. Carrying cryptographically signed tenant_id and org_id claims inside every exchanged OBO token prevents cross-tenant confusion at the data access layer.
SSO.ID's 4-Tier Policy Inheritance Cascade (Tenant to Application to Organization to Organization Unit) reinforces this boundary dynamically. If Enterprise Customer A enforces a stricter 5-minute token TTL or requires MFA-backed sessions for AI copilots on their Organization tier, every OBO exchange initiated by users in Organization A inherits those exact security invariants automatically.
- Always derive tenant and organization query filters from verified JWT claims (tenant_id, org_id), never from LLM tool parameters.
- Namespace vector store collections and RAG metadata filters using the signed org_id claim before passing retrieved chunks back to the model.
- Avoid placing long-lived refresh tokens inside async worker queues; exchange for short-lived task-scoped tokens right before dispatch.
How SSO.ID Solves Multi-Agent OBO Delegation
SSO.ID v2 combines OAuth 2.0 protocol rigor, explicit OnBehalfOfUser agent delegation policies, and 4-Tier Multi-Tenant Policy Inheritance so multi-agent workflows stay strictly downscoped and tenant-isolated.
- ✓Dedicated delegationMode enforcement (OnBehalfOfUser, HumanInTheLoop, AutonomousM2M) registered on every AI agent identity.
- ✓Automatic scope intersection and TTL capping across agent token requests to enforce monotonic privilege attenuation.
- ✓Signed tenant_id, org_id, agent_id, and human_owner claims preserving full multi-tenant and attribution context across downstream APIs.
- ✓4-Tier Policy Inheritance (Tenant, Application, Organization, Organization Unit) allowing B2B customers to customize token lifetimes and MFA rules.
Frequently Asked Questions
Use OnBehalfOfUser whenever a human user triggers the workflow and downstream data access must respect that user's specific RBAC and organization boundaries. Reserve AutonomousM2M for scheduled, non-user background workloads such as nightly log triage or batch reconciliation, paired with strict read-only scopes and endpoint allowlists.
Long-running workflows should break execution into discrete bounded tasks and request a fresh short-lived JIT token immediately before each tool invocation, rather than issuing a single multi-hour token at workflow start. If the user or agent is revoked mid-workflow, the very next task fails safely.
After verifying the JWT signature against JWKS, APIs inspect sub for the human user, verify aud and scope for authorization, and log the nested act claims so both immediate and upstream orchestrator agents appear in audit records.