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

Adds async methods for assuming roles #3627

Open
wants to merge 1 commit into
base: main-staging
Choose a base branch
from

Conversation

mscottford
Copy link

Adds async pathways for assuming a role.

Description

Adds async version of AssumeRoleAWSCredentials.GenerateNewCredentials and subsequent method call chain.

Motivation and Context

There was no async pathway for assuming a role. This is causing issues on platforms that do not support calling HttpClient.Send such as Android and iOS.

This should fix #3626.

Testing

All tests in UnitTests.NetStandard and AWSSDK.ProtocolTests.NetStandard pass.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@dscpinheiro dscpinheiro changed the base branch from main to main-staging January 29, 2025 18:31
@dscpinheiro dscpinheiro requested a review from normj January 30, 2025 17:46
@normj
Copy link
Member

normj commented Feb 14, 2025

Thanks @mscottford for the PR. We consider additions to the ICoreX interfaces as breaking changes because what has happened in the past when we did this is we make the change and the users for a variety reasons update a service package, for example S3, which pulls in the Core with this change. But nothing updates the STS package which is the implementation of the ICoreX interface in this case. Then applications start failing at the runtime for missing method implementations because Core is looking for your new method in STS that didn't get updated.

So our options are either put the async methods in a new ICoreAmazonSTSAsync interface and then have Core check to see if
the loaded STS client implements ICoreAmazonSTSAsync, if so use otherwise fallback to the existing sync method. Or target the PR to V4 where we can make this type of breaking change.

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.

DescribeTagsAsync can take a sync path resulting in a PlatformNotSupportedException exception on .NET Android
2 participants