Complete the code to create a new user with read-only access to keys.
ACL SETUSER readonly_user on >password ~* +[1]The get command allows read-only access to keys. Using +get grants permission to read data.
Complete the code to allow a user to execute all commands in the 'string' category.
ACL SETUSER string_user on >pass123 ~* +@[1]The string category includes commands that operate on string values. Using +@string grants access to all string commands.
Fix the error in the ACL command that tries to deny all commands but accidentally allows 'config'.
ACL SETUSER limited_user on >pass ~* +[1] -@all
The command +config explicitly allows the 'config' command, which contradicts the intention to deny all commands. Removing or not adding +config is needed to deny it.
Fill both blanks to create a user that can only run commands in the 'list' category and only on keys starting with 'user:'.
ACL SETUSER list_user on >pass123 ~[1] +@[2]
The pattern user:* restricts keys to those starting with 'user:'. The category list allows all list commands.
Fill all three blanks to create a user that can run 'get' and 'set' commands only on keys starting with 'cache:', and cannot run any other commands.
ACL SETUSER cache_user on >cachepass ~[1] +[2] +[3] -@all
The key pattern cache:* limits keys to those starting with 'cache:'. Adding +get and +set allows only these commands. The -@all denies all other commands.