What I want to achieve is polling a list of key vault values only once at the start of a microservice. Instead my program polls a list of secrets every 30 mins. This is my client configuration:
public void init() {
secretClient = new SecretClientBuilder()
.vaultUrl(vaultAddress)
.credential(new ClientSecretCredentialBuilder()
.clientId(clientId)
.tenantId(tenantId)
.clientSecret(clientSecret)
.build())
.buildClient();
}
1.What refresh-interval should I use in application.yml in order to pull secrets list only once?
Responses to the 2 questions:
#1 How does the code snippet relate to the application.yml? You can call the SecretClient you create at any interval you like.
#2 Use getSecret(String name) on the SecretClient API
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.