Skip to content
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

Request New Feature: allowing the ability to reset password during runtime for Jedis's auth #1602

Closed
yapei123 opened this issue Sep 12, 2017 · 1 comment · Fixed by #2315
Closed
Milestone

Comments

@yapei123
Copy link

Expected behavior

When Redis's password changed, without redeploy, the JedisFactory can get the new password during making a new incoming Object.

Actual behavior

JedisFactory is package protected, we couldn't extend from it to make our own customized factory.

Our proposal

1, Inside JedisPool.java, add a new constractor

public JedisPool(final GenericObjectPoolConfig poolConfig, final PooledObjectFactory<Jedis> factory) {
  	  super(poolConfig, factory);
}

2, Change JedisFactory.java to public if possible
3, Inside JedisFactory.java (Optional)

  • add private final AtomicReference<String> password = new AtomicReference<String>();
  • add setPassword(final String password) method

If above is approved/accepted, our application can use the new constructor to pass in JedisFactory or our own customized factory to allow reset password.

Redis / Jedis Configuration

Jedis version:

3.0.0-SNAPSHOT

Redis version:

2.8/3.0

Java version:

1.8

Thanks,
Yan

@yapei123 yapei123 changed the title New Feature: allowing the ability to reset password during runtime for Jedis's auth Request New Feature: allowing the ability to reset password during runtime for Jedis's auth Sep 12, 2017
@yapei123
Copy link
Author

yapei123 commented Sep 13, 2017

The pull request:
#1606

@sazzad16 sazzad16 added this to the 3.6.0 milestone Mar 17, 2021
sazzad16 added a commit that referenced this issue Feb 14, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants