feat: support per-source AWS profiles - #405
Merged
tianzhou merged 2 commits intoAug 21, 2026
Merged
Conversation
added 2 commits
August 20, 2026 13:54
- Resolve explicitly configured AWS profiles without credential fallback - Validate and document the IAM profile configuration contract - Keep cloud authentication dependencies optional and outside MCP bundles
- Add AWS IAM fields to the TOML source reference - Explain strict profile resolution and default-chain behavior
tianzhou
reviewed
Aug 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds strict, per-source AWS profile selection for RDS IAM authentication while retaining the default credential chain when omitted.
Changes:
- Validates and forwards
aws_profileduring token generation and refresh. - Adds credential-provider packaging and build configuration.
- Adds tests and configuration/security documentation.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tsup.config.ts |
Externalizes the credential provider. |
src/utils/aws-rds-signer.ts |
Resolves named AWS profiles. |
src/utils/__tests__/aws-rds-signer.test.ts |
Tests profile provider selection. |
src/types/config.ts |
Adds the profile configuration field. |
src/connectors/manager.ts |
Forwards profiles during token creation. |
src/connectors/__tests__/manager.test.ts |
Tests profile forwarding. |
src/config/toml-loader.ts |
Validates profile configuration. |
src/config/__tests__/toml-loader.test.ts |
Covers profile validation. |
scripts/build-mcpb.mjs |
Excludes cloud credentials from MCPB. |
package.json |
Declares the credential provider dependency. |
pnpm-lock.yaml |
Locks the new dependency. |
docs/config/toml.mdx |
Documents AWS IAM profile configuration. |
docs/adr/0001-strict-per-source-aws-profiles.md |
Records the security decision. |
dbhub.toml.example |
Adds profile examples. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tianzhou
approved these changes
Aug 21, 2026
tianzhou
left a comment
Member
There was a problem hiding this comment.
LGTM. Thanks for the contribution.
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.
Summary
aws_profileconfiguration for AWS RDS IAM-authenticated sources.aws_profileis omitted.aws_profileis non-empty and only used withaws_iam_auth = true.Security behavior
An explicitly configured
aws_profileis authoritative. If that profile cannot resolve credentials, DBHub reports an authentication failure rather than falling through to environment, container, or instance credentials.Sources without
aws_profileretain the existing default credential-chain behavior.Testing
pnpm test:unit— 962 tests passedpnpm run buildpnpm run test:build— 6 connector checks passedpnpm run build:mcpbpnpm run test:mcpbManual validation also succeeded with two AWS shared-config profiles using
credential_processagainst Aurora PostgreSQL endpoints.