Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Feaure request] Redis authentication #375

Closed
shaman007 opened this issue Nov 8, 2024 · 5 comments
Closed

[Feaure request] Redis authentication #375

shaman007 opened this issue Nov 8, 2024 · 5 comments

Comments

@shaman007
Copy link
Contributor

Redis auth

It's a way needed to provide username/password or just password with enviroment variables like:

REDIS_USER
REDIS_PASSWORD

I'd tried

redis://:<secret>@redis-master.redis.svc.cluster.local:6379/10

but this way I cannot render this from the secret storage easily and uniformally around the cluster.

@shaman007 shaman007 changed the title [Feaure request] [Feaure request] Redis authentication Nov 8, 2024
@swaggerino
Copy link

would love support for passwords too as I already have a redis instance running (I'm on unraid) that I would love to use instead of spinning up another one

@swaggerino
Copy link

actually it works, you just need to make sure that any special characters in your password are URL escaped (see here https://docs.microfocus.com/OMi/10.62/Content/OMi/ExtGuide/ExtApps/URL_encoding.htm)

then redis://:[pass]@ip:port works just fine

@shaman007
Copy link
Contributor Author

@swaggerino, can you please please please share a working snippet?

@swaggerino
Copy link

@swaggerino, can you please please please share a working snippet?

I'm on unraid so YMMW.
But all I had to do was edit the env-variable REDIS_URL from redis://[IP]:[PORT] to redis://:[PASSWORD]@[IP]:[PORT]
Make sure you don't forget the :before the password and if you have any special characters replace them according to the list in my other comment.

So the string you tried should work unless A) whatever platform you're using handles things differently or B) your password has special characters

@shaman007
Copy link
Contributor Author

Not good enough, I'm on k8s and nested variables not working, so that approach would make me insert secret in the config, which is antipattern.

Repository owner locked and limited conversation to collaborators Feb 13, 2025
@Freika Freika converted this issue into discussion #872 Feb 13, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants