Files
floci/tools
Priamo Germosen 6b0f628760 fix(iam): read the tags of IAM's resource types beyond roles and users (#9946)
The request-resources table gives aws:ResourceTag keys to eight IAM resource types and Floci stores the tags of all
eight, but IAM's tag reader answered for roles and users alone, and regen_iam_condition_keys.py listed every resource
tag pair no RoleName or UserName names as notRead ("no member names a stored role or user whose resource tags can be
read"), which IamConditionKeys strips from the request's context. A condition on aws:ResourceTag for a customer managed
policy, an instance profile, an OpenID Connect or SAML provider, a server certificate or a virtual MFA device was
dropped.

The condition-key generator now puts such a pair in a new fromResourceTags section when iam-request-resources.json
resolves the action's request to a resource of one of the pair's types that it gives the key's prefix (resourceTagKeys):
the condition resolver reads it through its generic resource tag reading, from what IAM holds on the resource the
request names. A create the generated tag-on-create table lists (iam-tag-on-create.json) acts on a resource that does
not exist yet and stays notRead, with the reason a role's or a user's create has. 59 pairs move; none keeps the old
reason. --check re-derives the section from the two tables, and the IAM data drift gate checks the condition keys when
either changes.

IamService.heldTags reads a policy's, instance profile's, OpenID Connect provider's, server certificate's or virtual MFA
device's tags, and SAMLProviderService.heldTags a SAML provider's, each read in place in the ARN's account, a
pre-multi-account entry of the default account included; an instance profile or a server certificate, stored by its
name, only when its ARN, path included, is the one named. IamStoredResourceArns answers them.

The Service Reference now lists IAM's workload identity actions, which pinned botocore 1.44.14 does not model yet, and
the generator stopped on their tagging actions' request tags. Like classify's "no SDK operation of this name",
request_tag_context now skips an action botocore does not model, which no request Floci receives names; the table is
synced with their pairs in notRead.

IamResourceScopedPolicyEnforcementIntegrationTest checks that a caller allowed the read of each of five types only on
resources tagged team=blue reads the blue one and is refused the red one, and
ServerCertificateIamEnforcementIntegrationTest the same of certificates; IamStoredResourceArnsTest the reads and an
instance profile named by another path; test_regen_iam_condition_keys.py the new routing, the create kept unread and the
skipped tagging action.
2026-12-01 19:33:08 -04:00
..