0
0
Redisquery~10 mins

ACL system for user permissions in Redis - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a user with read-only access to all keys.

Redis
ACL SETUSER alice on >password ~* +@[1]
Drag options to blanks, or click blank then click option'
Awrite
Bread
Callcommands
Dnopass
Attempts:
3 left
💡 Hint
Common Mistakes
Using +write grants write permissions, not read-only.
Using +allcommands grants all permissions, not read-only.
2fill in blank
medium

Complete the code to create a user 'bob' with password 'secret' and only permission to set keys.

Redis
ACL SETUSER bob on >[1] ~* +[2]
Drag options to blanks, or click blank then click option'
Asecret
Bpassword
Cset
Dget
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing the password with the permission name.
Using +get instead of +set for setting keys.
3fill in blank
hard

Fix the error in the command to remove all permissions from user 'charlie'.

Redis
ACL SETUSER charlie [1]
Drag options to blanks, or click blank then click option'
Areset
Bdelete
Coff
Dremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using off disables the user but does not reset permissions.
Using delete or remove are invalid commands.
4fill in blank
hard

Fill both blanks to allow user 'dave' to only read keys starting with 'app:' and execute the 'get' command.

Redis
ACL SETUSER dave on >pass123 ~[1] +[2]
Drag options to blanks, or click blank then click option'
Aapp:*
Bapp:
Cget
Dset
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'app:' without wildcard does not match keys properly.
Using +set instead of +get grants write permission.
5fill in blank
hard

Fill all three blanks to create a user 'eve' with password '1234', access only to keys starting with 'user:', and permission to execute 'set' command.

Redis
ACL SETUSER eve on >[1] ~[2] +[3]
Drag options to blanks, or click blank then click option'
A1234
Buser:*
Cget
Dset
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the wildcard * in the key pattern.
Confusing the commands and permissions.