mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 22:37:55 -05:00
Under IAM enforcement, CopyObject and UploadPartCopy also need s3:GetObject on the copy source, or s3:GetObjectVersion for a version, and S3Controller checks it itself, since the source appears only in the x-amz-copy-source header. It passed IAM the Authorization header, which a presigned request does not have, so IAM skipped the check. A user allowed to write one place could presign a copy of any object they cannot read into it. The check now uses the request's credential, the header's or a presigned URL's query credential, as the copied-tags check next to it already does. The S3 user guide says "The capabilities of a presigned URL are limited by the permissions of the user who created it." The test signer's presignedQuery also signs the parameters already in its URI's query, such as an UploadPartCopy's upload id, so a presigned part copy verifies, and refuses a URI that is already presigned. docs/services/iam.md lists the copy source check.