mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 09:47:56 -05:00
regen_iam_passed_roles.py left Access Analyzer, Bedrock, CloudFront, FIS, GuardDuty and Macie out as "REST routes no rule maps yet", and regen_iam_tag_on_create.py Inspector2 the same, but the request-resources table has read their vendored REST routes since Floci began routing their requests by operation, so the reason no longer held: a request passing a role to one of them needed no iam:PassRole, and an Inspector2 create's tags needed no inspector2:TagResource. They move into each generator's NAMESPACES, and the generic rules read them with no correction: 23 role-passing operations (Bedrock's model customization, evaluation, import and invocation jobs, agents, flows and knowledge bases; FIS's experiment templates; GuardDuty's malware protection plans and scans; CloudFront's realtime log configs, from the RoleARN of each endpoint in the XML body; Access Analyzer's policy generation and Macie's reveal configuration) and five Inspector2 creates. Each operation is read whether or not Floci serves it, so one Floci adds is checked from the start. No entry moves. Floci's CloudFront parser took the first EndPoints anywhere in a realtime log config's body, and every child of it as an endpoint, while the role is read from the request's own EndPoints, at the <member> botocore serializes each as, so an <EndPoint>, or an EndPoints nested in another element ahead of the request's own, passed a role unchecked; the parser now reads the <member> elements of the request's own EndPoints alone, as AWS's deserializer reads no other. IAM reads the role of every KinesisStreamConfig's every RoleARN and none from a body where one holds elements, so an endpoint holding more than one KinesisStreamConfig, or a config more than one RoleARN or StreamARN, or an ARN holding elements, is refused with InvalidArgument rather than saved from one the check did not read. The request-resources table, which leaves a passed role's member out of the resources a request names, is regenerated with the new passed roles: Bedrock's evaluation, customization and invocation jobs, agents, flows and knowledge bases and FIS's experiment templates no longer take their role's ARN as one of their resources. OpenSearch stays out: AssociatePackage's role is AssociationConfiguration.KeyStoreAccessOption.KeyAccessRoleArn of the opensearch client's request, while the Service Reference lists only the es client for it, so the generic rule finds no role member; its reason now says so. The Service Reference now also lists operations pinned botocore 1.44.14 does not model yet (SageMaker's model monitor configs, IAM's workload identity creates); both tables are synced with them unread, as the generators record such an operation. IamPassRoleEnforcementIntegrationTest checks that creating and updating an FIS experiment template, a GuardDuty malware protection plan and a CloudFront realtime log config each needs iam:PassRole on its role for the service it is passed to, and that a realtime log endpoint under another element than <member>, or in an EndPoints nested ahead of the request's own, saves no role, that a RoleARN holding an element, or doubled ahead of one, is refused, and that a body in another charset than the UTF-8 both the check and the handler read saves no role.