Files
floci/tools
Priamo Germosen 4735606fb9 feat(iam): read S3 and S3 Control from the generated tables (#9155)
S3 leaves the registry's hand rules and ResourceArnBuilder's S3 branch: its requests are matched
on their botocore routes, checked as the actions the authorized-actions file gives them, on the
resources the request-resources table reads. regen_rest_routes.py no longer lists s3 as hand-routed,
and regen_iam_request_resources.py reads s3 instead of leaving it to the builder; the tables gain
S3's and S3 Control's 195 operations and nothing else changes. Operations sharing a route are told
apart by the query parameters and headers botocore requires, an S3 Control request by its route's
model, which also picks S3 Control's error envelope (isS3ControlRequest), and a member the two
clients locate apart is read for the client whose route the request matched.

An object key is read as S3 reads it, keeping the slashes it was sent with, through
RequestPathLabels, a per-namespace hook S3 implements with S3ObjectKeys. DeleteObjects names its
keys in its XML body, so it takes s3:DeleteObject's types from the S3 user guide's Either row and is
unread: the filter leaves it to S3, which checks each key.

The registry's S3 rules, S3 Control rules and sub-resource overrides are deleted, with the tests of
Floci's own handler order, the regional S3 Control ARN form, and a version for HEAD, HEAD
?annotation and Select, none of which an AWS source gives.

S3 also runs only what botocore routes, so what runs is what is checked: a request naming annotationName
is GetObjectAnnotation and a HEAD naming one HeadObject, SelectObjectContent runs on
?select&select-type=2 and reads the current version, the S3 Control tagging handler decodes its ARN
once, and a request two operations' routes take alike is refused under enforcement.
2026-11-21 17:44:36 -04:00
..