Skip to content

withAuthentication(String, CharSequence) usage in sentinel authentication ? #2124

Answered by mp911de
Pramit2512 asked this question in Q&A
Discussion options

You must be logged in to vote

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:

for (RedisURI sentinel : redisURI.getSentinels()) {
    sentinel.setUsername()/sentinel.setPassword();
}

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Pramit2512
Comment options

Answer selected by Pramit2512
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants