What you will learn
- Follow a secret from the person who typed it to an environment variable in the agent's pod
- Say what Agent Manager stores about a secret, and what it does not
- Explain what a SecretReference is and what the External Secrets operator does
- Name the two exceptions that do not take this route
Before you start
- Organisation, project, agent and environment Not started In progress Done
An agent often needs a secret: an API key for a tool, a password, a token. You type it into a form, and a moment later the running agent can read it. In between, it must not end up in the agent’s configuration, in a log or in a database that many people can read. Agent Manager has a short path for that.
The idea
Agent Manager hands the secret value to OpenChoreo and keeps only the secret’s name. The pod then receives the value through a Kubernetes mechanism, and the agent reads it as an ordinary environment variable. This lesson follows the proxy API key that a platform-hosted agent receives, and every other secret that Agent Manager stores through its secret client takes the same route.
The route
AMS decides where the secret lives
Before storing anything, AMS builds an address for the secret from the organisation, project, environment and agent names. A name that contains a slash is rejected.
AMS gives the value to OpenChoreo
On-prem, AMS writes the value through the OpenChoreo secret API. It does not talk to the secret store itself. On Choreo Cloud (SaaS)The hosted Agent Manager that Choreo Labs runs for customers. People sign up and use it instead of installing it.See it in the glossary the same call goes to a front desk called secret-manager-api, which finds the organisation from the caller’s token and forwards the write.
OpenChoreo stores the value and leaves a signpost
OpenChoreo puts the value in its secret store and records 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. The signpost says where the value is, but it does not contain it.
AMS keeps only the name
AMS writes down the name of the signpost in its own database. Someone who read that database would find names, not passwords.
AMS tells OpenChoreo which secret the pod needs
It adds a line to the agent’s deployment that says environment variable X comes from that secret. OpenChoreo turns the deployment into Kubernetes objects and the data plane applies them.
A helper copies the value into the pod's secret
The External Secrets operatorA helper in the data plane that reads the secret store and copies a value into an ordinary Kubernetes Secret, then checks again so changes follow.See it in the glossary in the data plane reads the secret store and creates an ordinary Kubernetes Secret with the value. It checks again every so often, so a changed secret follows along.
The pod starts with the variable set
Kubernetes puts the secret into the agent’s environment. The agent reads a normal variable and does not know where it came from.
In the local quick start, the secret store is OpenBaoA secret store. In the local quick start it holds agent secrets behind OpenChoreo's secret references, in development mode. The store is a pluggable part.See it in the glossary. The store is a pluggable part behind the secret client.
Two exceptions
Not every secret takes this route.
- Git credentials for private repositories. To list the branches and commits of a private repository, AMS looks up the signpost and then fetches the password from the secret store itself.
- The upstream key of an LLM provider. AMS keeps it in its own database, encrypted with a key that only AMS holds. It is decrypted only when the gateway asks for its configuration.
Your turn
Open Try it and play flow F15. At which step does the value stop being in AMS’s hands, and which step creates the signpost? Then play the matcher: pair each stop on the path with what happens there.
Recap
- AMS gives the secret value to OpenChoreo and keeps only the secret’s name.
- OpenChoreo stores the value and creates a SecretReference, a signpost that says where the value is.
- The External Secrets operator copies the value into a Kubernetes Secret, and the pod reads it as an environment variable.
- Git credentials for reading private repositories and the upstream keys of LLM providers are the two exceptions.
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)