BREAKING: Refactored Identity and Authentication API #891
aajtodd
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
An upcoming release of the AWS SDK for Kotlin includes a redesigned API for identity and authentication. Most notably affecting the CredentialsProvider type and it's implementations.
NOTE: If you don't implement a custom
CredentialsProvideror change the defaultsignerconfigured on a service client this change should not affect you.Release Date
This feature will ship with the
v0.22.0-betarelease planned for 04/13/2023.What's changing?
CredentialsProviderinterface has a changed method name and signature. It now extends a more genericIdentityProviderinterface.The
signer: AwsSignerproperty has been removed from all service client configuration in favor of configuring one or more HttpAuthScheme instances. An auth scheme is a tuple of (schemeID,identityProvider,signer) and is used to provide the identity (e.g. AWS credentials) that is used to sign requests.How to migrate?
Implementing or consuming
CredentialsProviderIf you implement a custom credential provider you simply need to change the method name and signature to match the new interface. If you are consuming a credential provider and calling
getCredentials()you need to change the invocation toresolve()(theattributesparameter is defaulted in theIdentityProviderinterface and can be omitted).Before
After
Configuring a custom signer
NOTE: Most users will not have a need to customize signing. Both before and after this refactor the service clients have a default implementation that works out of the box.
Customizing the
AwsSignerused to sign requests with:Before
After
Additional resources
If you have any questions concerning this change, please feel free to engage with us in this discussion. If you've encountered a bug with these changes, please file an issue.
Beta Was this translation helpful? Give feedback.
All reactions