ON-PREM CHOREO CLOUD BOTH

What it is

Token exchange is a ThunderID grant based on RFC 8693. A caller presents an existing token and asks for a new one for a different audience, and, when an actor token is also supplied, the new token can name the actor. ThunderID supports it, but Agent Manager does not use it yet.

Why it exists

It is the mechanism behind acting on behalf of a user, where an agent should use the user's limited rights, not its own broad ones.

How it works

  • The request needs a subject_token and its type. An actor token is optional.
  • The subject token's issuer must be a registered trusted issuer, and its audience must be acceptable.
  • The result is bound to one resource server, and the standard audience parameter is ignored.
  • An act claim naming the actor is added only when the request carries an actor token.
  • Agent Manager's service has no code that calls this. Only the reference agent scout-agent does, and it sends no actor token.

Identity and access

The agent authenticates with its own client id and secret, and supplies the user's token as proof. The new token keeps the user as sub. If an actor token is supplied, its subject appears in the act claim.

Key facts

Standard
RFC 8693
Handler
granthandlers/token_exchange.go
Used by Agent Manager
Not yet
Side
Identity
Namespace
amp-thunder

Inside and around

Contains: ThunderID OAuth2/OIDC server