Help Center> Distributed Cache Service> FAQs> Security> How Can I Secure My DCS Redis Instances?
Updated on 2024-06-19 GMT+08:00

How Can I Secure My DCS Redis Instances?

Redis is one of the most powerful and widely used open-source cache technologies. However, the open-source Redis does not have robust security features of its own. It is vulnerable to malicious Internet attacks, possibly causing data breaches.

To secure your DCS Redis instances, consider taking the following advice:

  • Network connection configurations
    1. Encrypt sensitive data.

      Sensitive data must be encrypted before being stored.

    2. Configure ECS firewalls.

      Configure firewall filtering rules for the ECS where your client runs.

    3. Set the instance password.
    4. Configure a whitelist.
  • redis-cli usage
    1. Hide the password.

      Problem: If the -a <password> option is used, the password may show up when the ps command is run.

      Solution: Modify the Redis source code. Hide the password immediately after starting redis-cli by calling the main function.

    2. Disable sudo in running scripts.

      Problem: Parameters for starting redis-cli contain sensitive patterns related to the password, which may show up when the ps command is run and may be logged.

      Solution: Access the instance by calling APIs (or through redis-py in Python). Do not allow switching to the dbuser user using sudo in redis-cli.

Security FAQs

more