Database / REDIS
How do you secure Redis access using ACLs?
Redis's Access Control List (ACL) system lets you define named users, each with their own password, and fine-grained permissions over which commands they can run and which keys they can touch — a meaningful step up from the older, single shared-password requirepass model, which offered no per-user distinction at all.
ACL SETUSER app-readonly on >secretpass ~cache:* +get +mget -@write ACL SETUSER app-writer on >anotherpass ~orders:* +@all -flushall -flushdb ACL LIST
The pattern above shows the key building blocks: ~pattern restricts which keys a user can access (glob-style, so ~cache:* limits the user to keys under that prefix), +command/-command grants or denies specific commands, and +@category/-@category does the same for whole command categories (like @write or @dangerous). This lets a deployment give a read-only reporting service exactly read access to its own key namespace, while a different service gets write access scoped to its own keys, with neither able to run administrative commands like FLUSHALL — a level of least-privilege access control that a single shared password can't express at all.
More Related questions...
