Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Redis password authentication support #2950

Merged
merged 2 commits into from
May 4, 2022
Merged

Redis password authentication support #2950

merged 2 commits into from
May 4, 2022

Conversation

jmigueprieto
Copy link
Contributor

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew generateLock saveLock to refresh dependencies)
  • WHOSUSING.md
  • Other (please describe):

Changes in this PR

Added Redis password authentication support for conductor.db.type

  • redis_standalone
  • redis_cluster
  • redis_sentinel

Issue #2533


The password is set as the 4th param in the host configuration. E.g.:

conductor.redis.hosts=localhost:6379:us-east-1c:my_str0ng_pazz

For Cluster and Sentinel configuration the password from the first host is used.

In Sentinel configuration sentinels and redis nodes use the same password.

image

Alternatives considered

Considered changing RedisProperties to add a new password property un conductor.redis. That would have made it more explicit but since host.getPassword() already exists it seems like an OK alternative if documented properly.

@apanicker-nflx
Copy link
Collaborator

Please add documentation about usage of this new field. As such, users would need to read through the code to make use of this feature.

@jmigueprieto
Copy link
Contributor Author

@apanicker-nflx sure - I'll add some documentation.

What would be the best place for it and its extent?

The only thing I was able to find related to conductor.redis.hosts is a comment in application.properties

#format is host:port:rack separated by semicolon
conductor.redis.hosts=host1:port:rack;host2:port:rack:host3:port:rack

Would it be enough just adding to that? or would you prefer having something like "Configuring Redis" under /docs/how-tos and an entry in spring-configuration-metadata.json?

@apanicker-nflx
Copy link
Collaborator

A comment in application.properties would help devs.
Additionally, a section in the docs to elaborate would provide more clarity. @dougsillars Could you point to the best place for adding this documentation?

@dougsillars
Copy link
Contributor

docs/docs/how-tos/redis.md is probably the best place, IMO.

…tion, RedisClusterConfiguration and RedisSentinelConfiguration
- Added a comment in application.properties
@jmigueprieto
Copy link
Contributor Author

Added a Redis Configuration page to docs with documentation related to the scope of this PR.

Screen Shot 2022-05-04 at 11 59 45

We can later work with @dougsillars to improve it.

@jmigueprieto
Copy link
Contributor Author

Some tests are failing after rebasing changes, I'll take a look.

@jmigueprieto
Copy link
Contributor Author

nvm, the build/test issue was fixed before I got a chance to look at it

@apanicker-nflx apanicker-nflx merged commit 3efbb83 into Netflix:main May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants