ON-PREM CHOREO CLOUD BOTH

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

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 .

Where the identity lives

The AgentID lives in the 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 grant.

Component

AgentID

Shared or other Other BOTH

AgentID is the identity an agent uses to call protected tools. Agent Manager creates one for each agent in each environment, as an agent identity in that environment's ThunderID. For a platform-hosted agent it also stores the credential safely and puts four environment variables into the running pod, named AMP_AGENTID_CLIENT_ID, AMP_AGENTID_CLIENT_SECRET, AMP_AGENTID_TOKEN_ENDPOINT and AMP_AGENTID_SCOPES.

Flow

AgentID, from creation to a token the agent uses

F13 10 steps ON-PREM

When an agent is created, Agent Manager gives it an identity in each environment's identity provider, stores the secret safely, injects four environment variables into its pod, and the agent uses them to get tokens for MCP proxies. Secrets can be rotated without changing code.

From a new agent to a ready identity

  1. 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.

  2. A PENDING note is written for each environment

    Before the real work, AMS writes one row per environment in its table agent_thunder_clients with the status PENDING. These notes are what let it try again later. A background attempt then starts for each row, separate from the HTTP request.

  3. 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.

  4. 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 behind it. AMS keeps only that name. The row becomes COMPLETED. The secret is not stored in AMS’s database.

  5. A worker retries failures

    The ticks once a minute and picks up PENDING rows that are due. A failed attempt is retried 3 minutes later. After 5 attempts in total the row becomes FAILED, and a person can retry it from the console, which resets it to PENDING.

  6. 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.

  7. 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.

VariableWhat it holds
AMP_AGENTID_CLIENT_IDThe client id, as plain text
AMP_AGENTID_CLIENT_SECRETA reference to the synced secret, not the secret itself
AMP_AGENTID_TOKEN_ENDPOINTThe token address of the environment’s ThunderID
AMP_AGENTID_SCOPESThe 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 PENDING row 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.

Try it

Follow one request

What to do: press Play, or use Next, to walk through the request step by step.

Loading the diagram...

The credentials map

What to do: click a credential to see who holds it, who checks it and where it travels.

Loading the simulator...

Match them up

What to do: pick an item on the left, then its partner on the right.

Loading the matching game...

Wrap up

Recap

Tick each one when you could explain it to a colleague.

Finished?

Quick check

Loading the quick check...

Spotted something wrong or unclear in this lesson? Report an inaccuracy (opens GitHub in a new tab)