mirror of
https://github.com/predis/predis.git
synced 2026-08-24 17:39:36 +00:00
2e76410e65
Password-based authentication for sentinels has been added in Redis 5. Predis was actively ignoring any "password" parameter for sentinels when creating connections to them to avoid issues when this parameter is set in the default "parameters" array passed via client options, as they are applied to **every** connection created by Predis (see #346). We need to find a better way to specify a common password for sentinels to be handled in a different way than the ones for Redis nodes. For now each sentinel node protected by password must have an explicit password set in its parameters list even if this password, by design, is the same for all sentinels. Since we cannot use default "parameters" as explained above but we still need to pass a common value for all sentinels an idea could be using a dedicated client option like we did with "service", but we will see later. In this commit we also explicitly reset any "username" parameter as it would trigger an `AUTH $username $password` but sentinels do not support ACL authentication. Fixes #594.