Vault

The Vault entry in the rail holds every value the configuration refers to, in one place. Two kinds live in one namespace:

Kind Read back For
Secret Never. Encrypted at rest, and the API says it is set, not what it is A client secret, an SMTP password, an HMAC key
Value Yes, in the clear A URL, a base DN, a client id - anything that is not a secret but changes per environment

Both are referenced the same way, $name, wherever a field accepts one. That is the point: promoting a value to a secret never touches what points at it.

The Vault screen: three entries - two secrets and a value - with their kind, their value and what uses them

Two secrets reading encrypted, never shown, one value readable in the clear, and the Used by column naming the route that points at each one.

The list

Name and description, kind, value (or encrypted, never shown), and Used by - the column that tells a live entry from a leftover. Clicking a row opens the editor; the + creates an entry.

A secret this gateway's master key cannot open reads cannot be decrypted with this master key, and a line above the list counts them. It is what a migration under another key leaves: every name is listed and none of the values resolves. The gateway checks each secret by opening it, and sends a yes or a no - never the value. Start it with the key the secrets were sealed with (MEERKAT_VAULT_KEY, or MEERKAT_VAULT_KEY_PREVIOUS while rotating), or type each value again.

An entry that holds no value says so. It is what an import leaves: a configuration carries the names its routes expect, never their values - a secret's least of all - so the import creates each missing one empty, and it resolves to nothing until somebody fills it. An entry past its reminder date reads expired on that day. Those entries come first in the list, marked on their left edge. A notice above the list counts each kind, and its Show only these narrows the list to them; Vault in the rail carries a badge while one is left that you can fill.

The Vault after an import: two entries with no value and one past its reminder date come first, marked on their edge, under one notice that counts them

Used by gives one chip per kind of user: an entry several git locations share reads git location: platform, billing, storefront +2, the full list under the pointer.

An entry carries:

Where entries come from

Most are created from the field that needs them. A sensitive field offers Move into the vault, and refuses to be saved as a literal: the administrator holds the value, so they are the one who files it. A field that accepts a plain value offers the same for values.

Which means the usual order is the opposite of what you might expect: you fill in a relay, an authority or a certificate, and the vault entry appears as a result.

A reference is written $ and the entry's name, wherever a field accepts one. Here the Billing route sends the value support-email to its service as a request header: the field reads $support-email, and the gateway puts support@acme.example in the header on each request.

The Incoming section of the Billing route: a set-request-header filter whose value is the vault reference $support-email

Create an entry by hand

For a value no field offers to file, a URL several routes share for instance:

  1. Open Vault in the rail and click the + button (New entry).
  2. Type the Name, support-email: it is what $support-email will say.
  3. Choose the Kind: Value for something readable, Secret for something that must never come back.
  4. Type the value, and a Description for whoever finds it in six months.
  5. Click Save. Check: the entry is in the list, and its Used by reads not used until a field refers to it.

The vault as a file

Export and Import are the two buttons at the top of the screen, beside its title. Export writes the vault as a single encrypted file, under a passphrase Meerkat does not keep. Import reads one back. This is the half a configuration export never carries: it is what bootstraps a second environment or moves a gateway.

An exported vault is worth exactly what its passphrase is worth, and storing the two together undoes the encryption. The same is true of a snapshot whose master key sits beside the database.

What you can see

The vault scopes itself to the caller: an infra admin sees the infra entries, an app admin the application's. The screen is open to anyone administering a plane that holds entries.

Traps