Closed krispanalov closed 11 months ago
Thanks for reaching out. Your scenario sounds pretty much as it was resolved via #815.
Upon login token expiry, all lease-associated secrets are being re-requested. Can you check whether Spring Vault 3.1.0 (or better the snapshots) address your scenario?
@mp911de thanks for the quick reply. Indeed it looks like same issue. I can't verify it quickly as I'll need to upgrade few other dependencies but looking at the PR it should solve my issue. 🙏 I think you can close the use as solved/duplicate.
Closing as duplicate of #815.
Authentication token has its own ttl that can expire. When token expires all related credentials will be revoked too but we don't see events of that in the library and thus application continues to work with revoked credentials i.e. all requests to db fail.
Our current setup:
Idea: When auth token expires lib can automatically expire all related ttls and raise usual events for credentials expire etc. Or if it doesn't fit all cases for generic lib at least can provide mechanism for refresh of all leases. Vault allows to check current leases so it could firstly request the data from vault, vault will return that credentials are not valid anymore and then continue old flow of Credentials expired event.
PS. I know that this can be fixed by making token leave forever but the entire idea of rotating it is to not have infinite tokens and we already hit this issue with default 32days so even if we increase at some point we can reach that period again ( of course if it's not infinite)
Thanks