From 541c2371f4a79efaa4db96ece91bed4cad377f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Millet?= Date: Tue, 3 Sep 2024 16:28:57 +0200 Subject: [PATCH] Fix redis_sentinel password usage When using a password in Redis Sentinel, it should be provided at both levels --- backends/redis-sentinel.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backends/redis-sentinel.go b/backends/redis-sentinel.go index 025eb51d..b26fed48 100644 --- a/backends/redis-sentinel.go +++ b/backends/redis-sentinel.go @@ -46,10 +46,11 @@ type RedisSentinelBackend struct { // NewRedisSentinelBackend initializes the Redis Sentinel client and pings to make sure connection was successful func NewRedisSentinelBackend(cfg config.RedisSentinel, ctx context.Context) *RedisSentinelBackend { options := &redis.FailoverOptions{ - MasterName: cfg.MasterName, - SentinelAddrs: cfg.SentinelAddrs, - Password: cfg.Password, - DB: cfg.Db, + MasterName: cfg.MasterName, + SentinelAddrs: cfg.SentinelAddrs, + SentinelPassword: cfg.Password, + Password: cfg.Password, + DB: cfg.Db, } if cfg.TLS.Enabled {