-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support passing ClientConfiguration
to web identity credentials provider.
#3116
base: main
Are you sure you want to change the base?
Conversation
fbe2fef
to
ad8df6a
Compare
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 ok to me otherwise. Now region needs to be passed through the config, there is no fallback
@sbera87 what do you mean? I don't understand. |
@@ -25,7 +25,7 @@ namespace Aws | |||
class AWS_CORE_API STSAssumeRoleWebIdentityCredentialsProvider : public AWSCredentialsProvider | |||
{ | |||
public: | |||
STSAssumeRoleWebIdentityCredentialsProvider(); | |||
STSAssumeRoleWebIdentityCredentialsProvider(Aws::Client::ClientConfiguration config = {}); |
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.
I'm really sorry for a a big delay in the handling of this PR.
I've been running a CI check and just noticed that
it is actually changing the default constructor to make an IMDS call (to resolve a region, not always though, but still...), this is a significant change of existing behavior.
could you please change it to
STSAssumeRoleWebIdentityCredentialsProvider(Aws::Client::ClientConfiguration config = {Aws::Client::ClientConfigurationInitValues{true}});
so IMDS won't be auto-enabled?
We should be able to merge the PR shortly after this.
Thank you!
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.
Done.
The client config will fallback to the us-east-1 if not set:
|
Sorry, it has failed the build.
Let me handle the update for this PR. |
Issue #, if available:
Description of changes: This PR updates the constructor of
STSAssumeRoleWebIdentityCredentialsProvider
to accept an optionalClientConfiguration
parameter.Also the provider no longer tries to determine itself the region to use and instead always defers to the region specified in the config. This shouldn't have any practical effect since the default constructor of
ClientConfiguration
has a similar (and slightly more extensive) logic either way.Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.