0
0
Redisquery~20 mins

ACL rules and categories in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis ACL Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
2:00remaining
What is the output of this ACL command?
Given the ACL rule ACL SETUSER alice on >password ~* +@all, what will be the result of the command ACL LIST for user alice?
Redis
ACL LIST
Auser alice on >password ~* +@all
Buser alice off >password ~* +@all
Cuser alice on >password ~* -@all
Duser alice on >password ~* +@read
Attempts:
2 left
💡 Hint
Remember that on means the user is enabled and +@all grants all command categories.
🧠 Conceptual
intermediate
1:30remaining
Which ACL category allows keyspace notifications commands?
In Redis ACL categories, which category includes commands related to keyspace notifications?
A@admin
B@read
C@pubsub
D@keyspace
Attempts:
2 left
💡 Hint
Keyspace notifications use the publish/subscribe system.
📝 Syntax
advanced
2:30remaining
Which ACL SETUSER command syntax is valid to allow only read commands on keys starting with 'cache:'?
Select the correct ACL SETUSER command that enables a user with password 'secret', allows only read commands, and restricts keys to those starting with 'cache:'.
AACL SETUSER bob on >secret ~cache:* +@read
BACL SETUSER bob on >secret ~cache:* +@write
CACL SETUSER bob on >secret ~cache:* +@all
DACL SETUSER bob on >secret ~cache* +@read
Attempts:
2 left
💡 Hint
The key pattern must end with a colon and asterisk to match keys starting with 'cache:'.
🔧 Debug
advanced
3:00remaining
Why does this ACL rule fail to restrict commands properly?
Consider the ACL rule: ACL SETUSER eve on >pass123 ~* +@write. Why can user 'eve' still run read commands?
ABecause the key pattern ~* allows access to all keys, ignoring command categories
BBecause +@write does not restrict read commands; it only adds write commands but does not remove read commands
CBecause the password >pass123 is invalid and disables the user
DBecause the user is off by default and must be explicitly enabled
Attempts:
2 left
💡 Hint
ACL rules add permissions but do not remove existing ones unless explicitly revoked.
optimization
expert
3:00remaining
Optimizing ACL rules for minimal permissions
You want to create an ACL user that can only run the commands GET and SET on keys starting with 'app:'. Which ACL rule is the most minimal and correct?
AACL SETUSER minimal on >mypassword ~app:* +GET +SET +@all
BACL SETUSER minimal on >mypassword ~app:* +@read +@write
CACL SETUSER minimal on >mypassword ~app:* +@string
DACL SETUSER minimal on >mypassword ~app:* +GET +SET
Attempts:
2 left
💡 Hint
Use explicit command names to limit permissions precisely.