Redis is often used to store important data. What is the main risk if Redis is left unsecured on a public network?
Think about what happens if anyone can connect to your Redis server.
If Redis is not secured, anyone who can connect can read or modify your data. This can cause data loss or leaks.
Assume Redis is configured with a password. What will happen if a client tries to run GET key1 without authenticating first?
GET key1
Redis requires clients to authenticate if a password is set.
When a password is set, Redis rejects commands from unauthenticated clients with a NOAUTH error.
Choose the correct line to add in the Redis configuration file to require clients to authenticate with password mypassword.
Check the official Redis config directive for password protection.
The correct directive is requirepass followed by the password.
You want to keep Redis running on your server but prevent it from being accessed from outside your local machine. What is the best configuration change?
Think about restricting network access to only local connections.
Binding Redis to 127.0.0.1 restricts access to the local machine, preventing remote connections.
You run the command SET user:1 "Alice" on a Redis server that has requirepass secret123 set in its config. The command returns (error) NOAUTH Authentication required.. What is the reason?
Think about the order of commands when authentication is required.
When Redis requires a password, clients must authenticate first using AUTH before running other commands.