REFERENCE

The platform’s keys: where they live, and when one goes missing

You run Community Edition and need to know which key files your server holds and what to keep safe, what the key ledger’s standings mean, or why the platform refuses to start after you lost or replaced its data volume.

UPDATED

Your deployment signs with keys of its own. On Community Edition they stay on your host; on a dedicated instance they sit in a Key Vault in your subscription. What each key signs, and how to verify it, is on What Attestree signs. This page is about keeping them: where they are on a Community Edition host, how the platform tracks them, and what it does when one disappears.

The key files on a Community Edition host

In the reference Compose stack the platform keeps its keys in /var/lib/wep, on the wep-platform-data volume:

File What it is
signer.key The instance key. It signs the platform’s audit events, the audit bundle, and the statements that bind each agent’s key.
catalog-attest/ The catalog-attest key. It signs each version’s signed statement, catalog evidence bundles, inventory exports, endpoint evidence bundles and CVE matrix exports.
data-protection-keys/ The key ring that protects console sign-in cookies and the secrets the console stores, such as storage credentials. The broker CA’s keys and the broker enrollment keys are kept in the database, encrypted under it.
instance-identity.key The instance identity key, since platform 0.249.1. It proves to an agent that the server it reached is the one it enrolled with.
device-ca.key The device CA key, since platform 0.249.8, with its certificate device-ca.crt beside it. More below.

A Community Edition backup carries all of them. If you also keep the keys some other way, keep these files together.

The key ledger

The platform records each signing key it uses in a key ledger in its database, by the SHA-256 fingerprint of its public key, with one of four standings:

  • current: the key it signs with now;
  • retired: rotated out. What it signed still verifies, with a warning;
  • revoked: what it signed fails to verify, in a verifier that reads the key’s standing from a keys.json you downloaded after the revocation (wep-bundle-verify … --key keys.json). A pinned fingerprint alone says which key, not whether it is still trusted. Verified with only --expected-fingerprint, a statement signed by a revoked key still passes, and the verifier prints that it did not check the key’s status.
  • manifest mismatch: a catalog-attest key file that failed a check of the key list. Since 26.11.1600 that is a versions.manifest that records another fingerprint for its version, and since 26.11.1700 also a ledger that already holds another key for that version, or a versions.manifest entry that is not signed by the key before it. The mark is permanent: the key is never current, retired or revoked, and keys.json and every export’s key set leave it out. Settings › Signing keys says which fix applies, and /inbox shows one Degraded item for it.

Rotating the catalog-attest key in filesystem key mode. Since 26.11.1700 a new key becomes current only when its versions.manifest entry is signed by the key before it, the one the ledger holds as current. The first key of an empty ledger and a key whose loss you accepted are the two exceptions. So a key swapped into the folder together with its versions.manifest entry never becomes current or served. Sign the entry with the current key’s private key, as the catalog attestation key runbook shows. An entry with no signature, or one that does not verify, makes the key a manifest mismatch and spends that version number. A key with no entry for its version waits, unrecorded and unserved, and readiness reports Degraded while it waits. After the upgrade to 26.11.1700 readiness can also report Degraded where the configured key was recorded without an entry, or with one the key before it did not sign; the Signing keys page shows what disagrees and how to fix it.

Since 26.11.1800 the compromise rotation is the one rename that revokes: a key’s folder renamed to .disabled revokes it only while it is the current key and the deployment restarts configured with another key. Write access to the key folder alone no longer revokes a retired key. A retired key’s renamed folder shows on Settings › Signing keys and in /inbox, which ask you to revoke the key on the page, and readiness reports Degraded until you do or the folder has its name back. A folder holding a copy of another version’s key revokes nothing either, and is reported as a possible key substitution.

The ledger arrived in platform 0.239.0 with the catalog-attest keys; the other keys joined it with the start-up checks below. You see the ledger where a key is used. The version’s signed-statement drawer shows the signing key’s fingerprint and its standing. keys.json (GET /api/v1/attestation/keys), downloadable from a version’s page, lists the catalog-attest keys and, since platform 26.10.3001, the instance key, each with its standing. The export panel in Audit search (/audit/search) shows the instance key’s fingerprints. Pin a fingerprint you took from a channel you trust, as the verification steps say.

Since platform 26.11.1300, Community Edition lists the catalog-attest keys and the instance key under Settings › Signing keys, each with its full fingerprint. Every signed-in account can read them. The page walks through the four steps of the key-compromise procedure. An admin can revoke a retired key there and re-sign the statements it signed. Since 26.11.1400 it does not offer to revoke the retired key the deployment still signs with, and since 26.11.1600 it offers no revocation for any retired key while the deployment cannot read which key it signs with, or for a manifest-mismatch key.

The ledger also records the instance identity key and the device CA key, which no verifier needs, so keys.json leaves them out. Each start compares the key files with the ledger.

When a key goes missing

Since platform 0.245.0 the platform does not mint a new key over one its database shows was in use, as after a lost data volume or a restore that did not finish. A silently replaced key would leave every earlier signature unverifiable with nothing saying why, and would break what others pinned.

  • signer.key. The start is refused when the file is missing and the ledger, the audit trail or an agent key binding shows a key existed, and when the file holds a different key from the one recorded.
  • instance-identity.key and device-ca.key are refused the same way, on the evidence of the ledger.
  • catalog-attest/. No key is minted over a recorded one. With the broker overlay, which configures the key explicitly, the start is refused. A base install without the overlay starts and signs nothing: evidence exports are refused, readiness reports Degraded, and the inbox names the missing file and the fix.

The refusal names the key file, the restore step and a token. There are two ways out:

  1. Put the key back from a backup, and start again. restore --only keys adds the missing key files from a bundle and overwrites none: see backup and restore.
  2. Accept the loss. Set the variable the refusal names to exactly the token it printed, in the platform container’s environment, and start again: Wep__Crypto__AcceptLostKey__Signer, __CatalogAttest, __InstanceIdentity or __DeviceCa. The platform mints a new key, or, when the file holds a different key you mean to keep, adopts that one, and records the acceptance in the audit trail as event.v1.operator.keyLossAccepted.

The token comes from what the database holds about the lost key, so no fixed value is accepted, and a value left in place accepts no later loss. Remove the variable afterwards; a start warns while it is set and matches nothing.

Accepting a loss does not bring the old key back:

  • The instance key. Nothing the lost key signed verifies against the new one.
  • The instance identity key. Agents that pinned the lost key do not believe the server again until they receive the new key’s pin over the address they enrolled through.
  • The device CA key. A front door that checks device certificates refuses every certificate the new key signs until it is given the new device-ca.crt. Where no front door checks device certificates, this changes nothing on your endpoints.

The device CA key

Since platform 0.249.8 the first start mints device-ca.key beside signer.key, and writes device-ca.crt next to it. The certificate is derived from the key alone, so a restored key gives back the same CA certificate. The key signs one thing: client certificates for enrolled devices, which a front door could require on the agent routes. Since agent 26.11.1700 an agent with a CNG device key asks for one. What exists and what does not is under device certificates and signed agent requests.

Since platform 26.11.2000 Settings › Signing keys shows the device CA certificate’s subject and expiry, and offers it to download as PEM, to give to a front door. After the key is replaced, the page offers the retired certificate too: keep it on the front door until the last certificate the old key issued expires, a date the page gives.

On a dedicated instance

A dedicated instance keeps its signing keys in a Key Vault in your Azure subscription, not as files, and the start-up checks above are about key files. It has no device CA key yet.

An admin of the instance has a Signing keys page (/admin/signing-keys). It lists the catalog-attest keys from the ledger with their standing, version, fingerprint, and when each was first seen, retired or revoked. It offers Revoke… for a retired key, never the current one. Since 26.11.1600 it offers none for the retired key the deployment still signs with, or for any retired key while the deployment cannot read which key it signs with, and the page says why. Revoking makes what the key signed fail in every verifier given a keys.json downloaded after the revocation; a fingerprint pin alone does not carry it. Revoking takes a reason and a typed phrase, and cannot be undone. The same page counts the attested versions that have no signed statement yet, and says why.

Where this stops

  • Files, not an HSM. On Community Edition the keys are files on the data volume, and a backup is how you keep a second copy.
  • A lost key stays lost. Accepting the loss lets the platform start with a new key. Nothing the lost instance key signed verifies against the new one.
  • A missing catalog-attest key on a base install does not stop the start; the install signs nothing until it is fixed.
  • Nothing in the platform checks a device certificate. Since agent 26.11.1700 an agent with a CNG device key holds one, and only a front door you set up to ask for it ever sees it.