microsoft/code-push-server

Allow Redis TLS to be disabled

kmcrawford opened this issue · 3 comments

If using a custom installation of Redis the adding REDIS_TLS_DISABLED allows for optional Redis configuration.

 const redisConfig = {
        host: process.env.REDIS_HOST,
        port: process.env.REDIS_PORT,
      };
      if (process.env.REDIS_KEY) {
        redisConfig["auth_pass"] = process.env.REDIS_KEY;
      }
      if (!process.env.REDIS_TLS_DISABLED) {
        redisConfig["tls"] = {
          rejectUnauthorized: true,
        };
      }

Additionally this also allows for optional REDIS_KEY
The current code has it as required, when the documentation has it as optional.

https://github.com/microsoft/code-push-server/blob/main/api/script/redis-manager.ts#L105

We have updated the documentation:

  • Redis is required for Metrics to work.
  • TLS is required for Redis.

Redis TLS is required if you are running using Azure to host code push. If your infrastructure requires you to run on another cloud, than TLS is not required. I am fine closing this and leaving this as an option in my fork.