Skip to main content

Redis authentication

By default, Redis runs without authentication and only accepts requests from the local loopback address of its host (usually the same server as Informer). Requiring a password is useful in environments where you do not trust others with access to that host. Use a long, complex password: Redis is fast and can process thousands of password attempts per second.

Redis authentication applies to Informer 5.4.x and higher.

Windows

  1. Browse to the Redis install root (by default C:\Program Files\Redis). Open redis.windows-service.conf in a text editor and find:

    # requirepass

    Uncomment it by removing the #, and set a password:

    requirepass MyReallyLongComplexPasswordGoesHere

    Save the file.

  2. Open the Informer config.json (by default at the Informer install root, C:\Entrinsik\Informer5) and find the redis block:

    "redis": {
    "host": "localhost",
    "port": 6379
    },

    Add a password matching the Redis password:

    "redis": {
    "host": "localhost",
    "port": 6379,
    "password": "MyReallyLongComplexPasswordGoesHere"
    },

    Save the file.

  3. Stop the Redis and Informer services. Start Redis first, then Informer, to apply the change.

  4. Confirm Informer starts, then test a log download (Informer logs rely on Redis): go to Administration > Logs > Download. A successful download with log data confirms a working system.

Test the authentication (optional)

Put an incorrect password in config.json and restart the Informer service. Open an elevated PowerShell window and run:

pm2 logs

You should see a Redis authentication error, and Informer will not start or be accessible. Revert the password change and restart the Informer service to restore Informer with Redis password enforcement.

Disable password enforcement

Edit redis.windows-service.conf and re-comment the line by adding # at the far left:

# requirepass MyReallyLongComplexPasswordGoesHere

Then remove the password entry from the Informer config.json redis block. Save, stop the Redis and Informer services, and start Redis first, then Informer.

Linux (Docker)

  1. Edit docker-compose.yml at the Informer install root. Find the Redis service:

    redis:
    image: redis:3.0
    environment:
    - TZ=timezonegoeshere

    Add a command that sets the password:

    redis:
    image: redis:3.0
    command: redis-server --requirepass MyReallyLongComplexPasswordGoesHere
    environment:
    - TZ=timezonegoeshere
  2. Add a matching password to each Informer service's environment:

    - redis__password=MyReallyLongComplexPasswordGoesHere
  3. Stop all Informer components:

    docker-compose stop
  4. Delete the current Informer and Redis containers (default naming shown):

    docker-compose rm redis
    docker-compose rm informer-api
    docker-compose rm informer-query
    docker-compose rm informer-schedules
  5. Bring the application back online:

    docker-compose up -d
  6. Confirm Informer starts, then test a log download (Administration > Logs > Download). A successful download with log data confirms a working system.

Test the authentication (optional)

Change the Redis password in docker-compose.yml without updating the Informer services' redis__password. Stop the components, remove the Redis container, and start again:

docker-compose stop
docker-compose rm redis
docker-compose up -d

Watch the logs on startup:

docker-compose logs -f --tail 25

You should see a Redis authentication error, and Informer will not start. Revert the password change, then stop, remove the Redis container, and start again to restore Informer with Redis password enforcement.

Disable password enforcement

Remove these entries from docker-compose.yml:

command: redis-server --requirepass MyReallyLongComplexPasswordGoesHere
- redis__password=MyReallyLongComplexPasswordGoesHere

Then stop the components, remove the Redis and Informer containers, and start the application again.