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
Add redis sentinel password property #21353
Comments
This is the Spring Data issue for reference. Based on some comments from #18942, we didn't surface a property for @mp911de What are your thoughts on surfacing a property that applies to one driver and not the other? |
Hello, i found this Jedis merge. |
Back then, Jedis didn't provide an option to configure the Sentinel password. In the meantime, Jedis provided the required functionality so I filed DATAREDIS-1145 to support Sentinel passwords with Jedis in Spring Data Redis. That being said, it makes sense to surface the password property in the |
This comment has been minimized.
This comment has been minimized.
We've tried a similar approach in Spring Data Redis and learned that we should not couple the Redis password to the Sentinel password. The Sentinel password was added in a later Redis version so earlier Redis setups will fail when the Sentinel password is set to the Redis password. |
@mp911de Interesting. We currently have code that sets the sentinel password to the redis one and we were worried about back compatibility. After discussing it some more, we'll just add a new property and make the user set it if they want to use the same value. |
Looking at the code further, I don't think there's a back compatibility issue as we've never set the |
Spring boot version: 2.2.6.RELEASE
I get the RedisCommandExecutionException: NOAUTH Authentication required. After setting the configuration like this:
I tried setting only
spring.redis.password
, onlyspring.redis.sentinel.password
and both at the same time and it's not working.Digging through the code I found that the sentinel password is never set on the configuration:
1-
org.springframework.boot.autoconfigure.data.redis.RedisProperties.Sentinel
doesn't have the 'password' property.2-
org.springframework.boot.autoconfigure.data.redis.RedisConnectionConfiguration#getSentinelConfig()
never sets the existing property 'sentinelPassword' inRedisSentinelConfiguration
.3 - Resulting in the
org.springframework.data.redis.connection.lettuce.LettuceConverters
setting always a null password which is the default when not set in thesentinelConfigurationToRedisURI
method.So the problem comes when the sentinel is also password protected. I mistakenly filed the bug on the Spring redis data and they sent me here.
regards,
The text was updated successfully, but these errors were encountered: