-
Notifications
You must be signed in to change notification settings - Fork 185
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
Pass AWS client configuration to STSProfileWithWebIdentityCredentialsProvider
.
#4641
Conversation
…CredentialsProvider`.
@@ -132,11 +132,15 @@ class /* AWS_IDENTITY_MANAGEMENT_API */ | |||
const Aws::String& externalID, | |||
Aws::STS::STSClient* client); | |||
|
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.
We could document this function and the one above, not a blocker as this is high priority.
STSProfileWithWebIdentityCredentialsProvider
.STSProfileWithWebIdentityCredentialsProvider
.
Aws::Client::ClientConfiguration config; | ||
config.scheme = Aws::Http::Scheme::HTTPS; | ||
config.region = tmpRegion; | ||
AssumeRoleWithWebIdentityRequest request; |
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.
Is this change based on upstream changes? We seem to be missing the retry strategy now?
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.
config.retryStrategy = | ||
Aws::MakeShared<Aws::Client::SpecifiedRetryableErrorsRetryStrategy>( | ||
CLASS_TAG, retryableErrors, 3 /*maxRetries*/); | ||
auto outcome = client->AssumeRoleWithWebIdentity(request); |
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.
Why the change from GetAssumeRoleWithWebIdentityCredentials
?
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.
The changes in this method's logic were to replace the use of internal APIs with public ones.
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.
Is there a requirement to do that now? Seeing how we've already had issues for 2 releases, in my opinion it'd be much better to minimize changes needed to solve the issue. We can then follow up with refactoring and additional testing.
If there is a high degree of confidence and there has been sufficient testing and validation of these changes, then I'm okay to move forward, but I don't like mixing defect fixes and refactoring that is not required for the defect fix.
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.
These are the changes that got successfully validated yesterday. We have to use the public STSClient
class provided by the user because it has been created with the right client configuration.
…sProvider`. (#4641) This PR applies a similar fix to #4616 but for `STSProfileWithWebIdentityCredentialsProvider`. That class was also adjusted to prevent a memory leak, to use the user-provided `STSClient` if available, and to use public APIs. The issue has been validated to be fixed. --- TYPE: BUG DESC: Fix HTTP requests for AWS assume role with web identity not honoring config options. (cherry picked from commit 4498063)
…sProvider`. (#4641) This PR applies a similar fix to #4616 but for `STSProfileWithWebIdentityCredentialsProvider`. That class was also adjusted to prevent a memory leak, to use the user-provided `STSClient` if available, and to use public APIs. The issue has been validated to be fixed. --- TYPE: BUG DESC: Fix HTTP requests for AWS assume role with web identity not honoring config options. (cherry picked from commit 4498063)
…in. (#5315) [SC-55378](https://app.shortcut.com/tiledb-inc/story/55378/ensure-all-aws-clients-and-credentials-providers-are-being-passed-client-configuration) This PR applies a similar fix to #4641, but for the `DefaultAWSCredentialsProviderChain` which was being implicitly used when we don't pass any credentials provider to `S3Client` (it's now explicitly used). Because `DefaultAWSCredentialsProviderChain` does not accept a `ClientConfiguration`, I copied its sources, as well as the sources of all applicable credentials providers and updated them to accept a `ClientConfiguration`. This is a temporary measure until the changes to the providers are upstreamed to the AWS SDK. You are encouraged to review this PR by looking at each commit individually. --- TYPE: BUG DESC: Fix HTTP requests for AWS default credentials provider chain not honoring config options.
…in. (#5315) [SC-55378](https://app.shortcut.com/tiledb-inc/story/55378/ensure-all-aws-clients-and-credentials-providers-are-being-passed-client-configuration) This PR applies a similar fix to #4641, but for the `DefaultAWSCredentialsProviderChain` which was being implicitly used when we don't pass any credentials provider to `S3Client` (it's now explicitly used). Because `DefaultAWSCredentialsProviderChain` does not accept a `ClientConfiguration`, I copied its sources, as well as the sources of all applicable credentials providers and updated them to accept a `ClientConfiguration`. This is a temporary measure until the changes to the providers are upstreamed to the AWS SDK. You are encouraged to review this PR by looking at each commit individually. --- TYPE: BUG DESC: Fix HTTP requests for AWS default credentials provider chain not honoring config options.
This PR applies a similar fix to #4616 but for
STSProfileWithWebIdentityCredentialsProvider
. That class was also adjusted to prevent a memory leak, to use the user-providedSTSClient
if available, and to use public APIs.The issue has been validated to be fixed.
TYPE: BUG
DESC: Fix HTTP requests for AWS assume role with web identity not honoring config options.