Hands-on task
This task is step 8 of the course “Redis in production”
Close anonymous access to Redis
Right now anyone who can reach port 6379 works in Redis with no password and full privileges — as the default user. Close this hole:
- create an administrator
opswith passwordops-secretand full access (all commands, all keys, all channels); - make a client without authentication get refused (
NOAUTH): disabledefaultor give it a password; - the settings must survive a restart (
service redis-server restart); - the data in the database must not be harmed.
Reference:redis-cli
What you'll practise:
- redis
- ACL
- default user
- NOAUTH
- CONFIG REWRITE
- security