mirror of
https://github.com/floci-io/floci.git
synced 2026-11-29 16:35:29 -05:00
StartMessageMoveTask was checked as sqs:StartMessageMoveTask alone, on both its SourceArn and its DestinationArn, so a caller granted the permissions AWS requires was refused on the destination, and one granted the action alone on the dead-letter queue was let through. ListMessageMoveTasks was checked as its own action alone. The Amazon SQS developer guide's table of a dead-letter queue redrive's minimum permissions gives each task's actions of each queue: "Add the sqs:StartMessageMoveTask, sqs:ReceiveMessage, sqs:DeleteMessage, and sqs:GetQueueAttributes of the dead-letter queue", "Add the sqs:SendMessage of the destination queue", and "Add the sqs:ListMessageMoveTasks and sqs:GetQueueAttributes of the dead-letter queue". The API reference names each queue's parameter: SourceArn "only ARNs of dead-letter queues (DLQs)", DestinationArn "specify the destination queue". AWS's own fidelity check (iam__sqs__sts/check_start_message_move_task_requires_composite_source_and_destination_permissions in aws/aws-emulator-evaluation-suite) refuses a caller granted sqs:StartMessageMoveTask alone on the dead-letter queue, naming sqs:ReceiveMessage on it, and lets the call through once the five are granted. tools/aws/fetch_sqs_redrive_permissions.py copies the table's rows and those parameter sentences into tools/aws/sources/sqs-redrive-permissions.json, a new PERMISSION_SOURCES entry, and the request-resources generator's task_permission_resources reads it: the row naming the operation's own action, each action on the resource the rules read from the parameter naming its queue, a queue the request names by no such parameter being the one the row names the operation's own action of. --verify checks each row's actions against the Service Reference's AuthorizedActions. Only StartMessageMoveTask and ListMessageMoveTasks change; CancelMessageMoveTask names its task by handle and keeps its reading.