Files
floci/src/main/java
Priamo Germosen b0777a4020 fix(iam): check the actions an S3 operation needs besides its own (#5846)
Under IAM enforcement an S3 object operation was checked only as its own
action. A PutObject, CopyObject or CreateMultipartUpload that set tags,
an ACL, a retention period or a legal hold needed only s3:PutObject,
GetObjectAttributes needed only the read, and a retention change or a
delete asking to bypass governance retention needed no
s3:BypassGovernanceRetention. No Object Lock condition key was offered.

Each now also needs the actions the S3 user guide's permissions table
and the API references require besides its own. An object creation
needs the action of each setting it applies: s3:PutObjectTagging,
s3:PutObjectAcl, s3:PutObjectRetention or s3:PutObjectLegalHold. A copy
under the default COPY tagging directive keeps a tagged source's tags,
so it needs s3:PutObjectTagging too, checked where the source is read
against the request's credential, a presigned URL's included, and it
offers no request tag keys from the x-amz-tagging header it ignores.
GetObjectAttributes needs s3:GetObjectAttributes, or
s3:GetObjectVersionAttributes for a version. A PutObjectRetention or
DeleteObject that sends x-amz-bypass-governance-retention needs
s3:BypassGovernanceRetention; an annotation delete does not, as the
user guide says the permission does not apply to annotation operations.

s3:PutObject, s3:PutObjectRetention and s3:PutObjectLegalHold are
offered the Object Lock keys from the request's headers or body, and an
object creation offers its tag and Object Lock keys to each extra action.
A denial names the missing permission, and CloudTrail records the
operation that was refused, PutObjectRetention and GetObjectAttributes
included. Generated presigned URLs refuse all four creation settings,
as they refused tags.

Refs #5716
2026-10-17 10:17:28 -05:00
..