root: Improve Redis config and support#7118
root: Improve Redis config and support#7118PKizzle wants to merge 380 commits intogoauthentik:mainfrom
Conversation
…feature/add-redis-sentinel-support # Conflicts: # go.mod # go.sum
# Conflicts: # Dockerfile # authentik/lib/default.yml # authentik/root/settings.py # go.mod # go.sum # poetry.lock
# Conflicts: # authentik/api/v3/config.py # authentik/flows/planner.py # authentik/lib/config.py # authentik/lib/tests/test_config.py # authentik/policies/process.py # authentik/policies/reputation/signals.py # authentik/root/settings.py # lifecycle/system_migrations/to_0_13_authentik.py # lifecycle/wait_for_db.py # poetry.lock
# Conflicts: # .gitignore # authentik/api/v3/config.py # authentik/flows/planner.py # authentik/lib/tests/test_config.py # authentik/policies/process.py # authentik/policies/reputation/signals.py # authentik/root/settings.py # lifecycle/wait_for_db.py # poetry.lock
# Conflicts: # go.mod # go.sum # poetry.lock
# Conflicts: # internal/outpost/proxyv2/application/session.go # poetry.lock
Last commit that prefers old Redis env vars over Redis config URL env var. Will change logic to always prefer a configured Redis config URL and only generate one using the old env vars if necessary.
Contrary to the initial implementation the Redis config URL will not always be updated with Redis environment variables. Instead the Redis config URL can include bash style placeholders ${VAR} that reference those environment variables. If `AUTHENTIK_REDIS__URL` is not set i.e. in an old Authentik setup the Redis config URL is automatically generated and a warning message is issued to make the user aware of the necessary future configuration changes.
# Conflicts: # internal/config/config.go # internal/outpost/proxyv2/application/session.go
# Conflicts: # go.sum
Redis socket connections do not have socket keepalive options. Hence they shall not be present even if configured by the user.
|
I believe that this would resolve #9121 as well |
# Conflicts: # .github/actions/setup/action.yml # Dockerfile # lifecycle/wait_for_db.py # poetry.lock # proxy.Dockerfile
# Conflicts: # Dockerfile # authentik/lib/config.py # authentik/lib/default.yml # authentik/root/settings.py # go.mod # go.sum # internal/config/struct.go # internal/outpost/proxyv2/application/session.go # lifecycle/wait_for_db.py # poetry.lock # proxy.Dockerfile # website/docs/installation/configuration.mdx
|
Hi @PKizzle do you plan to continue this PR? Can we merge main to test it against latest authentik? |
|
@benedikt-bartscher I have not yet found the time to continue working on the PR and it will require quite some work to merge main again. The biggest issue however is that the code coverage is quite low as a lot of additional code had to be added in order to make redis-py behave correctly. To write these tests requires some deep knowledge of Redis that I do not have. (And since most of the code is deeply connected with redis-py any update on their side can easily break the current implementation). I have not fully given up on this PR but had hoped to see some improvements over at redis-py that would make maintaining it long-term much easier. |
# Conflicts: # .github/actions/setup/action.yml # .github/actions/setup/docker-compose.yml # .github/workflows/ci-main.yml # Dockerfile # authentik/lib/tests/test_config.py # authentik/root/settings.py # authentik/root/tests.py # go.mod # go.sum # internal/config/struct.go # internal/outpost/proxyv2/application/session.go # lifecycle/wait_for_db.py # poetry.lock # proxy.Dockerfile # website/developer-docs/setup/full-dev-environment.md # website/docs/installation/configuration.mdx
# Conflicts: # poetry.lock
# Conflicts: # poetry.lock
|
Gonna close this since with 2025.10 we're fully removing redis as a dependency so this won't be needed anymore |
sorry if i ask here and that information is stated obvious somewhere, but is there a release timeline for 2025.10? i have pretty dumb problems with redis or better said the subchart in my cluster and im wondering if its really worth it to still fix it or just wait it out :) Thanks :) |
|
we're targetting mid-late october, there should be a release candidate in a week or so |
Details
Resolves #5077, resolves #1285, resolves #3979, resolves #5531
External source code
Go
Python
Changes
New Features
Breaking Changes
Additional information
Todo
Move from-> not possible Async RedisCluster pubsub support redis/redis-py#2219RedisChannelLayertoRedisPubSubChannelLayerSentinel
Cluster
KEYS,MGETandMSETin Django and Celery