GetWebIdentityToken action. Dodo Payments trusts this token through an aws provider. Use it for Lambda, ECS, EC2, and other AWS compute that has an IAM role.
For pods on Amazon EKS, use the Kubernetes type with a projected service account token.
Provider Settings
Turn on outbound identity federation in your AWS account, then copy the issuer URL of the account into the provider.
Required Claims
The mapping must pinsub with the ARN of the IAM role:
IAM Permissions
The role of the workload must have permission to callsts:GetWebIdentityToken. This policy lets the role get tokens only for the Dodo Payments audience, with a maximum lifetime of 5 minutes:
https://test.dodopayments.com as the audience.
SDK Usage
Theaws(fn) helper takes a function that returns a new JWT. Call GetWebIdentityToken in that function with the Dodo Payments audience. The SDK calls the function for each exchange.
GetWebIdentityToken needs a signing algorithm: RS256 or ES384. The action is not available on the STS global endpoint, so configure the STS client with a region.