Privasys
Enclave Vaults

Key lifecycle

Vault keys expire after at most 90 days. What that means, how to see it, how keys are renewed, and what happens when the vault itself is upgraded.

Every key in Enclave Vaults expires. The vault is designed for temporary key management: holding an application's keys while it is deployed, restarted or upgraded, so that only the attested code the owner approved can get them back. It is not a place for long-term storage. The application holds its keys while it runs; a key that has to live longer than its expiry is renewed actively, the way a Let's Encrypt certificate is.

Keys expire

  • A key's expiry is fixed when it is created: 90 days after creation for every key the platform creates (application storage keys, your vault keys and your secrets).
  • The date never moves. No operation extends a key's life; renewing creates a new key.
  • After expiry the vault refuses the operations that use the key: Sign, Wrap, Unwrap, Mac, ExportKey, and policy changes. It still answers for reading the key's information and audit log, and for deleting it.
  • The vault decides expiry from its own trusted clock. Without a trusted time, it treats a key as expired.

See when your keys expire

privasys vault key list <vault>        # VERSION and EXPIRES for every key; "renew" from 30 days out
privasys secrets info <name>           # where a secret is held and when it expires

privasys vault key create prints the expiry of the key it created, and the API returns expires_at with every key.

Renew your own keys

WhatHowWhat you get
A signing or AES keyprivasys vault key rotate <vault> <name>a new version with new material, the new primary, for 90 days
A threshold Ed25519 keyprivasys vault key renew <vault> <name>the same key and public key, with fresh shares, for a fresh 90 days, after a wallet approval
A secretprivasys secrets renew <name>the same value for a fresh 90 days, after a wallet step-up

Rotating keeps the older versions, so data wrapped under them still unwraps and their public keys stay readable, but only until each version's own expiry. Before an old version expires:

  • AES keys: re-wrap anything still wrapped under it with the current version.
  • Signing keys: keep the public key of every version whose signatures must stay verifiable (privasys vault key public <vault> <name> --version <n>). Verifying a signature needs only the public key, never the vault.

A secret can be renewed only before it expires. An expired secret is gone unless you exported it. privasys secrets renew needs CLI v0.56.2 or later (update the CLI).

A threshold Ed25519 key is renewed the same way, before it expires: its vaults hand fresh shares of the same key to the active constellation, so verifiers keep the public key they have. --threshold changes how many vaults must sign. privasys vault key renew needs CLI v0.58.1 or later, and works for keys created on vault v0.39.0 or later; rotate an older one (privasys vault key rotate gives a new key and a new public key) or let it expire.

Application keys

The key that opens an application's encrypted storage is held in the vault so that the application, and only its approved code, gets it back on every restart.

  • While a container application runs, the platform renews this key for it once it is 60 days old. The renewed key opens the same storage: nothing is re-encrypted, and a bring-your-own-key owner's file stays valid.
  • A WASM application's key is renewed by its owner with privasys apps migrate-constellation <app>, which re-creates it on the active constellation.
  • A stopped application is not renewed. If its key expires while it is stopped, its storage can no longer be opened by the platform. Start an application you want to keep before its key is 90 days old. An application created with your own key (--key-provider byok, see privasys apps key) can always be recovered from the copy you hold; for any other, privasys apps export-key writes the key to a local file you keep.
  • A new version of the application gets the key only after the owner approves its measurement, see Approving a new measurement.

Constellations: when the vault itself is upgraded

A constellation is one version of the vault: a set of vault enclaves running the same code, with one attestation configuration and one Shamir threshold. A new vault version is a new constellation, and one is active at a time.

  • New keys and new key versions are always created on the active constellation.
  • An existing key stays on the constellation that created it, its home, until it expires. Keys are never moved for you, and the platform addresses each key at its home, so an upgrade of the vault changes nothing for a key in use.
  • A key reaches the new constellation when it is renewed: rotating a vault key, renewing a secret or renewing a threshold key creates it on the active constellation, and the platform's renewal of application keys moves them there.
  • A constellation is not retired while it still holds an unexpired key.

So, as long as you renew within 90 days, every vault upgrade carries your keys forward without an action of its own.

How a key is held

KeyHeld bySurvives the loss of
A secret (privasys secrets create, or privasys vault key create --type secret)split into one Shamir share per vault; any k shares reconstruct itup to n - k vaults
A threshold Ed25519 key (privasys vault key create --type ed25519)one share per vault, generated by the vaults together; no vault and no client ever holds the keyup to n - t vaults
A P-256 signing, AES or HMAC keyone vault, wholeno vault: it is as available as the one vault that holds it

The threshold k is at least 2. privasys secrets create --threshold sets it for a secret, and privasys vault key create --type ed25519 --threshold for a threshold key; other vault keys use the constellation's threshold. Fewer than k shares reveal nothing about the secret, and fewer than t shares cannot sign.

A P-256 or AES key is not split because Shamir sharing reassembles the secret to use it, which a key that must never leave the enclave cannot allow. Treat it as a working key: keep its public key, re-wrap your data under newer versions, and rotate within its 90 days. When a signing key must survive the loss of a vault, and Ed25519 suits the verifiers, use a threshold Ed25519 key instead. Renewing it keeps its public key across the 90-day renewals and vault upgrades.

Checklist

  • Read the expiry of your keys with privasys vault key list and privasys secrets info.
  • Rotate vault keys and renew secrets before 90 days, and the earlier the better: the CLI flags a key from 30 days out.
  • Keep public keys of signing keys, and re-wrap data under the current AES version.
  • Keep the applications whose data you need running, or hold their keys yourself.
Edit on GitHub