Skip to content

Support for ACLs w/ Redis 6 #1083

@IAmATeaPot418

Description

@IAmATeaPot418

Feature Request:

Support for ACLs w/ Redis 6:

In worlds where multiple users exist we may want users to do perform different Redis operations. We may also want to restrict them to specific keys. This will help security-conscious users and enterprises restrict clients and users to the least amount of privilege required to perform their function. With the planned implementation of ACLs in Redis 6, ecosystem drivers should begin aligning to support this.

In Antirez's words:
When ACLs are useful

  1. You want to improve security by restricting access to commands and keys so that untrusted clients have no access and trusted clients have just the minimum access level to the database in order to perform the work needed. For instance, certain clients may just be able to execute read-only commands.
  2. You want to improve operational safety, so that processes or humans accessing Redis are not allowed, because of software errors or manual mistakes, to damage the data or the configuration. For instance, there is no reason for a worker that fetches delayed jobs from Redis to be able to call the FLUSHALL command.

Commands in Scope Currently w/ Redis 6:

  • Multiple Arguments for AUTH (username and password)
  • ACL HELP -- provides help information (listed below)
  • ACL LOAD -- Reload users from the ACL file.
  • ACL LIST -- Show user details in config file format.
  • ACL USERS -- List all the registered usernames.
  • ACL CAT [] -- List available categories // -- List commands inside category.
  • ACL SETUSER ... acl rules ... -- Create or modify a user
  • ACL DELUSER [...] -- Delete a list of users."
  • ACL GETUSER - Get the user details.
  • ACL GENPASS - Generate a secure password
  • ACL WHOAMI - Return the current connection username.

Error Checking

  1. No Permissions when a user does not have permission to a command or key (when error for commands or keys)
  2. Username does not exist (getuser, deluser)

References:
https://redis.io/topics/acl
https://github.com/antirez/redis/blob/0cabe0cfa7290d9b14596ec38e0d0a22df65d1df/src/acl.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions