Security
Vault
Agents need credentials to call real APIs, but a key in the prompt is a key in the logs. The vault lets an agent use a secret by name while the model only ever sees [REDACTED].
Store a secret
curl -s -X POST https://gateway.tollgate402.com/vault/secrets \
-H "Authorization: Bearer $TOLLGATE_ADMIN_KEY" \
-d '{"name":"MARKETDATA_API_KEY","value":"mk_live_…","hosts":["api.marketdata.app"]}'Use it from an agent
Reference the secret with a placeholder. The gateway swaps it in at egress, only for the allowed host.
{
"url": "https://api.marketdata.app/v1/quotes/HOOD",
"headers": { "Authorization": "Bearer {{secret:MARKETDATA_API_KEY}}" }
}Guarantees
- Secrets are sealed with AES-256-GCM using a per-secret nonce; the key lives in
VAULT_KEY, never on disk. - Substitution happens in the vault process, after the request leaves the agent's context.
- Responses are scanned for every stored value and its common encodings, and matches are replaced with [REDACTED].
- A secret attached to a host outside its allow-list is refused with
403 vault_host_denied.