What you will learn
- Say what an AgentID is and in which identity server it lives
- Follow the identity from creation to four environment variables in the agent's pod
- Explain where the secret is stored and what happens when provisioning fails
- Tell rotating a secret from revoking it
Before you start
- MCP proxies, tools and scopes Not started In progress Done
- An AI request through the gateway Not started In progress Done
On this page
An agent that calls protected tools should not borrow a person’s login or share one broad key with other agents. Agent Manager gives each agent an identity of its own in each environment. That identity is the AgentIDA separate identity for one agent in one environment. It is held in that environment's ThunderID and lets the agent get tokens for tools.See it in the glossary.
Where the identity lives
The AgentID lives in the ThunderIDThe open source identity server Agent Manager uses to sign people and services in and to issue signed tokens. The older name Thunder survives in some chart and folder names.Analogy:The passport office that issues the signed documents every checkpoint reads.See it in the glossary of one environment, so each environment has its own client id and secret for the same agent. It is a client that signs in with a client id and a secret through the OAuth client credentialsA way for a program, with no human involved, to swap its client id and secret for a token. Services and agents use it to call other services.See it in the glossary grant.
From a new agent to a ready identity
AMS lists the environments
This runs as the last part of agent creation, after the earlier steps have succeeded, so a hiccup at the identity server does not undo an otherwise good agent. AMS lists all the environments of the organisation, not only the ones in the project’s pipeline.
A PENDING note is written for each environment
Before the real work, AMS writes one row per environment in its table
agent_thunder_clientswith the statusPENDING. These notes are what let it try again later. A background attempt then starts for each row, separate from the HTTP request.The identity is created
AMS asks the environment’s ThunderID to create the agent. The request asks for the client credentials grant. The reply holds the agent id, a client id and a client secret. If the agent already exists, AMS looks it up by name and rotates a fresh secret, because ThunderID does not return an existing one.
The secret goes to the secret store
The secret is written through OpenChoreo’s secret API as a secret named after the agent and the environment, and OpenChoreo manages a SecretReferenceA pointer to a secret value that OpenChoreo keeps in its secret store. Agent Manager keeps only its name, and the data plane copies the value into a Kubernetes Secret.See it in the glossary behind it. AMS keeps only that name. The row becomes
COMPLETED. The secret is not stored in AMS’s database.A worker retries failures
The ReconcilerA background worker that keeps looking for unfinished work and retries it. The AgentID reconciler in AMS ticks every minute and retries identity rows that are not finished yet.See it in the glossary ticks once a minute and picks up
PENDINGrows that are due. A failed attempt is retried 3 minutes later. After 5 attempts in total the row becomesFAILED, and a person can retry it from the console, which resets it toPENDING.AMS works out the scopes to ask for
It collects the scopes of the MCP proxies the agent is connected to in that environment and writes them as
<proxy handle>:<action>. This is a wish list, not the final permission. The roles that actually grant scopes to the AgentID are separate objects in the environment’s ThunderID.Four variables are injected and the pod restarts
When the agent has a release binding, AMS adds four environment variables to it, and the pod restarts to pick them up. If there is no binding yet, the variables arrive with the first deploy.
| Variable | What it holds |
|---|---|
AMP_AGENTID_CLIENT_ID | The client id, as plain text |
AMP_AGENTID_CLIENT_SECRET | A reference to the synced secret, not the secret itself |
AMP_AGENTID_TOKEN_ENDPOINT | The token address of the environment’s ThunderID |
AMP_AGENTID_SCOPES | The sorted scope list, joined by spaces |
AMS only injects the variables. The agent’s own code uses them to ask for a token and then presents it to a gateway proxy, as lesson L4.3.2 showed. This is for a platform-hosted agent. For an external agent, AMS keeps only the client id and does not store a secret.
Rotate and revoke
Rotating asks ThunderID for a new client secret. For a platform-hosted agent the new secret is stored, and the running pods are restarted so that they use it. The old secret stops working.
Revoking also rotates the secret, but throws the new one away, deletes the stored copy and removes the variables from the running agent. It works as a kill switch for that agent in that environment.
Your turn
Under Try it, play flow F13 and, at each step, answer one question: what does the agent’s pod hold now? Then open the credentials map and find the row marked as designed, not built yet: it is the OBO token from the callout, which does not exist today. Finish with the matcher.
Recap
- An AgentID is one identity per agent and environment, held in that environment’s ThunderID.
- AMS writes a
PENDINGrow first, creates the identity, stores the secret through OpenChoreo and keeps only its name. - A reconciler retries failures once a minute. After 5 attempts the row is
FAILED. - Four
AMP_AGENTID_*variables reach the pod. The secret one is a reference. - Rotate gives a new secret. Revoke also removes the stored copy and the variables, for that agent in that environment.
Wrap up
Recap
Tick each one when you could explain it to a colleague.
Finished?
Chapter complete. Every lesson in this chapter is done.
Progress cannot be saved in this browser, so it will be forgotten when you leave this page.
Quick check
Spotted something wrong or unclear in this lesson? Report an inaccuracy (opens GitHub in a new tab)