Skip to content
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

Support Redis ACL and/or URL #30

Closed
davidzhao opened this issue Apr 7, 2021 · 3 comments
Closed

Support Redis ACL and/or URL #30

davidzhao opened this issue Apr 7, 2021 · 3 comments

Comments

@davidzhao
Copy link
Member

Currently we have a password field, but no username. Redis 6.0+ introduced username/password pairs, that we should support.

@Redmega
Copy link

Redmega commented Apr 7, 2021

redis-go does have a method of parsing full redis url schemas

opt, err := redis.ParseURL("rediss://<user>:<pass>@localhost:6379/<db>")
if err != nil {
    panic(err)
}

rdb := redis.NewClient(opt)

I'm not too familiar with Go but my first impression was to use REDIS_HOST for both HOST or URL:

opt := redis.ParseURL(config.Redis.Address)
//pseudocode
if(config.Redis.Password != "") {
  opt.Password = config.Redis.Password
}
// /pseudocode

rc := redis.NewClient(opt)

But that might be confusing. Might be better to accept REDIS_URL that gets parsed (as you mentioned in Slack), and then have a fallback to REDIS_HOST, REDIS_USERNAME, and REDIS_PASSWORD (and REDIS_DB? Not sure how this is used as I believe my org simply uses the default)

@davidzhao
Copy link
Member Author

davidzhao commented Apr 11, 2021

Added Redis ACL support in 54584d6 (v0.7.5). Will handle DB selection in the future.

@davidzhao
Copy link
Member Author

this capability has been added.

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

No branches or pull requests

2 participants