Blank white background with no objects or features visible.

نقدم لكم وصولاً مجانياً إلى تقرير Gartner Hype Cycle الكامل حول حوكمة الذكاء الاصطناعي لعام 2026. احصل على نسختك →

The Identity-Broker Pattern for AI Agents: One Trust Boundary for Every Credential

By أشيش دوبي

Updated: November 1, 2026

Published: October 31, 2026

TL;DR:

Not every team has an identity provider that understands agents — and most want governed agents now, not after an IdP migration. The identity-broker pattern is the answer.

  • One component plays all three agent control-plane roles: it issues each agent's identity, authorizes every call, and mints scoped credentials for each hop. Your enterprise IdP still authenticates human users.
  • In TrueFoundry this is the default scenario. The gateway signs and validates the agent token itself, so there is no external token exchange to configure.
  • Every request carries two tokens: the user's token in Authorization and the agent's token in x-tfy-agent-authorization. The gateway checks both, then forwards with the target's outbound auth.
  • The gateway is the trust domain. Access comes from grants in one place: who may invoke an agent and whom it may act for, plus which targets it may reach.
  • It is not a dead end. You can move individual agents to Okta-, Entra- or SPIFFE-backed identities later — only the source of identity changes; the checks and governance stay the same. (Per-hop token issuance via the gateway as an STS is marked coming soon.)

The problem: agents arrive before agent-aware IAM

Enterprise IAM was built for humans and service accounts. Agents are neither: they act for a user, across several tools, often in chains. If your identity provider has no agent-identity capability — or you simply don't want to depend on one yet — you are left with the three bad options every agent deployment starts with: borrow the user's token, share a service account, or impersonate. All three break the audit trail, as we cover in what AI agent identity is.

The identity-broker pattern lets you skip the wait. One trusted component becomes the issuer and authority for agent identity, so you get governed agents today and keep the option to federate with your IdP later.

What the broker actually does

A broker takes on three roles that would otherwise be spread across your IdP, your app code, and each tool. With TrueFoundry as the broker, they map like this:

Role Played by
Identity provider (users) Your existing IdP / SSO, or a TrueFoundry personal access token
Identity provider (agents) TrueFoundry — mints a signed token per registered agent
Authorization Agent Gateway and MCP Gateway, from collaborator grants
Per-hop token issuance TrueFoundry as an STS (coming soon)
Third-party credentials MCP Gateway outbound auth (managed, client-credentials, or per-user OAuth)
One trust domain issues the agent credential, authorizes the call, and handles outbound auth.

How a call flows

Registration creates the agent's identity. The agent gets its token from the registry (via ⋮ → Get Token) and sends it with the user's token on every call:

Registering an agent. The broker scenario uses a TrueFoundry-backed identity; you can switch an agent to an IdP later. Source: TrueFoundry docs.
Authorization: Bearer <USER_TOKEN>
x-tfy-agent-authorization: Bearer <AGENT_TOKEN>

The gateway validates both tokens, checks whether the agent may reach the target MCP server and whether it may act for the user, then forwards the request using the target's outbound auth. Anything not granted is denied with a 403. Because TrueFoundry signs and validates both credentials, the gateway is the single trust domain — there is no external exchange to stand up.

Reaching third-party targets

The broker also solves outbound credentials, which is where most agent integrations actually stall. It offers three outbound modes depending on what the target supports:

Target type Outbound auth Who holds the credential
Internal MCP server that trusts the gateway No auth, or a managed header credential Gateway
SaaS API with app-to-app support OAuth2 client credentials Gateway, centrally
SaaS API needing per-user consent OAuth2 authorization code Gateway runs per-user OAuth, stores + refreshes each user's token

One caveat worth stating up front: an agent acting without a user cannot complete an authorization-code flow, because there is no human to approve the consent screen. For unattended agents, use a mode that does not need per-user consent. The outbound token model is the one we detail in OAuth and enterprise token management for MCP.

Where teams get this wrong

Thinking the broker is all-or-nothing. The other scenarios (Okta, Entra, SPIFFE) change only where the agent's identity comes from. You can mix scenarios per agent in one tenant, and the gateway checks stay identical.

Using an unattended agent with an authorization-code target. No human means no consent screen. Choose client-credentials or a managed credential for agents that run on their own.

Confusing reaching a target with acting for a user. They are separate grants. An agent that is a collaborator on a server still needs permission to act for the specific user it claims to represent — see fine-grained authorization.

Skipping the migration plan. The broker is the fast path, but if policy will eventually require all principals in the corporate directory, register agents in a way that makes the later move to Entra or Okta a config change, not a rebuild.

Want governed agents without waiting on an IdP migration?

When to choose the broker — and when not to

Choose the broker scenario when your agents are in-house and their targets are internal or reachable with gateway-held credentials; when you want governance running quickly; or when your IdP lacks agent support. Prefer an IdP-backed scenario when security policy requires every principal to live in the corporate directory, when you need IdP-brokered access to third-party SaaS (for example Okta Cross App Access, covered in TrueFoundry and Okta Cross App Access), or when agents already have Entra or Okta identities that other systems depend on.

A worked example

A team wants a research-agent to read Jira on behalf of users, but their IdP has no agent product enabled. They register the agent in TrueFoundry (broker scenario), grant the research team Agent Access so the agent may act for them, and add the agent as a collaborator on the Jira MCP server with a gateway-held credential. The agent pulls its token, sends it with each user's token, and the gateway authorizes the pair and forwards the call. Months later, when the org standardises on Entra Agent ID, they flip that one agent to identity-provider-backed — the collaborator grants and audit trail carry over unchanged.

Gotchas worth knowing

  • Per-hop STS issuance is marked coming soon. The planned model mints a short-lived, TrueFoundry-signed token at each hop with the user as sub and acting agents in act, narrowing audience and scope to the next callee.
  • Keep the agent token out of model-readable context. A prompted agent that can disclose its token can be impersonated.
  • Denied calls return `403`, naming the refused principal and reason — useful when a grant is missing on one of the two axes.
  • Per-user OAuth means the gateway stores and refreshes tokens; plan for that state and its encryption.
  • One tenant can mix scenarios. You do not have to pick broker or IdP for the whole estate — decide per agent.

The planned STS model, and why it matters

Today the broker signs one agent token per registered agent and checks it on every call. The piece marked coming soon in the docs is the gateway acting as a full security token service (STS) that mints a fresh, short-lived token at each hop of a chain. In that model the user stays as sub, every acting agent is recorded in a nested act claim, and the audience and scope narrow to the next callee — so a token minted for the research agent to call Jira cannot be replayed against Confluence. The payoff for a downstream MCP server is simplicity: it validates a single issuer (the gateway) rather than learning to trust every agent and IdP in your estate. If you are designing multi-agent chains now, build against the two-header model and treat per-hop STS as a drop-in hardening you adopt when it lands, not a rebuild.

Choosing a scenario

The broker is one of four identity scenarios, and the only thing that changes between them is where the agent's identity comes from. The gateway's authorization checks, collaborator grants, and audit are identical, which is what lets you mix them per agent in a single tenant.

Scenario Identity issued by External registration Best when
Broker (default) TrueFoundry None You want governance fast, or your IdP has no agent support
Okta Okta Yes You need IdP-brokered SaaS access (Cross App Access)
Microsoft Entra Entra Agent ID Yes You are Entra-standardised and want agents in the directory
SPIFFE/SPIRE SPIRE (attestation) Yes You want no stored secret and workload-derived identity

The practical pattern most teams land on: start every agent on the broker to get governed quickly, then migrate the handful that policy or integrations require into an IdP-backed scenario. Because the grants and audit carry over, that migration is a configuration change on one agent, not a project. The IdP-backed options are covered in TrueFoundry and Okta Cross App Access and the Entra and SPIFFE guides.

Outbound auth, decided per target

The inbound side (who the agent is, whom it acts for) is uniform; the outbound side (how the gateway authenticates to the tool) is chosen per target, and getting it wrong is the most common reason an otherwise-governed agent cannot actually reach a system. A quick decision guide: if the target is an internal MCP server that trusts the gateway, use no auth or a managed header credential; if it is a SaaS API that supports app-to-app access, use OAuth2 client credentials held centrally by the gateway; if it is a SaaS API that requires per-user consent, use the OAuth2 authorization-code flow, where the gateway runs per-user OAuth and stores and refreshes each user's token. The one hard constraint: an unattended agent — one acting with no user — cannot complete an authorization-code flow, because there is no human to approve the consent screen. Give such agents a client-credentials or managed-credential target instead, and plan encrypted storage for the per-user tokens the gateway holds, as covered in OAuth and enterprise token management for MCP.

Related reading

Conclusion

The identity-broker pattern exists because agents arrive faster than agent-aware IAM. Rather than wait, you let one trusted component issue agent identity, authorize every call, and broker credentials to each target — with your human IdP untouched. TrueFoundry plays that broker: it signs and validates both the user and agent tokens, governs the call from grants in one place, and keeps the door open to federate with Entra, Okta, or SPIFFE whenever you are ready.

It is the shortest path from agents running loose to agents under governance — without betting the estate on a single identity vendor.

Broker your agents' identity in one place.

Try now.

One gateway for all your models, MCP servers, and agents.
No credit card needed.

Start free
Table of Contents

One Gateway for Every LLM, Agent and MCP Server

Book a 30-min with our AI expert

Book a Demo

The fastest way to build, govern and scale your AI

Book Demo
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Discover More

No items found.
November 1, 2026
|
5 min read

The Identity-Broker Pattern for AI Agents: One Trust Boundary for Every Credential

No items found.
November 1, 2026
|
5 min read

Claude API Pricing: A Model-by-Model Cost Breakdown

No items found.
October 31, 2026
|
5 min read

Claude Code Subagents: What They Are and How to Use Them

No items found.
October 31, 2026
|
5 min read

Claude Code with Amazon Bedrock: Setup, IAM, and Cost Control

No items found.
No items found.

Recent Blogs

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.

Frequently asked questions

What is an identity broker for AI agents?

A component that takes on the agent control-plane roles your IdP and app code otherwise would: issuing each agent's identity, authorizing every call, and minting scoped credentials for each hop. In TrueFoundry the gateway is the broker, and it signs and validates the agent token itself.

When should I use the broker instead of my IdP?

When your IdP has no agent-identity capability, when you want governed agents quickly, or when your agents are in-house and their targets are internal or reachable with gateway-held credentials. If policy requires every principal in the corporate directory, use an IdP-backed scenario instead.

Does the broker replace my SSO?

No. Your enterprise IdP still authenticates human users. The broker only provides and governs agent identity, carrying the user's token alongside the agent's on every call.

How does the gateway reach third-party tools?

Through outbound auth on the MCP server: no auth or a managed header for internal targets, OAuth2 client credentials for app-to-app SaaS, or per-user OAuth (authorization code) when the SaaS needs per-user consent. The gateway stores and refreshes per-user tokens.

Can I move an agent to Okta or Entra later?

Yes. Only the source of the agent's identity changes; the collaborator grants, authorization checks, and audit trail stay the same. You can mix broker-backed and IdP-backed agents in one tenant.

What happens on an unauthorized call?

The gateway denies it with a 403 that names the refused principal and the reason — whether the agent lacked access to the target or lacked permission to act for that user.

Take a quick product tour
Start Product Tour
Product Tour