spring-cloud / spring-cloud-vault

Configuration Integration with HashiCorp Vault
http://cloud.spring.io/spring-cloud-vault/
Apache License 2.0
273 stars 152 forks source link

Provide Vault Config integration through Spring Boot's ConfigData API #483

Closed mp911de closed 3 years ago

mp911de commented 3 years ago

Spring Boot's ConfigData API is a new API to load configuration data from various sources. Vault is an ideal candidate as all PropertySource bootstrapping can be done with the newly introduced API.

The syntax to enable Vault (using Key-Value secret defaulting) would be:

spring.config.import=vault:

We can additionally check whether there's a path associated with the config source:

spring.config.import=vault:/secret/my-app,vault:/secret/other-context-path

That would allow for customizing the context paths that get mounted as property sources.

Since ConfigData has no association to the Bootstrap Context anymore, we need to bootstrap out infrastructure beans ourselves and make sure these get propagated into the application context for lifecycle management.

javaHelper commented 2 years ago

Any quick help here please : https://stackoverflow.com/questions/72152159/spring-boot-v2-6-7-and-hashicoprt-vault-integration-issue-unable-to-fetch-the-d?