Skip to content

kms: select root epochs through explicit KMS and app authorization - #1517

Closed
kvinwang wants to merge 29 commits into
kms-root-epoch-registryfrom
kms-key-epochs
Closed

kvinwang wants to merge 29 commits into
kms-root-epoch-registryfrom
kms-key-epochs

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

KMS root keys are retained by epoch and selected from explicit authorization results. authorizeKms / authorizeApp now carry a required operation, represented by a shared serde-derived Rust enum and hashed bytes32 on chain. Known operations share the existing policy; unknown or wrong-scope operations fail closed. Self-authorization caching is operation-specific.

Preserve GetTempCaCert, its response, temporary CA persistence/renewal and the legacy handover field so KMS nodes can be upgraded before old OS images. Tokenless onboarding retains CA-issued client certificates for legacy sources. The recipient authorizes the source through authorizeKms(export_kms_keys) on the key-carrying connection; bootstrap uses its own operation before epoch-zero registration. Existing bootAuth routes remain for old KMS binaries.

Application certificate authorization uses Rust GetAppCert and JSON/on-chain operation name get_app_cert; the existing SignCert KMS RPC is unchanged.

Prior layer validation: 73 KMS, 8 Rust auth, 36 DstackKms contract tests and 116 adapter tests passed; strict production Rust Clippy passed. Local Linux x86_64, Rust 1.92.0, Solc 0.8.24 / Forge 1.8.4, synthetic certificates/policies and loopback HTTP. Full-stack validation and dependency limitations are recorded in #1533; no live TEE onboarding was exercised.

@kvinwang kvinwang changed the title kms: multi-epoch root keyring and GetAppKey epoch selector KMS root key rotation: key epochs, on-chain registry, guest disk/env migration Nov 6, 2026
@kvinwang
kvinwang force-pushed the kms-key-epochs branch 2 times, most recently from 2e22df8 to 2697194 Compare November 6, 2026 12:46
@kvinwang kvinwang changed the title KMS root key rotation: key epochs, on-chain registry, guest disk/env migration kms: keep a keyring of all root epochs and serve the current one Nov 6, 2026
@kvinwang
kvinwang changed the base branch from next to kms-root-epoch-registry November 6, 2026 12:47
@kvinwang
kvinwang force-pushed the kms-key-epochs branch 2 times, most recently from d445376 to 56c8a50 Compare November 6, 2026 13:28
@kvinwang
kvinwang force-pushed the kms-key-epochs branch 2 times, most recently from 5401469 to c390f2f Compare November 6, 2026 14:55
@kvinwang
kvinwang force-pushed the kms-key-epochs branch 2 times, most recently from 637783d to f1822ee Compare November 6, 2026 15:09
@kvinwang kvinwang changed the title kms: keep a keyring of all root epochs and serve the current one kms: serve root epochs through unified authorization Nov 6, 2026
@kvinwang kvinwang changed the title kms: serve root epochs through unified authorization kms: select root epochs through unified authorization Nov 6, 2026
@kvinwang kvinwang changed the title kms: select root epochs through unified authorization kms: select root epochs through explicit KMS and app authorization Nov 7, 2026
@kvinwang
kvinwang added this pull request to stack #1531 November 7, 2026 15:27
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
…tion

Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
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