Skip to content

feat: Add configurable AWS credential provider selection#1

Merged
vlasopoulos merged 2 commits intomainfrom
feat/add-configurable-credentials-provider
Mar 20, 2026
Merged

feat: Add configurable AWS credential provider selection#1
vlasopoulos merged 2 commits intomainfrom
feat/add-configurable-credentials-provider

Conversation

@vlasopoulos
Copy link
Copy Markdown
Contributor

Summary

  • Add credential_provider config option (RDS_IAM_CREDENTIAL_PROVIDER env) to override which AWS credential provider is used for token signing
  • Supports: default, environment, ecs, web_identity, instance_profile, sso, ini
  • Defaults to default (full SDK chain) — no breaking changes

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a package-level configuration switch to explicitly select which AWS SDK credential provider is used when signing RDS IAM auth tokens, while keeping the existing “default SDK chain” behavior as the default.

Changes:

  • Added credential_provider config option (and RDS_IAM_CREDENTIAL_PROVIDER env var) with a fixed set of supported provider names.
  • Updated token generation to use the configured credential provider instead of always using the SDK default chain.
  • Added tests and documentation/CHANGELOG entries for the new configuration.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/RdsAuthTokenProvider.php Introduces resolveCredentialProvider() and wires it into AuthTokenGenerator creation.
config/rds-iam-auth.php Adds credential_provider config key backed by RDS_IAM_CREDENTIAL_PROVIDER.
tests/RdsAuthTokenProviderTest.php Adds coverage for supported provider names and unsupported provider error handling.
README.md Documents the new config option and env var.
CHANGELOG.md Notes the new configurable credential provider feature under Unreleased.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vlasopoulos vlasopoulos requested a review from dimoschi March 19, 2026 17:29
dimoschi

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

@dimoschi dimoschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice and useful. Thank you @vlasopoulos

@vlasopoulos vlasopoulos merged commit 802c829 into main Mar 20, 2026
9 checks passed
@dimoschi dimoschi deleted the feat/add-configurable-credentials-provider branch March 27, 2026 11:25
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