Files
floci/docs/services
Priamo Germosen 0ed899bd59 fix(iam): give a role's tags to the policies an AssumeRole is checked against (#9474)
IAM's stored lookup answered no tags, so a role or user was never given its
aws:ResourceTag or iam:ResourceTag keys outside the IAM condition-key
table's fromTarget route, and an AssumeRole saw none of the role's tags:
a caller's policy allowing sts:AssumeRole on roles carrying a tag (the
guide's "Assume roles that have a specific tag") matched no role, and a
trust policy keyed on its own role's tags never matched.

IamStoredResourceArns.storedTags now gives the tags of the user or role an
ARN names, in the account it names, path included: the identity resources
iam:ResourceTag reads ("the tag attached to the identity resource (user or
role)"), which IAM and STS read aws:ResourceTag on alike. The trust policy
of an AssumeRole, and of the role a Step Functions Lambda task assumes, is
read with the role's tags under the keys the generated table gives the
role type, through IamConditionContextResolver.resourceTagKeys, which
resourceTags now shares.

A resource-tag key the generated IAM condition-key table does not read for
the action being checked is left out of its context
(IamConditionContextResolver.resourceTags(action, resource), from
IamConditionKeys.unreadTagPrefixes): the table reads none for iam:PassRole,
AWS warning that ResourceTag conditions with PassRole "do not have reliable
results", so a PassRole check still sees no role tags.
2026-11-25 18:46:34 -04:00
..