fix: authenticate PostgreSQL IAM connections on demand - #421
Draft
deinspanjer wants to merge 2 commits into
Draft
deinspanjer wants to merge 2 commits into
deinspanjer wants to merge 2 commits into
Conversation
added 2 commits
September 12, 2026 13:14
Resolve IAM passwords when opening a connection so failed login attempts remain retryable. - Keep pools available after idle disconnects and share concurrent authentication. - Preserve AWS provider selection and reread refreshed credential files. - Cover recovery with real pg and isolated AWS SDK checks.
- Use the pool SSL type instead of the nonexistent pg.ConnectionOptions export.
Contributor
Author
|
I'll spend next week testing this build live in my normal workflow, including credential renewal and recovery after authentication failures. I'll keep this PR in draft and mark it ready for review after that testing is complete. |
LVLNo1One
approved these changes
Sep 23, 2026
LVLNo1One
approved these changes
Sep 23, 2026
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.
PostgreSQL IAM pool rotation disconnects healthy sessions every 14 minutes. If credential renewal fails, subsequent requests can report that a configured source is missing even after the user signs in again.
Resolve IAM passwords through pg's async password callback when a physical connection opens. Keep the pool/source available after failed authentication or an idle-session disconnect, so a later request can recover without restarting DBHub.
pg.PoolConfig["ssl"].Validation:
tsc --noEmitreports 132 diagnostics versus 133 on clean upstream: the existing PostgreSQL SSL type error is fixed, with no new diagnostics. The full Docker integration suite was not run locally.Real multi-hour role/session expiry and interactive browser authorization still need a longer local trial. SSO, web identity, role assumption, and container/instance providers retain SDK routing; they were researched against primary sources but not all exercised end to end.