Server-side resolve Vault secrets inside application's property sources#1678
Merged
spencergibb merged 6 commits intospring-cloud:masterfrom Jan 11, 2021
donbeave:vault
Merged
Server-side resolve Vault secrets inside application's property sources#1678spencergibb merged 6 commits intospring-cloud:masterfrom donbeave:vault
spencergibb merged 6 commits intospring-cloud:masterfrom
donbeave:vault
Conversation
spencergibb
requested changes
Jul 31, 2020
Member
spencergibb
left a comment
There was a problem hiding this comment.
at a glance there are quite a few changes that aren't material to the PR such as formatting or adding final or changing the order of static and final. Can you please revert those changes so this will be easier to digest.
Contributor
Author
|
@spencergibb ok, sorry for that. Maybe I better make a separate PR for these |
Member
|
focused PRs are much better. |
Contributor
Author
|
@spencergibb done, pls check again. Build and tests are success on my local machine: It looks like probably CircleCI is not configured properly for this repository, because the error is not related to my code changes. |
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.

This feature will add the ability to replace property value with the value from Vault KV secret.
It works similarly to how
{cipher}works (https://cloud.spring.io/spring-cloud-config/reference/html/#_encryption_and_decryption).For example, if activated
vaultprofile andapplication.ymlcontains some keys with{vault}prefix:Spring Cloud Config server on the server-side will request the Vault server will load secret with the path
dbs/myappand retrieve the value frompasskey and will put it inspring.datasource.passwordproperty.Same as
{cipher}, if a value cannot be parsed, it is removed from the property source and an additional property is added with the same key but prefixed with invalid and a value that means “not applicable” (usually <n/a>).