Replies: 2 comments
-
@Yangsx-1 Thanks for proposing this. For the encoding part, I'm wondering if we could reserve a byte to store the version so we can change the format in the future. Others are good to me. To see if others have any suggestions. cc @apache/kvrocks-committers |
Beta Was this translation helpful? Give feedback.
0 replies
-
Several questions:
cc @mapleFU |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
ACL (Access Control List) in Redis is a system for managing user authentication and controlling which commands and keys each user can access. Redis introduced ACL support starting from version 6.0.
It enables the creation of multiple users, each with configurable access rights, including which commands they are allowed to execute and which key patterns they are permitted to access. Users can be enabled or disabled, assigned one or more passwords for authentication, and restricted to specific operations and key namespaces.
The ACL system can be configured through the Redis configuration file or dynamically at runtime using dedicated ACL commands.
This feature provides fine-grained access control for multi-tenant or security-sensitive Redis deployments, ensuring users interact only with the commands and data they are explicitly authorized to access.
Key-Value Design
In Redis, user information is stored in the ACL table (within the server.acl struct), while regular keys are stored in the database dictionary. These two belong to separate, independent namespaces and do not interfere with each other. For example, a username can also be a key in Redis. Therefore, to maintain consistent behavior with Redis, ACL users in Kvrocks should be stored within a separate namespace only for ACL command.
Here is the key-value design for ACL user:
For example, here is a typical ACL command in redis:
user alice
: Creates or modifies a user named alice.>alice123
: Sets the password for the user to alice123.+get +set
: Grants permission to execute only the GET and SET commands.~foo* ~goo*
: Restricts key access to keys matching the patterns foo* and goo*. The user cannot access keys outside these patterns, even if the command itself is permitted.We can store all of the information using the above encode method:
Beta Was this translation helpful? Give feedback.
All reactions