Allow security_token to be set by AssumeRoleWebIdentityAdapter#28
Allow security_token to be set by AssumeRoleWebIdentityAdapter#28sudrao wants to merge 1 commit intoex-aws:masterfrom
Conversation
|
I was getting this issue using the AssumeRoleCredentialsAdapter and I discovered we were configuring |
|
Hey @sudrao thanks for the contribution, and sorry for the delayed response! I'm not super familiar with this particular configuration, so I'll spend some time setting up a reproduction of the issue. |
|
FWIW: we had no trouble using |
|
I encountered the recursive loop and these changes fixed my issue. |
|
@ahamez Are you able to tell how you made it work ? but it didn't work. Thanks |
|
@RobinFrcd Sorry, it's been so long ago that I can't remember and I don't have access to the relevant code anymore 😬 |
AWS needs a "security_token" in the request when using AssumeRoleWebIdentity on EKS.
But if we try to set it using ExAws.STS.AuthCache.AssumeRoleWebIdentityAdapter, there is a recursive loop from AssumeRoleWebIdentityAdapter to ExAws.request() and back to itself.
By using the same technique used for access_key_id and secret_access_key, i.e. set those config value to a dummy string, we can prevent the recursive callback and have a security_token set by the adapter.
I did try running tests but some of them were failing without my change.