Files
floci/tools
Priamo Germosen b13e8aa9cd fix(iam): read which ARN formats lie within others from the request-resources table (#9881)
An ARN a request member names may fit the formats of two types of its namespace: an endpoint group's ARN,
accelerator/<id>/listener/<id>/endpoint-group/<id>, fits its accelerator's accelerator/${ResourceId} too, the id
taking any character. The reader took such an ARN as the other type's when that type's format was the longer as
text, variable names counted, so a format with long variable names won over one that fixes more of the ARN.

The generator now gives each type the types of its namespace whose formats lie within its own and not the other way
(narrowerFormats), read from the formats as they stand, each variable matched as the reader matches it: the
partition takes no colon, the Region and the account none or more characters but a colon, any other variable one
or more of any. The reader takes an ARN as a type the resource does not read only when the table gives that type as
lying within every one of the resource's own that the ARN fits. make iam-request-resources-check derives the nesting
again from the formats.

Two readings change for real ARNs, each to the narrower type the action does not list: an AWS-managed RAM
permission (arn:aws:ram::aws:permission/...) named to an action on customer-managed permissions, and a multi-Region
access point's ARN named to S3 Control's tag operations, which no longer pass as an access point's.

test_regen_iam_request_resources.py checks the nesting of formats and that the check reports a table giving
another; RequestResourceMembersTest checks the reader reads and refuses narrowerFormats.
2026-11-30 22:55:04 -04:00
..