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

Support redis-sentinel with auth password #5284

Closed
vttranlina opened this issue Sep 24, 2024 · 3 comments
Closed

Support redis-sentinel with auth password #5284

vttranlina opened this issue Sep 24, 2024 · 3 comments
Assignees

Comments

@vttranlina
Copy link
Member

Why?

Currently, when using Redis Sentinel, we only support password authentication for master-replica nodes. This is done by specifying the master password in the Redis URL, such as:
eg:
redisURL=redis-sentinel://masterSecret1@redis-sentinel-1:26379,redis-sentinel-2:26379,redis-sentinel-3:26379?sentinelMasterId=mymaster

In this example, masterSecret1 is the password for the master node, not the Sentinel nodes.

In case we want to more security, Redis itself supports password authentication for Sentinel nodes as described here:
https://redis.io/docs/latest/operate/oss_and_stack/management/sentinel/#sentinel-and-redis-authentication

But the Lettuce Redis library does not support configuring the Sentinel password via the Redis URL. This issue is tracked here:
redis/lettuce#1232

To enable password authentication for Sentinel nodes, we need to adapt the James codebase to support this functionality.

How?

  • Add a new configuration property in redis.properties. Eg: redis.sentinel.password
  • Refactor james code, with init RedisURI looks like:
RedisURI redisURI = RedisURI.create("redis-sentinel://password@localhost:26379/0#mymaster");
redisURI.getSentinels().forEach(it -> it.setPassword("my-sentinel-password"));
@chibenwa
Copy link
Member

Can we please suggest configuration changes for such a proposal?

@vttranlina
Copy link
Member Author

Can we please suggest configuration changes for such a proposal?

@vttranlina
Copy link
Member Author

pr: apache#2420

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

4 participants