Build the mental model
Redis should not be exposed to the public internet. Use private networking and firewalls, TLS transport, ACL users, strong rotated credentials, and restrictions on dangerous commands. ACL rules can limit command categories and key patterns; give each application or service its own identity.
Connect it to a real scenario
Allow the web API user only required commands on `tutorial:*` and `session:*`; allow the worker only stream commands. Enable TLS certificate verification, source credentials from a secret manager, test dual-credential rotation, and inspect the ACL log.
Try the working example
ACL SETUSER tutorial-api on >strong-rotated-secret ~tutorial:* ~session:* +@read +@write -@dangerous
ACL LIST
ACL GETUSER tutorial-api
ACL LOG 10
# redis-cli --tls --cacert ca.crt --user tutorial-api --askpassYou get a scoped application identity and an audit trail for ACL denials.5-minute try-it
Write a least-privilege ACL rule for a read-only analytics service.
One important caution
Do not treat command renaming as the security boundary; network, TLS, ACL, and secret controls all matter.
Redis — TLS — Redis