-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure identity resolver is set when a credentials provider is given only at operation level #3156
Merged
ysaito1001
merged 10 commits into
main
from
ysaito/do-ensure-auth-scheme-exists-for-config-override
Nov 10, 2023
Merged
Ensure identity resolver is set when a credentials provider is given only at operation level #3156
ysaito1001
merged 10 commits into
main
from
ysaito/do-ensure-auth-scheme-exists-for-config-override
Nov 10, 2023
Conversation
This file contains 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
A new generated diff is ready to view.
A new doc preview is ready to view. |
jdisanti
reviewed
Nov 8, 2023
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CredentialProviders.kt
Show resolved
Hide resolved
This commit addresses #3156 (comment)
A new generated diff is ready to view.
A new doc preview is ready to view. |
jdisanti
approved these changes
Nov 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
A new generated diff is ready to view.
A new doc preview is ready to view. |
This commit updates request authorization in test request used in `generate_random` because the PR now causes `Credentials::for_tests_with_session_token` to take priority, instead of a credentials provider set by `with_test_defaults`.
…' of https://github.com/awslabs/smithy-rs into ysaito/do-ensure-auth-scheme-exists-for-config-override
ysaito1001
deleted the
ysaito/do-ensure-auth-scheme-exists-for-config-override
branch
November 10, 2023 05:56
rcoh
pushed a commit
that referenced
this pull request
Nov 13, 2023
…only at operation level (#3156) Fixes awslabs/aws-sdk-rust#901 This PR is a rework of #3021 whose fix was inadvertently discarded during #3077. The way we fix the issue is slightly different. In this PR, we add an identity resolver to runtime components within `set_credentials_provider`, instead of using `ServiceConfig.OperationConfigOverride`. Added a Kotlin integration test to `CredentialProviderConfigTest.kt` based on the customer reported issue. <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [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._
rcoh
pushed a commit
that referenced
this pull request
Nov 13, 2023
…only at operation level (#3156) Fixes awslabs/aws-sdk-rust#901 This PR is a rework of #3021 whose fix was inadvertently discarded during #3077. The way we fix the issue is slightly different. In this PR, we add an identity resolver to runtime components within `set_credentials_provider`, instead of using `ServiceConfig.OperationConfigOverride`. Added a Kotlin integration test to `CredentialProviderConfigTest.kt` based on the customer reported issue. <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [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._
This was referenced Nov 24, 2023
This was referenced Nov 30, 2023
rcoh
pushed a commit
that referenced
this pull request
Dec 1, 2023
…evisouly set (#3278) ## Motivation and Context Fixes awslabs/aws-sdk-rust#973 ## Description Prior to the PR, if a customer explicitly passed a credentials provider to a client's config `Builder::set_credentials_provider`, what's passed did not override a credentials provider previously set ([actual use case](awslabs/aws-sdk-rust#973 (comment))). While in general, we recommend customers single-source a credentials provider through [aws_config::ConfigLoader::credentials_provider](https://docs.rs/aws-config/1.0.1/aws_config/struct.ConfigLoader.html#method.credentials_provider), we should eliminate the said footgun in case they directly pass a credentials provider to a client's config `Builder`. The PR reverts test signature updates in #3156 (in hindsight, having to update test signatures in that PR was a sign of regression). ## Testing Added a Kotlin test to `CredentialProviderConfigTest.kt` to verify the fix ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [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: John DiSanti <[email protected]>
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.
Motivation and Context
Fixes awslabs/aws-sdk-rust#901
Description
This PR is a rework of #3021 whose fix was inadvertently discarded during #3077. The way we fix the issue is slightly different. In this PR, we add an identity resolver to runtime components within
set_credentials_provider
, instead of usingServiceConfig.OperationConfigOverride
.Testing
Added a Kotlin integration test to
CredentialProviderConfigTest.kt
based on the customer reported issue.Checklist
CHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.