Skip to content
Unverified Commit 40aaa1e4 authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Ensure identity resolver exists when a credentials provider is given only at...

Ensure identity resolver exists when a credentials provider is given only at operation level (#3021)

## Motivation and Context
Fixes https://github.com/awslabs/aws-sdk-rust/issues/901

## Description
When a credentials provider is specified _only_ at the operation level
(but not at the service config level), the code in the above PR fails on
request dispatch, saying `NoMatchingAuthScheme`. This occurs today
because if we [do not set a credentials provider at the service config
level](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/kms/src/config.rs#L757-L769),
we will [not set the identity resolver for
sigv4](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/kms/src/config.rs#L811-L818

).
The same goes for configuring a `SigningRegion` when it is only supplied
at the operation level.

This PR fixes the said issue so that `config_override` sets
- the identity resolver for sigv4 when a credentials provider is
supplied only at the operation config level
- a `SigningRegion` when a `Region` is given only at the operation level

## Testing
Added a Kotlin integ test
`test_specifying_credentials_provider_only_at_operation_level_should_work`
based on the customer reported PR.

## Checklist
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: default avatarJohn DiSanti <jdisanti@amazon.com>
parent cd09fd27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment