Grokzen / redis-py-cluster

Python cluster client for the official redis cluster. Redis 3.0+.
https://redis-py-cluster.readthedocs.io/
MIT License
1.1k stars 316 forks source link

how to use ACL in redis cluster client #498

Closed smartnews-weitao closed 2 years ago

smartnews-weitao commented 2 years ago

Hello redis-py-cluster team. My redis cluster is enabled ACL, so i have a pair of username and password, however during the initialization of py-client, i didn't find any argument to let me define my username and password. And i didn't find any AUTH command that i can use after client is initialized. So any example will be appreciated. Thank you.

Grokzen commented 2 years ago

@smartnews-weitao All ACL commands is blocked when running in cluster mode within this client. What you need to do is to use redis-py and create a plain Redis instance to each of your nodes in your cluster and handle ACL:s for each server manually via your provisioning solution you are using. There are no plans to support ACL commands across the entire cluster at any point in the future.

I dont think we are compatible with the ACL authentications either and the only supported one is the old password solution. You will have to dig into redis-py source code for your release exactly how they support and work for authenticating. You should look into the Connection implementation becuase that is where authentication happens.