Skip to content

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

@yapei123

Description

@yapei123

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions