You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
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
2, Change JedisFactory.java to public if possible
3, Inside JedisFactory.java (Optional)
private final AtomicReference<String> password = new AtomicReference<String>();
setPassword(final String password)
methodIf 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
The text was updated successfully, but these errors were encountered: