withAuthentication(String, CharSequence) usage in sentinel authentication ? #2124
-
I recently noticed in lettuce docs that below usage is deprecated
and when i check I am not able to understand the String username in parameter list for method withAuthentication . What is it ,and how can we get this/configure this .Is this any random string or sentinel username .if so how can we set/get the sentinel username from config file. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
With Lettuce 6.0, we introduced support for Redis 6 ACL's. The correct way to setup sentinel with authentication is |
Beta Was this translation helpful? Give feedback.
-
@mp911de , I have already tried using My sentinel and data nodes both are password protected .Below is my connection code.It works when i have setup the master password only in master config file .As soon as i introduce sentinel password also ,it fails.
Note::I am able to connect to redis if i am using deprecated version of sentinel authentication
Can you please tell if i am missing something ,or is there a different way of doing it. Also for |
Beta Was this translation helpful? Give feedback.
-
There's a difference between sentinel authentication and data node authentication. I think you need to post-process the
|
Beta Was this translation helpful? Give feedback.
-
Thansk a lot @mp911de , it worked . Final code looks like this:
|
Beta Was this translation helpful? Give feedback.
There's a difference between sentinel authentication and data node authentication. I think you need to post-process the
RedisURI
object after creation.withPassword
/withAuthentication
configures data node authentication. You can set authentication on the individual sentinels through: