feat(kms): add auto-onboard support via config#507
Open
Conversation
Add `auto_onboard_url` config to automate KMS onboarding from an existing instance, removing the need for manual Web UI interaction. When set, the new KMS automatically fetches keys from the source KMS on startup. On failure, the process exits so docker restart can retry.
kvinwang
reviewed
Feb 14, 2026
| }; | ||
| let keys = Keys::onboard( | ||
| &source_url, | ||
| &cfg.onboard.auto_bootstrap_domain, |
Collaborator
There was a problem hiding this comment.
auto_bootstrap_domain is optional in config (default is empty), but here it is passed directly as the target domain for Keys::onboard. Could we validate it first (e.g. reject empty/whitespace-only value with a clear error)? Otherwise auto-onboard may generate an unusable cert/domain setup when only auto_onboard_url is set.
— gpt-5.3-codex
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.
Summary
auto_onboard_urlconfig field toOnboardConfigfor automating KMS onboarding from an existing instanceauto_onboard_urlis set, the KMS automatically fetches keys from the source on startup, bypassing the Web UIrestart: unless-stoppedto retry/, ensure/prpcsuffix) matches the existing Web UI onboard handlerTest plan
cargo check -p dstack-kmspassescargo clippy -p dstack-kms -- -D warnings --allow unused_variablespassesauto_onboard_urlon the second pointing to the first, verify auto-onboard completes