Skip to content

[STACKED on #863] fix(kms): make Bootstrap one-time - #873

Merged
kvinwang merged 1 commit into
masterfrom
codex/fix-kms-bootstrap-once
Aug 3, 2026
Merged

[STACKED on #863] fix(kms): make Bootstrap one-time#873
kvinwang merged 1 commit into
masterfrom
codex/fix-kms-bootstrap-once

Conversation

@kvinwang

@kvinwang kvinwang commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

STACKED PR — merge #863 first.

Problem

The Bootstrap RPC remained callable after KMS had already initialized its root state. Replaying it could replace or diverge bootstrap material that all later certificates and keys depend on.

Root cause and fix

Persist a bootstrapped marker/state check and reject every Bootstrap call after the first successful initialization.

Implementation

The branch records the following focused implementation work:

  • fix(kms): make Bootstrap one-time

Changed paths:

  • dstack/kms/src/onboard_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-onboarding-domains..origin/codex/fix-kms-bootstrap-once: 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 02:52

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.

Base automatically changed from codex/fix-kms-onboarding-domains to master August 3, 2026 14:53
Defect: sequential and concurrent Onboard.Bootstrap requests could regenerate and overwrite an initialized KMS hierarchy.

Observed symptom: repeated requests returned HTTP 200, changed persisted key metadata, and could leave certificates inconsistent.

Fix: serialize Bootstrap within the service and reject any request after bootstrap state or root keys exist.
@kvinwang
kvinwang force-pushed the codex/fix-kms-bootstrap-once branch from 449142d to 0aabeec Compare August 3, 2026 14:53
@kvinwang
kvinwang merged commit d78ba0f into master Aug 3, 2026
15 checks passed
kvinwang added a commit that referenced this pull request Aug 4, 2026
…missions

[STACKED on #873] fix(kms): persist private keys owner-only
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