databaseredisredis-server

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


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.


Solution

  • 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