Skip to content

Redis Username is ignored #8183

@awr

Description

@awr

Describe the bug
I cannot connect to AWS MemoryDB with a user since I specifying the redis username with AUTHENTIK_REDIS__USERNAME has no effect.

To Reproduce
Steps to reproduce the behavior:

Set the env var AUTHENTIK_REDIS__USERNAME to some non-empty value.
I'm using this with tls, so set AUTHENTIK_REDIS__TLS: "true"
For testing, set AUTHENTIK_REDIS__HOST to a bogus value like this-does-not-exist.example.com
Start the worker or the server, and see the error in the logs. It will contain the redis_url which has no username specified.

Looking at settings.py, I don't see the username being added anywhere.

Expected behavior
I expect the username to be part of the connection, to enable ACLs which are needed for MemoryDB

Screenshots
N/A

Logs
Output of kubectl logs

{"event": "Redis Connection failed, retrying... (invalid username-password pair or user is disabled.)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1705375094.3045342, "redis_url": "rediss://:secretpassword@clustercfg.test-cluster.md65rt.memorydb.ca-central-1.amazonaws.com:6379/0"}
{"event": "Redis Connection failed, retrying... (invalid username-password pair or user is disabled.)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1705375095.347511, "redis_url": "rediss://:secretpassword@clustercfg.test-cluster.md65rt.memorydb.ca-central-1.amazonaws.com:6379/0"}
{"event": "Redis Connection failed, retrying... (invalid username-password pair or user is disabled.)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1705375096.385973, "redis_url": "rediss://:secretpassword@clustercfg.test-cluster.md65rt.memorydb.ca-central-1.amazonaws.com:6379/0"}

Version and Deployment (please complete the following information):

  • authentik version:2023.10.6
  • Deployment: helm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions