Repository navigation
Conversation
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
montiblanc97
marked this pull request as ready for review
September 28, 2026 13:22
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26505 +/- ##
==========================================
+ Coverage 92.02% 92.11% +0.08%
==========================================
Files 1179 1180 +1
Lines 77366 77400 +34
Branches 4121 4121
==========================================
+ Hits 71198 71296 +98
+ Misses 6115 6051 -64
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
rissson
approved these changes
Sep 28, 2026
Contributor
|
🍒 Cherry-pick to |
Contributor
|
🍒 Cherry-pick to |
rissson
pushed a commit
that referenced
this pull request
Sep 30, 2026
…tion attempts (cherry-pick #26505 to version-2026.5) (#26549) packages/django-channels-postgres: refresh pool credentials on connection attempts (#26505) Co-authored-by: Andrew Wong <[email protected]> Co-authored-by: Dominic Roy <[email protected]>
rissson
pushed a commit
that referenced
this pull request
Sep 30, 2026
…tion attempts (cherry-pick #26505 to version-2026.8) (#26548) packages/django-channels-postgres: refresh pool credentials on connection attempts (#26505) Co-authored-by: Andrew Wong <[email protected]> Co-authored-by: Dominic Roy <[email protected]>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
What does this PR change?
Pass
make_conninfoas a callable so the channel-layer pool reads fresh credentials on each connection attempt.Calling
make_conninfo()reads the password once when the pool is created. Passingmake_conninfolets psycopg call it for each new connection or retry, picking up the current token from the password file. Existing connections are unaffected.Why is this change needed?
The pool currently saves the password when it's created. With RDS IAM tokens, reconnects can keep using an expired token even after the password file has been refreshed.
authentik documents file-based configuration and password hot-reloading. This makes pool reconnects follow that behavior. The existing psycopg_pool dependency supports it.
How was this tested?
Added a regression test that rotates credentials between failed connection attempts. It fails before the fix and passes afterward using the real pool with mocked connections.
Tested in the authentik 2026.2.6 image with the updated source. Ruff passes. Full
make alland Black were not run.Linked issues
None.
AI assistance
Codex helped investigate the bug, write and test the fix, and draft this description.
Checklist
make all)make docs)