feat(config): add secret management for KMS config files#932
Open
p0wline wants to merge 16 commits into
Open
Conversation
Manuthor
requested changes
May 13, 2026
Contributor
Manuthor
left a comment
There was a problem hiding this comment.
Thanks for this!
Only a partial review.
Could you rebase please?
f7fd394 to
e03d7e0
Compare
Contributor
|
We should also support our own KMS server for storing this kind of config files secrets and support another |
d3e4c7e to
6411945
Compare
8e5fcb6 to
98791ca
Compare
This reverts commit 44dd245.
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.
Closes #882
What
Add secret management support to KMS TOML configuration files so that sensitive values (passwords, tokens, API keys) are never stored in clear text.
Changes
Phase 1 — Local secret handling
${VAR_NAME}and${VAR_NAME:-default}syntax resolved at startup in all config valuessecrets_filekey in the main config orCOSMIAN_KMS_SECRETS_CONFenv var; deep-merged at startup before deserializationpkg/secrets.tomltemplate with documented examplesPhase 2 — External secret backends (optional feature flags)
URI schemes resolved at startup:
vault://<mount>/<path>[#<field>]secret-vaultaws-ssm://<region>/<param-path>secret-awsazure-kv://<vault>/secrets/<name>secret-azureEach backend spawns a dedicated OS thread with its own Tokio runtime to avoid nested-runtime panics at startup.
Testing