Skip to main content
Vault holds Account secrets and lets you explicitly authorize a Computer or Sandbox to use them. Secret reads return metadata, never the stored plaintext. The Guest receives a placeholder, and supported outbound HTTPS requests substitute the real value only in the Authorization header to an allowed hostname. Use Vault for credentials whose target API accepts this pattern. It is not a general-purpose .env synchronization service, arbitrary file-secret store inside the Guest, SSH-key manager, or substitute for a third party’s authentication setup.

The three decisions

A new Computer or Sandbox does not automatically get every Account secret. A grant cannot widen the secret’s hostname policy. Before creating the secret, choose the intended Machine, confirm its need, and identify the provider’s actual API hostname. Do not confuse the provider’s website or sign-in host with its API host.

Create a secret

In the Console, open Secrets → New secret. Fill in Name, Environment variable name, Allowed API domains and Secret value, then choose Save secret. For an explicit Machine grant, open its Settings and use Available secrets → Add secret; on a Computer, this section is under Configuration. Allowed hosts are exact DNS hostnames: one to twelve entries. Do not include https://, paths, ports, IP addresses, or wildcard patterns. For example, api.example.com does not authorize uploads.example.com. With the SDK, obtain the new secret value from your trusted caller’s secret store or environment. Do not include the value in source code, a command argument, or logs:
The success response contains metadata including id, name, env_name, allowed_hosts and timestamps. It does not echo value. Store the returned ID; future operations use it. If creation returns UNKNOWN, list metadata and reconcile the intended name and environment variable before another create. Do not keep creating secrets because a response was lost. To inspect without revealing plaintext:

Grant one Machine

For a Computer:
For a Sandbox, use deepest.sandbox(sandboxId).secretGrants.grant(secretId). The same list and revoke methods exist on each target. Each Machine may have up to 16 Vault grants. Read the returned disposition before using the secret: First authorization on a Running Machine can require restart. Vault never silently restarts your Computer. A successful grant record is not proof that the current process can already use the new environment variable. After the planned Start, query:
Confirm the intended secret and current disposition. Avoid dumping all Guest environment variables.

Use the placeholder inside the Guest

When the grant is active, programs in the Machine use the configured Guest environment variable. The variable contains a placeholder, not the stored value. The platform substitutes that placeholder in a supported outbound HTTPS Authorization header for an exact allowed host. In the Computer or Sandbox, replace the endpoint below with a non-echo, authorized provider endpoint on the allowed hostname:
Choose an endpoint that accepts Bearer authentication; some providers require a different Authorization scheme. The placeholder must appear in the supported header. Do not put it in a URL, request body, custom header, SSH command, or arbitrary file and assume substitution will occur. Verify the expected provider status and response structure without printing the credential. The example does not bypass provider permissions, subscription requirements, rate limits or billing. It also does not follow redirects: if a provider requires a different hostname, review that actual destination instead of broadening the policy blindly. For a library, configure its authentication header from process.env.EXAMPLE_API_TOKEN or the corresponding Guest environment-variable mechanism. Confirm that the library actually uses the HTTPS Authorization header. A library that requires a different credential transport may not be compatible with Vault’s Authorization-header substitution model.

Rotate a value

Obtain the replacement value from your trusted caller:
Review the per-Machine effects. Same-policy rotation can apply live to subsequent connections. Existing connections may retain earlier configuration; test with a new connection. Changing allowed_hosts requires a new plaintext value in the same rotation request. This prevents a caller who does not know an existing value from redirecting it merely by changing its destination policy. A host-policy change removes the old live substitution; the new policy applies on the next explicit Start. Honor each Machine’s returned disposition and arrange any Stop/Start disruption explicitly. Rotating the value in Deepest does not revoke the old token at its issuing provider. Complete the provider’s own rotation/revocation procedure when needed.

Revoke a grant or delete a secret

To withdraw one Machine’s access while keeping the Account secret:
Query the target’s grants and verify that a new application connection can no longer use the substitution. Existing connections are not guaranteed to lose credentials instantaneously. To remove the secret from the Account entirely, use deepest.vault.delete(secretId) after confirming it is no longer needed. Deletion removes its grants too. It does not delete an external provider account or revoke the provider-issued token. For uncertain results, query metadata and each affected target before more changes.

Clone, snapshot, restore, and expiry

A disk can still contain credentials you manually wrote yourself, including third-party login files. Vault does not retroactively scrub those files or prevent them from being copied by Clone/Snapshot. Keep Account Agent Keys outside untrusted Guest environments.

What Vault protects—and its limits

Stored secret values are encrypted at rest. List/get responses expose metadata only. The supported request path reduces plaintext copies in Guest environments, source files, prompts, and platform logs. It does not provide an absolute “a program can never obtain this secret” guarantee. An allowed endpoint could echo credentials or return other sensitive data; an authorized application can misuse its granted provider permissions. Grant minimal provider scope and exact destinations, and do not select an echo endpoint for verification. An Account-level Agent Key is a strong control credential. Vault does not turn such a key into a Machine-scoped identity or isolate it from all Account-management actions.

Troubleshoot by evidence

For an Agent: find metadata, select only the target needed for the task, grant explicitly, honor disposition, verify a fresh provider request, and revoke temporary access when it is no longer necessary. Never treat a missing success response as permission to repeat a rotation or restart a working Computer. Precise field schemas and errors remain in the Vault and Machine Secret Grants sections of the API reference. Related tasks: Sandbox lifecycle, Clone, and Snapshots and restore.