mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
API Gateway leaves ResourceArnBuilder's own branch, and the enforcement filter's call that went around the table for it: its requests are matched on their botocore routes and checked on the resources the request-resources table reads. API Gateway authorizes a management call as the HTTP method of the request, on the resource its path names, which its developer guide says and neither botocore nor the Service Reference does. fetch_apigateway_arn_formats.py copies the guide's IAM page (the action and resource format sentences) and its ARN reference tables unchanged into tools/aws/sources/apigateway-arn-formats.json, which regen_iam_request_resources.py reads: a route authorized as its method is checked on the resource whose published format is its own path, a Service Reference type before the guide's REST row, the /v2 of HTTP and WebSocket API paths left out, and a path neither gives a row on the guide's ARN format with that path as its resource path. The formats the reference does not give are recorded under pathFormats. RequestResourceMembers reads pathFormats beside arnFormats and takes a hyphen in a path label; RequestResources URL-encodes a value filling a UrlEncoded variable, so a tagging route acts on /tags/<URL-encoded ARN> however it sends the ARN, and escapes % and / in a value filling a path-shaped format, so one label cannot pass for several segments.