Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to save encrypted password in redis.conf?

I want to add password to Redis.

I interested if there is a way to save encrypted password in redis.conf and not as plain text?

Or a way not to store the password in redis.conf at all?

like image 855
Maria Dorohin Avatar asked Sep 12 '25 12:09

Maria Dorohin


1 Answers

By default redis.conf atleast until today with its most recent version - 6.0.1 still doesnt support encrypting a password.

While this is a situation is not fully avoidable, at the best, you can automate this by writing a wrapper startup script that would accept password as an argument and bring up the service. And then, once the service is up, ALTHOUGH THIS IS TO BE AVOIDED AND IS NOT RECOMMENDED you can delete the conf file or change the password in that file. and, before the startup of REDIS, you would require to run the startup script again/ re-enter the original password. BUT THIS CAN ADDITIONALY CAUSE PROBLEMS.

Please note -> redis.conf can be secured by linux/OS permissions and thats the best way to do so

like image 160
srinivas-vaddi Avatar answered Sep 16 '25 09:09

srinivas-vaddi