spring-cloud / spring-cloud-vault

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

Add logging for configuration issues #573

Closed fdw closed 3 years ago

fdw commented 3 years ago

Describe the bug We're using Spring Cloud 2020.0.1 with Spring Boot 2.4.2 and the new configuration setup (i.e. spring.config.import=vault://). When configuring Spring Cloud Vault wrongly (i.e. inaccessible URL or invalid credentials), there is no error message about this. It just fails silently to import the properties. An error message would reduce the necessary debugging time by a lot.

M3hdi commented 3 years ago

You can have the desired behavior by setting the "spring.cloud.vault.fail-fast" config property to "true". I think it's better to have the fail fast flag switched on by default, which is not currently the case.

mp911de commented 3 years ago

We're missing a bit of infrastructure to be able to inject logger into SecretLeaseContainer and property sources. I created https://github.com/spring-projects/spring-vault/issues/636 to provide the pre-requisites.

mp911de commented 3 years ago

Closing this one as duplicate of #565.