Let agents use secrets they never see
Your agent needs the Stripe test key, the GitHub token and the staging database. You do not want any of them in a prompt, a log or a transcript. With Marshal the agent works with real access while the real values stay with Marshal, and a key can only ever reach the hosts you named for it.
The result
- The agent calls your APIs with a placeholder. Marshal puts the real key in on the way out.
- A key sent to any host you did not list is blocked before it leaves the space, and the attempt is recorded.
- Git tokens and database passwords go to the tool, not to the agent.
- Rotating a key is one change in one place. New spaces get the new value with nothing else to edit.
How it works
The acme/payments team saves its Stripe test key once as an HTTP secret, with the env var STRIPE_API_KEY and the host https://api.stripe.com/**. In a space, the agent sees only a placeholder in $STRIPE_API_KEY and uses it like the real key. Every outbound call passes through Marshal. On a call to api.stripe.com, Marshal swaps the placeholder for the real value in the URL, the query string, the headers, or a JSON or form body. If the same placeholder heads for any other host, Marshal blocks the request with possible secret-exfiltration attempt and records a blocked security event, http_secret.misdirected. The network policy still decides which hosts the space can reach at all.
What you use
| Piece | Its role here |
|---|---|
| Credentials and connections | Stores each value encrypted. Nobody can read it back, admins included. |
| Add an HTTP secret | The placeholder swap for any HTTP API, only for the hosts you list. |
| Manifests and stacks | Binds credentials by name, so every space and run from the manifest gets the access. |
| Network policy | Decides which hosts a space can reach. Admin deny rules come first. |
| Owners, teams and scope | Who owns a secret, and who may use it without seeing it. |
| Audit log | Records each blocked call, with a shield icon on security events. |
Build it
- Open Connections, and on the HTTP Secret card select Connect. See Add an HTTP secret.
- Enter a Name, the Env var
STRIPE_API_KEY, the Secret value, and the hosthttps://api.stripe.com/**under Hosts. - Choose the Owner: just you, a team, or everyone in the organization.
- In a running space, open the Secrets tab and select Add on the secret. It turns Active with no restart.
- Bind Git and other tool credentials in the manifest, for example a team GitHub credential. See Connect GitHub.
- Check the space’s network policy allows the API host. See Approve a blocked domain.
- Ask the agent to call the API, then open Audit to see every request it made. See Read the audit log.
Make it yours
- Match the key’s shape. Some tools check that a key starts with
sk_. Set a Placeholder prefix and Total length under Advanced, and the placeholder passes the check. - Share without handing over. Share the secret with the Platform team for use. They bind it, and nobody on the team sees the value or can share it on. See Share a credential with a team.
- Keep the database password out of reach. Add the
postgrespackage. The agent runspsqlagainst a local socket, and the password stays with Marshal. - Lock the network down too. Attach a policy with deny rules for paste sites to the stack. No package and no manifest allow list can reopen a host the policy denies.
Next
Related
- Network and egress help
- Network policy
- Admin dashboards: the Credential Inventory on Security
- A governed dev environment for every engineer