Redis Basics
Redis Commands
Redis Advanced
Redis Useful Resources
Selected Reading
Redis Commands
- Redis - Server
- Redis - Connections
- Redis - Scripting
- Redis - Transactions
- Redis - Publish Subscribe
- Redis - HyperLogLog
- Redis - Sorted Sets
- Redis - Sets
- Redis - Lists
- Redis - Hashes
- Redis - Strings
- Redis - Keys
- Redis - Commands
Redis Advanced
- Redis - Php
- Redis - Java
- Redis - Partitioning
- Redis - Pipelining
- Redis - Client Connection
- Redis - Benchmarks
- Redis - Security
- Redis - Backup
Redis Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Redis - Security
Redis - Security
Redis database can be secured, such that any cpent making a connection needs to authenticate before executing a command. To secure Redis, you need to set the password in the config file.
Example
Following example shows the steps to secure your Redis instance.
127.0.0.1:6379> CONFIG get requirepass 1) "requirepass" 2) ""
By default, this property is blank, which means no password is set for this instance. You can change this property by executing the following command.
127.0.0.1:6379> CONFIG set requirepass "tutorialspoint" OK 127.0.0.1:6379> CONFIG get requirepass 1) "requirepass" 2) "tutorialspoint"
After setting the password, if any cpent runs the command without authentication, then (error) NOAUTH Authentication required. error will return. Hence, the cpent needs to use AUTH command to authenticate himself.
Syntax
Following is the basic syntax of AUTH command.
127.0.0.1:6379> AUTH password
Example
127.0.0.1:6379> AUTH "tutorialspoint" OK 127.0.0.1:6379> SET mykey "Test value" OK 127.0.0.1:6379> GET mykey "Test value"Advertisements