skip to Main Content

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.

2

Answers


  1. 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
    
    Login or Signup to reply.
  2. -select only stop switch database when logined.
    user still have access to other database.

    i think we just should not use database any more: https://github.com/redis/redis/issues/8099

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search