Skip to content

feat(kms)!: archive each root epoch's attestation and move the keyring to keyring_dir - #1595

Merged
kvinwang merged 3 commits into
nextfrom
feat/kms-epoch-attestation
Nov 17, 2026
Merged

kvinwang merged 3 commits into
nextfrom
feat/kms-epoch-attestation

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Key handover sends the root keys of every epoch, but not the attestation produced when each was generated. The single bootstrap-info.json is overwritten by a rotation and never written by a join or auto-bootstrap (#539), so the evidence of older epochs is lost.

Changes

  • KmsKeys gains attestation, one per epoch. The source fills it from its keyring; the receiver archives it as is without verifying it (relying parties verify). Older sources send it empty, and a missing attestation is read as empty.
  • Every epoch is stored alike:
    <keyring_dir>/root-epoch              # newest epoch, written last
    <keyring_dir>/epochs/<n>/root-ca.crt  root-ca.key  root-k256.key  root-attestation
    
    bootstrap-info.json is gone; GetMeta.bootstrap_info reports the served epoch's attestation. Auto-bootstrap records it too.
  • The keyring moves from cert_dir to the new core.keyring_dir. All mutable state now defaults to /var/lib/kms (keyring/, certs/, and the default listener TLS paths), leaving /etc/kms to configuration; the tutorials persist it with a single kms-data volume. A deployment that persists /etc/kms/certs and relies on the defaults must persist /var/lib/kms or set the paths (see CHANGELOG).

Compatibility

The wire change is additive. Older on-disk layouts are not read: a KMS always starts from bootstrap or onboarding, never from another version's disk.

Closes #539

…g to keyring_dir

Key handover sent the root keys of every epoch but not the attestation
produced when each was generated, and the single bootstrap-info.json was
overwritten by a rotation and never written by a join or auto-bootstrap
(#539), so the evidence of older epochs was lost.

- KmsKeys gains `attestation`, one per epoch. The source fills it from its
  keyring; the receiver archives it as is and does not verify it, which is
  left to relying parties. Older sources send it empty.
- Every epoch is stored alike under <keyring_dir>/epochs/<n>/ with its
  root-attestation; root-epoch is written last and marks a complete keyring.
  The newest epoch no longer lives at the top level, and bootstrap-info.json
  is gone: GetMeta.bootstrap_info reports the served epoch's attestation.
- The keyring moves out of cert_dir into the new core.keyring_dir. It has no
  default, so a config cannot silently put the root keys on storage that is
  not persistent.

Older on-disk layouts are not read: a KMS always starts from bootstrap or
onboarding, never from another version's disk.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang force-pushed the feat/kms-epoch-attestation branch from b1a755b to 1a6dfad Compare November 17, 2026 03:55
The tutorials mounted one volume per state directory under /etc/kms. Keep
certificates and the root keyring together in a single kms-data volume at
/var/lib/kms instead, leaving /etc/kms to configuration: a volume over
/etc/kms would freeze the kms.toml baked into the image at first start.

Signed-off-by: Kevin Wang <wy721@qq.com>
Give keyring_dir a default in kms.toml rather than requiring it, and move
cert_dir and the default listener TLS paths there too, so all mutable KMS
state sits under one directory and /etc/kms holds only configuration.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang merged commit 0e75b44 into next Nov 17, 2026
18 checks passed
@kvinwang
kvinwang deleted the feat/kms-epoch-attestation branch November 17, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bootstrap_keys() auto-bootstrap path does not write bootstrap-info.json

1 participant