Skip to main content

Identity and delegation

Every call an agent makes says two things: which person it is for, and which agent is making it. Neither is claimed by the agent. Both are in a token the identity provider issued.

Your identity providerEntra, Okta, Ping
federates
Identity providerknows each org's people, roles and agents
Person
Console
person's token
Way inTenant API
OBO token
Agent sandbox
Runtime
OBO token
Way outAI gatewayholds the keys
credential
Outsidemodels, services, APIs

A solid line is a call. A dashed line is a check against published keys, with no call.

Why it exists​

An agent that acts with one shared service account can do whatever that account can, for anyone, and afterwards nobody can say who it was acting for. Giving each agent its user's own token is worse: the token sits in the agent's process for as long as it runs.

The answer is a third token. The identity provider takes the person's identity and the agent's identity and issues one token that names both. It is an on-behalf-of token, an OBO token: for this person, by this agent. That is the only thing the agent's side ever holds.

The path, step by step​

PartyWhat it does
1PersonSigns in once. With your own identity provider if the org has federated it, under your rules for passwords and second factors
2ConsoleKeeps the sign-in and sends the person's token with each request
3Tenant APIThe way in. Verifies the person's token, then exchanges it at the identity provider for an OBO token that also names the agent
4RuntimeRuns the agent in its sandbox. It holds the OBO token and nothing else: not the person's token, not a credential
5AI gatewayThe way out. Verifies the OBO token, checks that this agent, for this person, may make this call, then adds the credential only it holds
6OutsideA model, an internal service or an external API gets a call it can attribute

The identity provider​

It is beside the path, not on it. It does three things.

WhenHow
Signs people inOnce per personA call. It federates to your own provider where an org has one
Issues the OBO tokenWhen a thread starts for a personA call: a token exchange, as RFC 8693 defines it
Lets the AI gateway verifyOn every model and tool callNo call. The AI gateway checks the token's signature against the keys the provider publishes

So the provider is not in the way of every call, and an agent's call does not wait on it.

It knows each org's people, their roles, and the org's agents. An agent is an identity there in its own right, which is what lets a token name it.

The OBO token​

Its claims are the ones RFC 8693 names.

ClaimExampleMeaning
subj.riveraThe person it is for
act.subagent:credit-analystThe agent acting
audthe org's AI gatewayWho may accept it
scopewhat was asked for, and no more than the person hasWhat it may be used for
expminutes from nowWhen it stops working

When one agent opens work for another, the earlier agent is kept inside act, so the chain can be read back: this agent, for that agent, for this person.

What it controls​

  • An agent can do no more than its person. The token's scope is what was asked for and what the person has, whichever is less.
  • An agent can do no more than it was given. The AI gateway checks the agent against the connectors and tools it was granted.
  • A person's own account is used only for that person. A connector a person connected for themselves is opened only by a token whose sub is that person.
  • Disabling a person stops their agents. A person removed at the identity provider gets no new token, so work that acts for them stops at its next step.

What never reaches the agent​

Where it stays
The person's tokenAt the Tenant API. The runtime and the agent never hold it
A credential for a systemAt the AI gateway. The agent and the model never see it
A key that signs tokensAt the identity provider

What it leaves behind​

Every step of a thread's record says who it was for and which agent acted, taken from the token and not from what the agent reported. "Who authorised this call" has one answer.

What always holds​

  • Every call names a person and an agent.
  • The agent holds one short-lived token and no key.
  • The AI gateway decides on what the token says, not on what the agent says.
  • Least privilege is the smaller of two things: what the person may do, and what the agent was given.