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.
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
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:
-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