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
-
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
CredentialsProvider
or change the defaultsigner
configured on a service client this change should not affect you.Release Date
This feature will ship with the
v0.22.0-beta
release planned for 04/13/2023.What's changing?
CredentialsProvider
interface has a changed method name and signature. It now extends a more genericIdentityProvider
interface.The
signer: AwsSigner
property 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
CredentialsProvider
If 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()
(theattributes
parameter is defaulted in theIdentityProvider
interface 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
AwsSigner
used 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