Skip to content
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

fix s3 copy constructor #2798

Merged
merged 1 commit into from
Dec 21, 2023
Merged

fix s3 copy constructor #2798

merged 1 commit into from
Dec 21, 2023

Conversation

sbiscigl
Copy link
Contributor

Description of changes:

There is currently a bug where if you copy construct a S3Client it will use the default credential provider chain instead of a specified credential change. This changes the copy ctor to re-create the signers with previously provided credential provider.

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

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

#include <aws/core/auth/AWSCredentialsProviderChain.h>

std::shared_ptr<AWSCredentialsProvider> AWSAuthSignerProvider::GetCredentialsProvider() const {
return MakeShared<DefaultAWSCredentialsProviderChain>("AWSAuthSignerProvider");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a perfect world i would want to make the function pure virutal, but for backwards compat we can return the default credential provider.

@sbiscigl sbiscigl marked this pull request as ready for review December 21, 2023 20:39
@sbiscigl sbiscigl merged commit f2e20d9 into main Dec 21, 2023
4 checks passed
@sbiscigl sbiscigl deleted the s3-copy-ctor branch December 21, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants