Secrets and Credential Isolation
In this article
- Spot every place a secret can leak in an agent: the prompt, the tool config, a log or trace, and a tool result.
- Explain why a long-lived key or the user's full token should never sit where the model or tool code can read it.
- Trace a tool call in which a broker hands the dispatcher a short-lived token for one action, and the model never sees it.
- Terms defined here: secret isolation, credential brokering, short-lived credential.
Overview
An agent that sends mail has to prove to the mail service that it is allowed to. That proof is a secret: an API key or an access token, a string that proves who is asking. Where the secret lives while the agent works decides whether one line of hostile text on a web page can make the agent hand it over.
You will find every place a mail secret can leak (the prompt, the tool config, a log, a tool result), see why a person's own login token is too wide to give an agent, and move the secret behind a broker that gives each send a token valid for five minutes and one action.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- The key in the prompt
- Where else a secret leaks
- A broker in front of the mail API
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions