Redis ACL users explained
Doha I. · Published · Lire en français

Redis ACLs (since Redis 6) let you create users that may only run certain commands on certain keys. Give each service its own user, restricted to its key prefix (for example cache: or sessions:) and to the commands it needs, so a bug or a leaked password in one service cannot read or wipe another's data.
For years, Redis had one password for everything. A leaked password, or a FLUSHALL in the wrong script, could wipe every key. Access control lists changed that.
What an ACL user is
A Redis ACL user has:
- a password;
- the commands it may run (for example only
GET,SET,EXPIRE); - the keys it may touch, usually by pattern (
cache:*).
ACL SETUSER api on >strong-password ~cache:* +get +set +expire
A simple rule: one user per service
| Service | Keys | Commands |
|---|---|---|
| Web app cache | cache:* |
read and write |
| Session store | sessions:* |
read and write |
| Analytics job | cache:* |
read only |
A bug in the analytics job cannot delete sessions, and a leaked cache password cannot read them.
Habits that help
- Prefix every key by its owner, even before you need ACLs.
- Never give
FLUSHALL,FLUSHDBorCONFIGto an application user. - Rotate a service's password by creating a new user, switching the app, then deleting the old one.
Redis users on LordBase
On LordBase, every Redis user you create gets a required key prefix, so separation by service is the default, not an option you have to remember. The web editor runs a limited, safe command set, and logical backups can be restored. Users are created in the dashboard, the API, or from an AI assistant through the MCP server.
