How can I restrict user access to a specific database in Redis using ACL

Viewed 839

I have a user user1 and I need to restrict user1 from accessing database 2. How can I achieve this using ACL? The user should be able to access any other databases.

1 Answers

ACL isn't designed for that, and I don't recommend using Redis' logical databases for multi-tenancy - just use a different Redis instance for each user.

That said, something like this should work:

ACL SETUSER user1 ... -@all +select|1
Related