-
Notifications
You must be signed in to change notification settings - Fork 247
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
config_override results in DispatchFailure #901
Comments
Hey @anmlsngh, thanks for submitting this issue. Here's what I think is going on: Because of how you're constructing your config, it's not including an auth scheme. What is an auth scheme? It's a new orchestrator-related concept:
In your case, since you're trying to use KMS, it requires the Sigv4 auth scheme. I'm guessing that when you perform the config override, that that's where the bug is. My guess is that config_override isn't respecting the auth schemes that are set by default when making requests with an AWS service client. I'll put this issue on our backlog, although this is a busy week for us and it might take a week or two for us to take a look at this. If you absolutely can't wait that long, the workaround I recommend is to create a client + config the usual way instead of using the config override mechanism. |
My goal is to create a client that gets passed in different credentials to be used for each request (ex. the client is not tied to any particular credentials, but instead uses different credentials on each request that is passed in). If I understand correctly, creating a client + config the usual way would mean I would have to make a new client on each request because each client's creation is tied a specific set of credentials in a config. Is there a work-around for where I can pass in credentials and the client uses those credentials (without using |
I think the only workaround right now would be to construct a new client every time, and do it in such a way that all the new clients reuse the same HTTP connector so that you're not paying the price for TLS connect every time. This can be done by settings the |
|
Still pending to release the fix |
|
Bad bot. |
@jdisanti this was actually a shockingly good bot—it saw the sync'd commit and closed the issue! Honestly, this may be the best way to close issues on the Rust SDK if we can get it to work reliably... |
|
This issue still seems to be a problem. |
…only at operation level (#3156) ## 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 using `ServiceConfig.OperationConfigOverride`. ## Testing Added a Kotlin integration test to `CredentialProviderConfigTest.kt` based on the customer reported issue. ## 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._
|
…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._
…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._
I was expecting the override option to work in the below case for credentials.
I used the aws_config::defaults(). It seems no_credentials had to be called on the first config object. |
is it possible to send a small reproducer? |
I took the same example of yours and modified a little bit. Here is how it looks.
I supply invalid credentials in the first config and then override it with valid config. |
Got it. I've reproduced this issue. We'll get a fix out soon. |
Great, fixed. We'll re-close this once the updated fix lands. Thanks for the reproducer! |
This fix is now live in the latest version of this sdk. Please let us know if you have any other issues with using this sdk. |
Comments on closed issues are hard for our team to see. |
Describe the bug
I am trying to create a client with no credentials, then use
config_override
to pass in credentials on request. When trying to doconfig_override()
to use new credentials for a call to KMS, the call results in a DispatchFailure. See code snippet for bug replication.Expected Behavior
I expect the result of the call to KMS with
config_override
to give me back the correct decrypted result.Current Behavior
The call using
config_override
returnsReproduction Steps
Possible Solution
No response
Additional Information/Context
In code snippet replicating the problem, you will have to use your own KMS key and AWS credentials.
Version
Environment details (OS name and version, etc.)
Amazon Linux 2
Logs
The text was updated successfully, but these errors were encountered: