'spring-cloud-vault-config-databases with Spring Boot 2.4.0 Config Data API fails to bind properties
I'm using spring-cloud-vault-config-databases with Spring Boot 2.4.0 Config Data API as the prefered mode described here bootstrap.yml configuration not processed anymore with Spring Cloud 2020.0 :
When I'm using Spring Boot 2.4.0 Config Data API to import configuration from Vault (Preferred) the secret properties are not binded to the spring.datasource.username & spring.datasource.password and my postgres cnx fails.
When I'm using "Legacy Processing" with the bootstrap configuration property spring.cloud.bootstrap.enabled=true the properties spring.datasource.username & spring.datasource.password are well binded to my Vault secret.
What is the expected behaviour of the spring-cloud-vault-config-databases ? Is expected to works with Spring Boot 2.4.0 Config Data API ?
my application.yml
spring.cloud.vault:
enabled: true
authentication: CERT
ssl:
key-store: file: ...
key-store-password: ...
trust-store: ...
trust-store: ...
trust-store-password: ...
cert-auth-path: ...
uri: https:...
namespace: ...
fail-fast: true
database:
enabled: true
role: myPostgresRole
backend: database/postgres/...
username-property: spring.datasource.username
password-property: spring.datasource.password
spring:
config:
import: vault://secret/... , vault://database/postgres/...
Versions used :
spring-boot : 2.4.11
spring-cloud : 2020.0.3
spring-cloud-vault-config-databases : 3.0.3
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|