IAM - Add all valid TrustPolicy actions (#5751)

This commit is contained in:
Bert Blommers 2022-12-10 19:23:34 -01:00 committed by GitHub
parent b2300f1eae
commit dc812d9990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -557,9 +557,17 @@ class IAMTrustPolicyDocumentValidator(BaseIAMPolicyValidator):
@staticmethod
def _validate_trust_policy_action(action):
# https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecuritytokenservice.html
assert action in (
"sts:AssumeRole",
"sts:AssumeRoleWithSAML",
"sts:AssumeRoleWithWebIdentity",
"sts:DecodeAuthorizationMessage",
"sts:GetAccessKeyInfo",
"sts:GetCallerIdentity",
"sts:GetFederationToken",
"sts:GetServiceBearerToken",
"sts:GetSessionToken",
"sts:SetSourceIdentity",
"sts:TagSession",
)