Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VAULT-25341 Address issue where having no permissions to renew caused auto-auth to attempt to renew with no backoff #26844
VAULT-25341 Address issue where having no permissions to renew caused auto-auth to attempt to renew with no backoff #26844
Changes from 8 commits
60d598a
16ddb62
aedb686
b34a9fb
6186488
1d568c8
f2657ff
0055c74
d5ac9af
54db199
88b825b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool strategy!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, this was a bug, and could occur for non-renewable tokens that happened to check it as their lease ticked down, causing re-authentication to not happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to keep a check doesn't trigger lifetime watcher if the secret.Renewable == false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the secret's not renewable, then the LifetimeWatcher still needs to get triggered given the current architecture, so that auth gets re-triggered at the correct time. If we need to authenticate again for any reason, we should run the lifetimewatcher -- the root token is the only token where we don't need to reauthenticate (since it never expires)
e.g. for a 10s TTL non-renewable token, it might look like this
We're essentially making renewable tokens without the permission to renew follow the same path as the above ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this sleep, we'd reauthenticate then receive something on the
DoneCh
immediately a few times. It's a bit of an edge case but it seemed important. I wanted to avoid usingbackoffSleep
since that's intended to be for errors only.