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

Redis Sentinel Authentication not supported [DATAREDIS-1045] #1620

Closed
spring-projects-issues opened this issue Oct 10, 2019 · 3 comments
Closed

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Oct 10, 2019

Chris opened DATAREDIS-1045 and commented

It looks like spring-data-redis 2.2 with lettuce-core 5.2.0 added support for Authentication on Redis when using Sentinel, but only when the authentication is enabled on the Redis node. In my setup, where both the Redis and Sentinel node have authentication enabled, I cannot seem to get it to work.

For simplicity let's assume the same password is set on both, but in reality this could of course be different.

For more details, see the latest discussion on this ticket on lettuce-core where it discusses the support for authentication:

To quote Mark Paluch there:

I took a look, LettuceConnectionFactory sets only the password on the RedisURI but not the Sentinel URI's. The bug should probably be fixed there.

Preferably, the spring.redis.password is used for both Redis and Sentinel nodes by default, while also adding a new spring.redis.sentinel.password property to deal with scenarios where the Sentinel and Redis node passwords are different


Affects: 2.2 GA (Moore)

Reference URL: lettuce-io/lettuce-core#1002

Issue Links:

Referenced from: pull request https://github.com/spring-projects/spring-data-redis/pull/490/files

Backported to: 2.2.1 (Moore SR1)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Nov 8, 2019

James Howe commented

This has broken any setup where sentinel doesn't have a password but redis does.

In particular, Redis before v5 (such as available in Ubuntu LTS) doesn't support sentinel auth at all

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Jan 5, 2020

cverges-medallia commented

I'm also experiencing the same issue as James Howe.  The PR appears to have made an assumption that the Redis and Sentinel passwords would be set the same, versus being independently controlled.  Is there a workaround?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Jan 5, 2020

Mark Paluch commented

The issue was addressed with DATAREDIS-1060 where we rolled back the change that both passwords are assumed the same. We introduced a sentinel password configuration option in SentinelConfiguration

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

Successfully merging a pull request may close this issue.

None yet
2 participants