Skip to content

[STACKED on #952] feat(kms): return configured historical root keys - #955

Closed
kvinwang wants to merge 8 commits into
masterfrom
codex/feat-kms-historical-root-keys
Closed

[STACKED on #952] feat(kms): return configured historical root keys#955
kvinwang wants to merge 8 commits into
masterfrom
codex/feat-kms-historical-root-keys

Conversation

@kvinwang

@kvinwang kvinwang commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

STACKED PR — merge #952 first.

Problem

KMS retained historical root keys for compatibility/recovery but its API returned only the active root. Guests needing to decrypt or verify state created under an older configured root could not obtain it.

Root cause and fix

Return the configured historical roots together with the active key under the explicit historical-key response contract.

Implementation

The branch records the following focused implementation work:

  • feat(kms): return configured historical root keys
  • test(kms): cover historical root key inventory
  • docs(kms): define cold backup recovery procedure

Changed paths:

  • dstack/kms/README.md
  • dstack/kms/kms.toml
  • dstack/kms/src/config.rs
  • dstack/kms/src/main_service.rs

Scope

This PR addresses one logical kms finding. It intentionally excludes the acceptance-test infrastructure from #841 and unrelated product fixes from #840.

Dependency and merge order

Verification

  • git diff --check origin/codex/fix-kms-ca-restart..origin/codex/feat-kms-historical-root-keys: passed.
  • The declared base was verified as an ancestor of the PR head.
  • Focused compile/check verification was run for the changed component where applicable; non-Rust packaging or configuration changes were reviewed against their exact branch delta.

Copilot AI review requested due to automatic review settings July 31, 2026 03:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kvinwang
kvinwang force-pushed the codex/feat-kms-historical-root-keys branch from e8e3825 to 92e2d3f Compare August 3, 2026 14:53
@kvinwang
kvinwang force-pushed the codex/feat-kms-historical-root-keys branch from 92e2d3f to 246ed7e Compare August 3, 2026 16:39
@kvinwang
kvinwang force-pushed the codex/feat-kms-historical-root-keys branch from 246ed7e to 7a87e21 Compare August 3, 2026 16:57
Defect: Onboard.Finish terminated the process inside the RPC handler before Rocket could flush the documented Empty response.

Observed symptom: clients received RemoteDisconnected and the graceful-response regression failed.

Fix: return success immediately and schedule process exit after a short response-drain interval.
@kvinwang
kvinwang force-pushed the codex/feat-kms-historical-root-keys branch from 7a87e21 to af6c3bc Compare August 4, 2026 02:26
Base automatically changed from codex/fix-kms-ca-restart to master August 5, 2026 15:41
@kvinwang

kvinwang commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Closing because KMS does not currently implement a complete root-key rotation flow. This change only returns configured historical keys, while the onboarding client still requires exactly one key and neither persists nor uses historical keys, so configuring them would break onboarding rather than provide an end-to-end recovery path.

@kvinwang kvinwang closed this Aug 5, 2026
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.

2 participants