I am currently working on a very starter for Spring Cloud Vault, because of autoconfiguration capabilities offered and the possibility to inject secrets in the environment bean at runtime. My configuration:
- my configuration is token :
spring.cloud.vault.authentication=token - the token leasing policy: 1 hour
I am able to get the token by implementing the ClientAuthentication interface and the login method to use the token at runtime but Spring is still trying to get the token from the application.properties file.
I have also tried to update the value of spring.cloud.vault.token at runtime by implementing the PropertySourceLocator interface, but Spring is still using the token from the application.properties.
How can I handle this situation (I can provide some source code if needed). Any help or any explaination will be appreciate.