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

Authentication issue with this api #6

Open
suman-aella opened this issue Sep 26, 2022 · 1 comment
Open

Authentication issue with this api #6

suman-aella opened this issue Sep 26, 2022 · 1 comment

Comments

@suman-aella
Copy link

This Redis Util doesn't provide a way to configure password while creating the Redis client.

We get Authentication issue with the same

Request processing failed; nested exception is redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.

The RedUtilsConfig class needs to accept even the password as a config parameter.

@suman-aella
Copy link
Author

suman-aella commented Sep 26, 2022

The JedisConnectionManager should be able to intialize the pool with password as parameter.

public JedisConnectionManager(RedUtilsConfig redUtilsConfig) {
        this.capacity.set(redUtilsConfig.getLockMaxPoolSize());

        GenericObjectPoolConfig<Jedis> lockPoolConfig = ConnectionPoolFactory.makePool(capacity.get());
        this.channelConnectionPool = new JedisPool(lockPoolConfig,
                redUtilsConfig.getHostAddress(),
                redUtilsConfig.getPort(),
                redUtilsConfig.getReadTimeOutMillis()
        );
 }

Currently it is passed as null.

public JedisPool(final GenericObjectPoolConfig<Jedis> poolConfig, final String host, int port,
      int timeout, final String password) {
    this(poolConfig, host, port, timeout, password, Protocol.DEFAULT_DATABASE);
}

I can do this change in the RedUtilsConfig and JedisConnectionManager if you are ok with it.

@siahsang @mdcarreira

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant