SncRedisBundle icon indicating copy to clipboard operation
SncRedisBundle copied to clipboard

Added phpredis sentinel auth

Open McFistyBuns opened this issue 2 years ago • 2 comments

Updated the PhpredisClientFactory to allow for password authentication when using redis sentinel. The default is to use the password set in the parameters password configuration, but also allows for an override in the dsn.

https://github.com/snc/SncRedisBundle/issues/697#issue-1578053433

McFistyBuns avatar Feb 09 '23 17:02 McFistyBuns

I've worked on this, but I realized this approach cannot work as is, because it requires having same password on both: sentinel and redis servers. In case somebody had password on redis servers only and sentinel unprotected, this change will attempt to auth the sentinel now and connection will fail. Needs some rethinking.

ostrolucky avatar Feb 13 '23 08:02 ostrolucky

Predis also doesn't support this https://github.com/predis/predis/issues/594 And they have a same concern as I have pointed out: username/password cannot be reused for sentinel, there should be different configuration. And at this point I don't really want to introduce it, because if we introduce new option and later predis introduces separate one, it will most likely be a different option and we would then have to support both :/

ostrolucky avatar Feb 19 '23 21:02 ostrolucky