Skip to content

fix: pooled connections created with stale credentials#452

Open
karenc-bq wants to merge 1 commit into
mainfrom
fix/pooled-connection-properties
Open

fix: pooled connections created with stale credentials#452
karenc-bq wants to merge 1 commit into
mainfrom
fix/pooled-connection-properties

Conversation

@karenc-bq

@karenc-bq karenc-bq commented May 6, 2026

Copy link
Copy Markdown
Contributor

Description

Wrapper caches the connection creation function, causing pooled connections to always be populated with the initial connection properties.
This impacts long running applications using temporary credentials, as new pooled connections created with stale credentials will fail. This PR updates the pooled connection provider's connect method to use the latest DSN when creating connections.

Testing

Additional Reviewers

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq karenc-bq requested a review from a team as a code owner May 6, 2026 02:41
Comment thread awssql/internal_pool/internal_pooled_connection_provider.go
@karenc-bq karenc-bq force-pushed the fix/pooled-connection-properties branch from 5d4adbd to c8d7af4 Compare May 20, 2026 16:57
@DerbySoft-GYB

Copy link
Copy Markdown

Hi @sophia-bq, @karenc-bq

While this PR addresses the stale credentials, could a more flexible architectural approach be adopted to solve such issues, such as a driver chain like: AWS Wrapper Driver -> Credentials Wrapper Driver -> Physical MySQL Driver?

Specifically, could the UnderlyingDriver in the mysql-driver implementation be made injectable or configurable? This would allow users to provide a Credentials Wrapper Driver to implement specialized credential logic requirements. Currently, because the physical driver is hardcoded, users who need custom logic must maintain their own full wrapper implementations, which increases maintenance overhead whenever the internal interfaces of the wrapper evolve.

What do you think about this direction for future extensibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants