Implement assume_role_with_web_identity

The AssumeRoleWithWebIdentity is a similar endpoint to STS's AssumeRole
where the authentication element is a JWT id_token from a configured OP.
This commit implements the functionality and relies on the same result
generated for the regular AssumeRole.
This commit is contained in:
Carlos Aguado 2019-07-16 13:27:47 +10:00
commit e54f74776b
4 changed files with 78 additions and 1 deletions

View file

@ -50,5 +50,8 @@ class STSBackend(BaseBackend):
role = AssumedRole(**kwargs)
return role
def assume_role_with_web_identity(self, **kwargs):
return self.assume_role(**kwargs)
sts_backend = STSBackend()