ON-PREM CHOREO CLOUD BOTH

What it is

The agent token manager is the part of the Agent Manager service that signs access tokens for agents and publishes the public keys needed to check them. A token is a JWT (JSON Web Token, a signed piece of text) that names one agent in one environment. The service signs it with an RSA private key (RS256) and lists the matching public keys as a JWKS (a JSON list of public keys) at /auth/external/jwks.json.

It is a ticket booth that stamps every ticket with a seal. Anyone at the gate can compare the seal with a published picture of it, without phoning the booth.

Why it exists

An agent that runs outside the platform needs a credential the gateway can check without asking Agent Manager every time. A signed token plus published public keys gives it that.

How it works

  • A user who holds the amp:agent:token-manage permission calls POST /orgs/{org}/projects/{project}/agents/{agent}/token and names the environment.
  • The service looks up the agent, project and environment in OpenChoreo and writes their ids into the token claims (component_uid, project_uid, environment_uid), together with the caller's org_id and the namespace. The subject is the agent name.
  • It signs with the active private key and puts the key id in the kid header. The default lifetime is 2160 hours (90 days). A caller may ask for another lifetime, up to 10 years.
  • After signing, it writes an audit record before returning the token, and it refuses to hand the token out if that record cannot be saved.
  • GET /auth/external/jwks.json needs no sign-in and returns every configured public key, so a gateway can check a token by picking the key that matches its kid. The on-prem install lists this URL as a key manager named agent-manager-service in the gateway's jwt-auth policy.

Identity and access

The caller needs a user token with the amp:agent:token-manage scope. The signing key pair comes from files on the service: the private key path (JWT_SIGNING_PRIVATE_KEY_PATH, default keys/private.pem) and a list of public keys (default keys/public-keys-config.json).

Key facts

Algorithm
RS256
Default lifetime
2160 hours (90 days), at most 10 years
Public keys
GET /auth/external/jwks.json (no sign-in)
Permission to mint
amp:agent:token-manage
Default issuer
agent-manager-service (JWT_SIGNING_ISSUER)
Runs in
The Agent Manager service
Namespace
wso2-amp

Inside and around

Part of: agent-manager-service (AMS)