Managed secrets (SP Vault Connect / Agents) — separate threat model
This subsystem is not zero-knowledge. To call an API or sign a payload on behalf of a workload while the owner is away, the server must be able to use the secret. Everything here is therefore weaker than the personal vault and is kept apart from it: different process, different table, different key, different UI section, and a banner that says so.
What it is for
API tokens, webhook signing keys and deployment credentials used by CI jobs, services and AI agents — secrets
that would otherwise sit in .env files and agent prompts. Not for personal passwords.
Design
services/managed-secretsruns as its own process bound to127.0.0.1. It alone holds the master key file (0600, never in the database, never in backups of the database, never in the manifest). Values are stored as AES-256-GCM ciphertext underHKDF(master, account_id)with the secret id, account and version as AAD.- The API process authenticates to it with a token file and never stores values. It holds identities, grants, approvals, leases and the audit log.
- Brokered operation first:
operategrants let a workload ask for an HTTPS call or an HMAC signature. The credential is injected inside the managed process; the workload receives the upstream response, with any echo of the credential removed. Upstream hosts are an explicit allow-list per secret; plain HTTP, redirects, private and loopback addresses are refused. - Raw delivery is the exception:
readgrants return the value, always after a human approval for that single delivery. The product states that the recipient can then disclose it and that revocation cannot undo it. - Workload identity: each identity has a P-256 key; every request is signed over method, path, timestamp, nonce and body hash (replay-protected). No bearer token exists to leak in logs.
- Agents can never be granted unattended access:
approvalislease(a human opens a short window) oreach. Approvals are bound to the exact operation displayed (method, URL, body hash) and are single-use. - Kill switch: one action suspends every identity of the account and ends all leases; releasing it does not restore leases.
- Prompt injection: the approval screen is built from structured request fields. Text supplied by the agent is truncated, stripped of control and bidirectional characters, and displayed in a box labelled untrusted. Upstream responses are returned to the agent as data and are never interpreted by SP Vault.
Who can read a managed secret
| Actor | Can read? |
|---|---|
| Operator / root on the node, or anyone who steals the master key file and the database | Yes |
| Database or database-backup thief without the key file | No |
| API process compromise | Can ask the managed process to use or reveal secrets (it is the policy enforcement point) |
Workload with an operate grant |
No (can use it within policy) |
Workload with a read grant after approval |
Yes — by design |
| Another account | No (tenant id is part of the key derivation and of every query) |
Residual risks
A malicious allow-listed upstream can observe the credential (it is its own credential). DNS rebinding between the address check and the connection is not fully closed. A compromised agent can misuse an open lease within the grant's constraints until it expires or the kill switch is used: keep leases short and constraints narrow.