0
0
Redisquery~30 mins

ACL rules and categories in Redis - Mini Project: Build & Apply

Choose your learning style9 modes available
Redis ACL Rules and Categories
📖 Scenario: You are managing a Redis server that multiple users access. To keep things safe and organized, you want to set up Access Control Lists (ACLs) that control what commands each user can run. This helps protect your data and makes sure users only do what they are allowed to.
🎯 Goal: Build a Redis ACL setup where you create users with specific command categories allowed. You will define users, assign command categories, and verify the ACL rules.
📋 What You'll Learn
Create a Redis user named guest with permission to run only commands in the read category
Create a Redis user named admin with permission to run commands in the allcommands category
Set a password for each user: guestpass for guest and adminpass for admin
Verify the ACL rules by listing users and their allowed categories
💡 Why This Matters
🌍 Real World
In real Redis deployments, ACLs help protect data by limiting what commands users can run. This prevents accidental or malicious changes.
💼 Career
Database administrators and backend developers use Redis ACLs to secure multi-user environments and enforce access policies.
Progress0 / 4 steps
1
Create the guest user with read-only access
Use the Redis ACL command to create a user called guest with the password guestpass and allow only commands in the read category.
Redis
Need a hint?

Use ACL SETUSER with on to enable the user, >password to set the password, and +@read to allow read commands.

2
Create the admin user with full access
Use the Redis ACL command to create a user called admin with the password adminpass and allow all commands using the allcommands category.
Redis
Need a hint?

Remember to use +@allcommands to allow all commands for the admin user.

3
List all users to verify creation
Use the Redis ACL command to list all users and confirm that guest and admin exist.
Redis
Need a hint?

Use ACL USERS to see all users.

4
Show the ACL categories allowed for each user
Use the Redis ACL command to get detailed info about the guest and admin users, showing their allowed command categories.
Redis
Need a hint?

Use ACL GETUSER username to see the rules for each user.