Skip to content

Add support for Redis 6 authentication with username #22702

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

Closed
mp911de opened this issue Aug 3, 2020 · 4 comments
Closed

Add support for Redis 6 authentication with username #22702

mp911de opened this issue Aug 3, 2020 · 4 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@mp911de
Copy link
Member

mp911de commented Aug 3, 2020

Redis 6 finally brings full ACL support by accepting a username in addition to the already existing password.

It would make sense to support the authentication method with two configuration properties:

  • spring.redis.username (bound to RedisStandaloneConfiguration and RedisClusterConfiguration)
  • spring.redis.sentinel.username (bound to RedisSentinelConfiguration)

The username can be supported in every place where password is used. This feature should be backward-compatible so authentication without a username is supported, too (e.g. for older Redis server versions). In that case, Redis…Configuration.setUserName(…) isn't called.

URL-based configuration should be adopted accordingly and we should ideally log a warning that the form redis://foobar@host is deprecated as foobar is considered to be the password. From a proper URL syntax perspective, the userinfo part should consist of a username and password delimited by a colon. So a URI with an empty username should be rendered as redis://:foobar@host to avoid ambiguity.

The setting is supported by both Redis clients (Lettuce and Jedis).

Spring Data Redis needs to implement DATAREDIS-1046 first before this ticket can be addressed.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 3, 2020
@wilkinsona wilkinsona added type: enhancement A general enhancement status: blocked An issue that's blocked on an external project change and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 3, 2020
@wilkinsona wilkinsona added this to the 2.4.x milestone Aug 3, 2020
@snicoll snicoll removed the status: blocked An issue that's blocked on an external project change label Sep 11, 2020
@snicoll
Copy link
Member

snicoll commented Sep 11, 2020

DATAREDIS-1046 is resolved so I've unblocked this one.

@snicoll snicoll self-assigned this Sep 28, 2020
@snicoll snicoll modified the milestones: 2.4.x, 2.4.0-M4 Sep 29, 2020
@mourezwell

This comment was marked as duplicate.

@snicoll

This comment was marked as resolved.

@mourezwell

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants