-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
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 toRedisStandaloneConfiguration
andRedisClusterConfiguration
)spring.redis.sentinel.username
(bound toRedisSentinelConfiguration
)
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.