Add dynamic credentials providers for cloud IAM support#126
Open
richardhenry wants to merge 2 commits intodahomey-technologies:mainfrom
Open
Add dynamic credentials providers for cloud IAM support#126richardhenry wants to merge 2 commits intodahomey-technologies:mainfrom
richardhenry wants to merge 2 commits intodahomey-technologies:mainfrom
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
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.
This PR adds the ability to provide credentials dynamically which is useful for cloud IAM authentication where the token/password expires. Otherwise rustis will attempt to reconnect using expired credentials.
Here's an example of how this works:
Intended to be compatible with sentinel, pooling, and backwards compatible (only additions to existing API).
Includes tests (green) and docs.
I was originally patching around this in my application, but it made things a lot more complicated. Implementing this at the library level is a lot less code than at the application level (and can be well tested, etc).
Responsible AI usage: Codex helped me make some of these changes and write the docs, but I carefully reviewed everything and am using this fork already in my running app.