spring-projects / spring-vault

Provides familiar Spring abstractions for HashiCorp Vault
https://spring.io/projects/spring-vault
Apache License 2.0
283 stars 186 forks source link

support for token renewal once max token_num_uses is reached #790

Closed ynorenko closed 1 year ago

ynorenko commented 1 year ago

We use AppRole authentication and we specify token_num_uses = 10 (The maximum number of times a generated token may be used (within its lifetime). We would like the token to be automatically renewed once the max token_num_uses is reached. I don't see any support for this currently, is this correct ? Is it possible to achieve this with the current setup? If so what's the best way to achieve it?

mp911de commented 1 year ago

Currently, there's no out-of-the-box renewal for the secure introduction problem that results from rotating the initial credentials. I suggest that you create a wrapper around ClientAuthentication and rotate your app-role credentials by constructing AppRoleAuthentication instances with the desired configuration holding the current values.