-
Notifications
You must be signed in to change notification settings - Fork 124
Core: call callbacks on invalidated Client #769
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
Merged
benashz
merged 5 commits into
VAULT-26576/client-factory-support-client-taints
from
VAULT-26576/callback-on-invalid-client
May 28, 2024
Merged
Core: call callbacks on invalidated Client #769
benashz
merged 5 commits into
VAULT-26576/client-factory-support-client-taints
from
VAULT-26576/callback-on-invalid-client
May 28, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
Previously, invalidated Clients were removed from the Client cache without calling any of the registered ClientCallbacks. Now any callbacks registered with ClientCallbackOnCacheRemoval be invoked when a client is removed from cache.
455911c
to
31e667e
Compare
benashz
commented
May 24, 2024
thyton
reviewed
May 25, 2024
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.
Looking good to me. I have some comments.
thyton
approved these changes
May 28, 2024
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.
LGTM!
benashz
added a commit
that referenced
this pull request
May 28, 2024
* CachingClientFactory: support client taints The secret reconcilers have no way of advising the CachingClientFactory that a Client might be invalid. Now a reconciler can taint the Client if a Vault operation fails for some reason. The common case is where a Vault request resulted in a 403 (forbidden) status code. In this case the reconciler can taint the client so that the next call to factory for the tainted client will have the factory validate that the client's token is still valid by performing reaching out to Vault's lookup lookup API. Client taints should be used sparingly, since they can increase the number of requests to Vault. * Test lease error responses. * Core: call callbacks on invalidated Client (#769) Previously, invalidated Clients were removed from the Client cache without calling any of the registered ClientCallbacks. Now any callbacks registered with ClientCallbackOnCacheRemoval be invoked when a client is removed from cache.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, invalidated Clients were removed from the Client cache without calling any of the registered ClientCallbacks. Now any callbacks registered with ClientCallbackOnCacheRemoval be invoked when a client is removed from cache.
This PR extends #717