Skip to content

feat(kms): merge a second KMS root as the next epoch (0.6.5-mrgk, do not merge) - #1594

Draft
kvinwang wants to merge 2 commits into
release/0.6.5from
release/0.6.5-mrgk
Draft

kvinwang wants to merge 2 commits into
release/0.6.5from
release/0.6.5-mrgk

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

One-off build for joining two independently bootstrapped off-chain KMS clusters into one keyring. Not to be merged into next or any regular release; kms-v0.6.5-mrgk is tagged from this branch. The PR is for review and the public record.

Onboard takes merge_source_url / merge_source_token. The source's keyring is imported as usual, and the merge source's single root is appended as the next epoch instead of a generated one:

  • the merge source must be authorized by the auth API for key export at that epoch and hold exactly one epoch;
  • the merged keyring is then checked as an ordinary join, with the new epoch registered and pending activation.

Derived keys do not depend on the root epoch number, so the merge source's apps keep their keys once the epoch is activated. Procedure: docs/kms-root-merge.md.

E2E on real TDX (two 0.6.3 KMS clusters with dstack-auth webhooks -> merge -> official 0.6.5 join -> activation): all 22 steps pass. Before activation the merged cluster serves the old root; after activation the merge sources app on an unchanged 0.6.3 guest keeps byte-identical derived keys, and the old clusters app migrates disk and env on a 0.6.5 guest.

One-off build (0.6.5-mrgk) for joining two independently bootstrapped
off-chain KMS clusters, not for regular releases.

Onboard takes merge_source_url/merge_source_token: the source's whole
keyring is imported as usual, and the single root of the merge source is
appended as the next epoch instead of a generated one. The merge source is
pinned to the root CA it publishes, once its public keys extend the
imported keyring to the latest registered chain hash, and is authorized
by the auth API like the source. The merged keyring is then checked as an
ordinary join with the new epoch pending activation.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang marked this pull request as draft November 17, 2026 03:05
The merged keyring is checked against the registered chain hash before
use, and the merge source releases its keys only to an attested KMS its
own auth API allows, so pinning it through its published GetMeta keys
only guarded the admin token.

Signed-off-by: Kevin Wang <wy721@qq.com>

This branch has not been deployed

No deployments
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.

1 participant