Skip to content

Vault

The Vault keeps the secrets, environment values and credentials of a project in one place. Open it in the dashboard under Settings > Vault (project admins write, developers see the list) or use the Management API.

Kind Use it for Read back
secret API keys, tokens, passwords Never
env plain configuration such as a region or a base URL An admin can read it with ?reveal=true (audited). Injected into Edge Functions.
credential structured values: OAuth tokens, a database DSN (send a JSON object or a string) Never. Metadata stays visible.

Values are encrypted with your project key, which is itself wrapped by the instance master key (BASE_MASTER_KEY). They live in a schema that only the API server can read, so Row Level Security, logs and database dumps never contain a readable value.

An entry is readable only by the consumers you grant. An entry with no grant cannot be read by anything.

Grant Consumer
outbox webhooks and outbound HTTP
auth auth providers (an OAuth secret_name)
storage BYO S3 access keys
function:* all Edge Functions of the project (secret and env entries become environment variables)
function:name, flow:name, plugin:name, connector:name stored for the upcoming plugin framework

Every read is recorded in the audit trail with the entry, version, consumer and time, never the value.

Use vault://NAME where the value should go. In a webhook header it looks like this:

Authorization: Bearer vault://STRIPE_API_KEY

Base fills it in when it sends. If the entry does not exist or the consumer is not granted, the delivery fails with a clear error instead of sending an empty value. References work in the URL and in headers, not in the body (a webhook body carries row data that end users can influence).

A webhook can only receive an entry through vault:// when the entry lists the webhook’s host. This keeps a reference from sending a secret to a server you did not choose.

  • When you add an entry, fill Allowed hosts (for example hooks.example.com). To change it later, press Hosts on the entry’s row.
  • Use exact host names in lower case, up to 20, separated by commas. No scheme, port or path, and no wildcard in the dashboard (the API also accepts *.example.com).
  • An entry with no allowed hosts is never sent to a webhook. The host must be written out in the webhook URL: a reference or {{...}} inside the host part is refused.
  • vault:// is resolved only in webhooks you saved through the Management API. Rows that SQL puts in the outbox with http_request keep the text as is.

If the host does not match, the delivery fails with “unknown or inaccessible Vault entry” and nothing is sent.

Rotate an entry from the dashboard or with the API:

Terminal window
curl -X POST https://api.example.com/v1/projects/my-app/vault/STRIPE_API_KEY/rotate \
-H "Authorization: Bearer $PAT" -H "Content-Type: application/json" \
-d '{ "value": "sk_live_new", "grace_seconds": 3600 }'

The new value is served at once. The previous version keeps working for grace_seconds (an hour unless you change it, up to 30 days) so you can update the other system, then it is deleted. An entry can also carry an expires_at: after that date it is no longer served, and the list flags it expiring for the last 7 days and expired after.

All routes are under /v1/projects/{ref}.

Request Role What
GET /vault developer Metadata of every entry. Never a value.
POST /vault admin Create { name, kind, value, grants, expires_at, grace_seconds }
GET /vault/{name} developer Metadata. ?reveal=true returns the value of an env entry to an admin.
PATCH /vault/{name} admin Change grants, meta, expires_at, grace_seconds
POST /vault/{name}/rotate admin New version { value, grace_seconds? }
DELETE /vault/{name} admin Delete the entry; the audit trail stays
GET /vault-audit admin Audit trail, newest first (name, limit, before)
POST /vault-migrate admin Import existing secrets { dry_run }

Names use letters, digits, _, . and - (up to 128 characters). A value is up to 16 KB. A project can have 500 entries.

Project secrets, function secrets and BYO S3 keys keep working. The Vault is read first and the old store is the fallback, so nothing breaks if you do nothing. To bring them in, use Preview import then Import now on the Vault page (or POST /vault-migrate).

  • The import copies, it never removes or changes an old value, and you can run it again.
  • If the same name holds different values in two places, the entry is left alone and listed under conflicts so you can decide.
  • Project secrets get the grants outbox and auth, function secrets function:*, and BYO S3 keys storage.
  • If you keep writing through the old endpoints, the new value is also written to the Vault entry with the same name, so the Vault never serves an older value.

Secrets that the platform manages itself (webhook signing secrets, the SMTP password, auth hook and OAuth client secrets, log drain credentials) stay where they are for now.

Changing the instance BASE_MASTER_KEY only re-wraps project keys and does not touch Vault entries. Follow the master key rotation runbook in the operations docs and keep BASE_MASTER_KEY_DERIVE_ID on the original key.