fix(kms): preserve CA certificates across restart - #952
Merged
Conversation
kvinwang
force-pushed
the
codex/fix-kms-ca-restart
branch
from
August 3, 2026 14:53
498224f to
6eded6d
Compare
kvinwang
force-pushed
the
codex/fix-kms-ca-restart
branch
from
August 3, 2026 16:39
6eded6d to
9a21c75
Compare
kvinwang
force-pushed
the
codex/fix-kms-ca-restart
branch
from
August 3, 2026 16:57
9a21c75 to
7a8d525
Compare
kvinwang
force-pushed
the
codex/fix-kms-ca-restart
branch
from
August 4, 2026 02:26
7a8d525 to
9a0b2df
Compare
kvinwang
force-pushed
the
codex/fix-kms-ca-restart
branch
from
August 5, 2026 14:43
9a0b2df to
68084a3
Compare
kvinwang
force-pushed
the
codex/fix-kms-ca-restart
branch
2 times, most recently
from
August 5, 2026 15:07
1a767a8 to
0a8ae83
Compare
kvinwang
force-pushed
the
codex/fix-kms-ca-restart
branch
from
August 5, 2026 15:12
0a8ae83 to
17650d3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
KMS regenerated its CA certificates on every restart even though the persisted private keys were reused. Clients then saw new CA certificates after each restart, making the advertised trust anchors unstable.
Fix
New CA certificates retain the existing ten-year default lifetime, so renewal extends their expiry by approximately another ten years without rotating the CA keys.
Scope
dstack/kms/src/onboard_service.rsmasterVerification
cargo fmt --check --allcargo check -p dstack-kmscargo test -p dstack-kms ca_certificate_is_renewed_only_within_the_renewal_windowgit diff --check origin/master...HEAD