Challenge - 5 Problems
Redis ACL Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate2:00remaining
Check user permission with ACL GETUSER
Given a Redis ACL user named
What is the output of the command
alice with the following rules:ACL SETUSER alice on >password ~* +get +set -delWhat is the output of the command
ACL GETUSER alice?Redis
ACL GETUSER alice
Attempts:
2 left
💡 Hint
Remember that the '-' before a command means it is denied and won't appear in the allowed commands list.
✗ Incorrect
The ACL GETUSER command returns the user's flags, password, allowed commands, and key patterns. Since 'del' is denied (-del), it does not appear in the commands list.
🧠 Conceptual
intermediate2:00remaining
Understanding ACL command permissions
Which of the following ACL command rules correctly allows a user to only run
GET and SET commands but denies DEL and all other commands?Attempts:
2 left
💡 Hint
Look for the option that explicitly denies DEL and only allows GET and SET.
✗ Incorrect
Option B explicitly allows GET and SET commands and denies DEL. Other commands are implicitly denied because they are not allowed.
📝 Syntax
advanced2:00remaining
Identify the syntax error in ACL SETUSER command
Which option contains a syntax error when trying to create a user
bob with password secret and allow only GET and SET commands?Attempts:
2 left
💡 Hint
Check if the keys pattern (~*) is missing which is required to specify accessible keys.
✗ Incorrect
Option A is missing the keys pattern (~*), which is required to specify which keys the user can access. This causes a syntax error.
❓ optimization
advanced2:00remaining
Optimizing ACL rules for minimal permissions
You want to create a Redis ACL user
readonly that can only read keys matching cache:* and run GET and EXISTS commands. Which ACL SETUSER command is the most precise and minimal?Attempts:
2 left
💡 Hint
Minimal permissions mean only allowing necessary keys and commands.
✗ Incorrect
Option C restricts keys to 'cache:*' and allows only GET and EXISTS commands, which is the minimal required permission set.
🔧 Debug
expert2:00remaining
Debugging unexpected ACL denial
A Redis user
However, when running
writer is created with:ACL SETUSER writer on >writepass ~data:* +set +delHowever, when running
SET data:1 value, the command is denied. What is the most likely cause?Attempts:
2 left
💡 Hint
Check if the user has the correct flags to allow key pattern matching.
✗ Incorrect
Without the 'allkeys' flag, Redis does not allow key pattern matching for ACLs, so the key 'data:1' is not accessible despite the pattern.