Skip to content

Restore per-request credential override in AwsExecutionContextBuilder#7032

Open
S-Saranya1 wants to merge 1 commit into
feature/master/core-interceptors-migrationfrom
somepal/fix-request-credential-override
Open

Restore per-request credential override in AwsExecutionContextBuilder#7032
S-Saranya1 wants to merge 1 commit into
feature/master/core-interceptors-migrationfrom
somepal/fix-request-credential-override

Conversation

@S-Saranya1

@S-Saranya1 S-Saranya1 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

Per-request credential overrides via AwsRequestOverrideConfiguration.credentialsProvider() were silently ignored when using new core with old service clients. The override was only applied in AuthSchemeResolutionStage, which exits early when AUTH_SCHEME_OPTIONS_RESOLVER is not set - an attribute only new codegen produces.

Modifications

Restored application of per-request credential overrides in AwsExecutionContextBuilder.putAuthSchemeResolutionAttributes() so that IDENTITY_PROVIDERS reflects the override at context construction time, before the old generated AuthSchemeInterceptor reads it.

Testing

  • Added unit test in AwsExecutionContextBuilderTest verifying that IDENTITY_PROVIDERS contains the per-request credential override even when AUTH_SCHEME_OPTIONS_RESOLVER is not set.
  • Also verified locally with old-client-version-compatibility-test using DynamoDB 2.40.12 (post-SRA, pre-pipeline-stage) to confirm the fix works end-to-end with an actual old service client and new core.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@S-Saranya1 S-Saranya1 requested a review from a team as a code owner June 11, 2026 22:39
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.

1 participant