-
Notifications
You must be signed in to change notification settings - Fork 863
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
[SRA] Add identity resolver for bearer authentication scheme #3562
[SRA] Add identity resolver for bearer authentication scheme #3562
Conversation
29eda94
to
a7f126e
Compare
extensions/src/Smithy.Identity.Abstractions/Identity/IIdentityResolver.cs
Outdated
Show resolved
Hide resolved
...ore/Amazon.Runtime/Credentials/Internal/IdentityResolvers/DefaultAWSTokenIdentityResolver.cs
Outdated
Show resolved
Hide resolved
.../Core/Amazon.Runtime/Credentials/Internal/IdentityResolvers/IdentityResolverConfiguration.cs
Show resolved
Hide resolved
...ore/Amazon.Runtime/Credentials/Internal/IdentityResolvers/DefaultAWSTokenIdentityResolver.cs
Outdated
Show resolved
Hide resolved
.../Core/Amazon.Runtime/Credentials/Internal/IdentityResolvers/IdentityResolverConfiguration.cs
Show resolved
Hide resolved
sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/BaseAuthResolverHandler.cs
Show resolved
Hide resolved
* Update signer to accept BaseIdentity instead of ImmutableCredentials * Use ClientException instead of ServiceException in FallbackCredentialsFactory replacement * Update blocking call to use .GetAwaiter().GetResult()
...ore/Amazon.Runtime/Credentials/Internal/IdentityResolvers/DefaultAWSTokenIdentityResolver.cs
Outdated
Show resolved
Hide resolved
sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/BaseAuthResolverHandler.cs
Outdated
Show resolved
Hide resolved
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.
In the AbstractAWSSigner
we need to get rid of the abstract Sign
operation that takes in a access and secret key so we are always dealing with the BaseIdentity
. I created a PR to this PR that does that work and I'm currently running the dry run. Assuming the dry run is successful and @muhammad-othman approves my PR we can merge that PR into this PR and then I'll approve this PR so we can merge it.
* feat: Add bearer token authentication scheme * refactor: Address PR feedback * refactor: Address PR comments * Update signer to accept BaseIdentity instead of ImmutableCredentials * Use ClientException instead of ServiceException in FallbackCredentialsFactory replacement * Update blocking call to use .GetAwaiter().GetResult() * fix: Update S3Express handler for signer signature change * fix: Update AWSToken to use correct base class * fix: Update comment for blocking call * fix: Add blocking call in pipeline handler * Remove abstract Sign override that uses access and secret key. (#3575) --------- Co-authored-by: Norm Johanson <[email protected]>
* feat: Add bearer token authentication scheme * refactor: Address PR feedback * refactor: Address PR comments * Update signer to accept BaseIdentity instead of ImmutableCredentials * Use ClientException instead of ServiceException in FallbackCredentialsFactory replacement * Update blocking call to use .GetAwaiter().GetResult() * fix: Update S3Express handler for signer signature change * fix: Update AWSToken to use correct base class * fix: Update comment for blocking call * fix: Add blocking call in pipeline handler * Remove abstract Sign override that uses access and secret key. (#3575) --------- Co-authored-by: Norm Johanson <[email protected]>
* feat: Add bearer token authentication scheme * refactor: Address PR feedback * refactor: Address PR comments * Update signer to accept BaseIdentity instead of ImmutableCredentials * Use ClientException instead of ServiceException in FallbackCredentialsFactory replacement * Update blocking call to use .GetAwaiter().GetResult() * fix: Update S3Express handler for signer signature change * fix: Update AWSToken to use correct base class * fix: Update comment for blocking call * fix: Add blocking call in pipeline handler * Remove abstract Sign override that uses access and secret key. (#3575) --------- Co-authored-by: Norm Johanson <[email protected]>
* feat: Add bearer token authentication scheme * refactor: Address PR feedback * refactor: Address PR comments * Update signer to accept BaseIdentity instead of ImmutableCredentials * Use ClientException instead of ServiceException in FallbackCredentialsFactory replacement * Update blocking call to use .GetAwaiter().GetResult() * fix: Update S3Express handler for signer signature change * fix: Update AWSToken to use correct base class * fix: Update comment for blocking call * fix: Add blocking call in pipeline handler * Remove abstract Sign override that uses access and secret key. (#3575) --------- Co-authored-by: Norm Johanson <[email protected]>
* feat: Add bearer token authentication scheme * refactor: Address PR feedback * refactor: Address PR comments * Update signer to accept BaseIdentity instead of ImmutableCredentials * Use ClientException instead of ServiceException in FallbackCredentialsFactory replacement * Update blocking call to use .GetAwaiter().GetResult() * fix: Update S3Express handler for signer signature change * fix: Update AWSToken to use correct base class * fix: Update comment for blocking call * fix: Add blocking call in pipeline handler * Remove abstract Sign override that uses access and secret key. (#3575) --------- Co-authored-by: Norm Johanson <[email protected]>
Description
Updates the
IdentityResolverConfiguration
to resolve the bearer authentication scheme (i.e. thesmithy.api#httpBearerAuth
trait). I also had to modify other existing components (such as the bearer token signer) since their implementation is different than SigV4 / SigV4A credentials.Motivation and Context
DOTNET-7652
Testing
DRY_RUN-53687653-2c3c-4b33-9fa5-1ac8868e497a
.nupkg
file - will address that in a separate PR).Types of changes
Checklist
License