0
0
Redisquery~10 mins

ACL rules and categories 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 create a new user with read-only access to keys.

Redis
ACL SETUSER readonly_user on >password ~* +[1]
Drag options to blanks, or click blank then click option'
Aget
Bset
Cdel
Dconfig
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'set' grants write access, not read-only.
Using 'del' allows deleting keys, which is not read-only.
Using 'config' allows configuration changes, not just reading.
2fill in blank
medium

Complete the code to allow a user to execute all commands in the 'string' category.

Redis
ACL SETUSER string_user on >pass123 ~* +@[1]
Drag options to blanks, or click blank then click option'
Ahash
Blist
Cstring
Dset
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'hash' grants access to hash commands, not string.
Choosing 'list' or 'set' grants access to other data types.
3fill in blank
hard

Fix the error in the ACL command that tries to deny all commands but accidentally allows 'config'.

Redis
ACL SETUSER limited_user on >pass ~* +[1] -@all
Drag options to blanks, or click blank then click option'
Adel
Bget
Cset
Dconfig
Attempts:
3 left
💡 Hint
Common Mistakes
Not noticing that '+config' overrides '-@all'.
Confusing allowed commands with denied ones.
4fill in blank
hard

Fill both blanks to create a user that can only run commands in the 'list' category and only on keys starting with 'user:'.

Redis
ACL SETUSER list_user on >pass123 ~[1] +@[2]
Drag options to blanks, or click blank then click option'
Auser:*
Bstring
Clist
Dhash
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong key pattern that doesn't restrict keys.
Choosing the wrong command category.
5fill in blank
hard

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.

Redis
ACL SETUSER cache_user on >cachepass ~[1] +[2] +[3] -@all
Drag options to blanks, or click blank then click option'
Acache:*
Bget
Cset
Ddel
Attempts:
3 left
💡 Hint
Common Mistakes
Not denying all other commands with '-@all'.
Allowing commands not related to 'get' or 'set'.