-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spring-cloud-config-client: Load properties from Vault first. #2326
Comments
Are you using |
yes, |
Are this in you application yaml/properties? can you try setting an environment variable/system property just for the vault import and leave the config server import in the application configuration file? |
Tried, same result but different behaviour (I was even surprised that it worked, I though spring.config.import from env var would override the value from config file :)) |
Ok. We will have to take a look at it, it might be a limitation of spring boot but we will look into it |
Hi. Has this issue been resolved? I am trying to load config properties from spring cloud config server (using a username and password) after loading other spring config server from vault. It seems the property sources cannot be loaded by clients when I used |
@ENate are you trying to loading the username and password to use to authenticate with the config server from vault? Something like |
Yes @ryanjbaxter thanks for putting it so clear. I have been looking on ways to handle this issue but cant find any. I did it this way (with a yaml file which is same basically) :
I defined
Thanks again |
We've added basic auth to our config server, we want to store credentials for config clients in vault.
This flow doesn't work since RestTemplate that connects to config server is constructed much earlier than properties are loaded from vault (spring-cloud-dependencies: 2022.0.4).
Possible solution:
If spring-cloud-starter-vault-config is present in the class path and connection info is known, the following order of values resolution could be used:
The text was updated successfully, but these errors were encountered: