-
Notifications
You must be signed in to change notification settings - Fork 994
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
Password Rotation support - Add a CredentialProvider interface/class and set your own provider #1774
Comments
Thanks for your feature request. Are you interested in submitting a pull request? While such a change can touch a lot of places, I think it makes absolutely sense to introduce a |
@mp911de , I think that |
@mp911de , since you self-assigned this, does it mean the task is on progress? |
As per your request.
I haven't started yet and probably it will take another week or two until I get there. Feel free to submit a pull request. |
Hi @mp911de , |
@mp911de , |
No, it's not. I don't have the bandwidth for features right now. Likely will have more time at the end of this year. |
References: 1. #1602 and related PRs. Current PR is probably better than handling in JedisFactory 2. redis/redis-py#2261 - main reason of this PR 3. redis/lettuce#1774 4. #632 --- * Introduce credentials provider * use volatile * Test in Sentineled mode * Support CharSequence in DefaultRedisCredentials * Added doc for prepare() and cleanUp() * Test the provider interface * Added example * Removed deprecations
Hello,
Feature Request
Is your feature request related to a problem? Please describe
I'm using AWS SecretsManager to fetch my Redis credentials and provide them to Lettuce upon startup
However, in case I rotate the password (in Redis and in SecretsManager), I must restart my application.
Because, if the connection to Redis is lost, it will use the previous old password rather than the current one.
Describe the solution you'd like
Instead of providing a simple pair of username+password, I'd like to provide my own class, implementing a CredentialsProvider interface, and have Lettuce call it whenever a new connection is created.
This way, I will be able to always fetch the current password in my provider.
This interface just implements
getUserName()
/getPassword()
.Similar example for RabbitMQ:
https://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/main/java/com/rabbitmq/client/impl/CredentialsProvider.java
Describe alternatives you've considered
I know Redis 6 with ACL can support multiple passwords.
However, the Lettuce client doesn't support that either as far as I know.
In addition, even if multiple passwords are supported by Lettuce - I will need to know ahead all the passwords for the near future.
This is not the most convenient and secured solution.
Thank you
The text was updated successfully, but these errors were encountered: