Skip to content

Commit 16ab79d

Browse files
committed
rgw: fix policy enforcement for GetObjectAttributes
Per https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object-attributes.html: "If the bucket is not versioned, you need the s3:GetObject and s3:GetObjectAttributes permissions." Fixes: https://tracker.ceph.com/issues/72915 Signed-off-by: Matt Benjamin <[email protected]>
1 parent 6df3fd0 commit 16ab79d

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/rgw/rgw_op.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6209,10 +6209,7 @@ int RGWGetObjAttrs::verify_permission(optional_yield y)
62096209
rgw_iam_add_objtags(this, s, has_s3_existing_tag, has_s3_resource_tag);
62106210
}
62116211

6212-
/* XXXX the following conjunction should be &&--but iam_action2 is currently not
6213-
* hooked up and always fails (but should succeed if the requestor has READ
6214-
* acess to the object) */
6215-
perm = (verify_object_permission(this, s, iam_action1) || /* && */
6212+
perm = (verify_object_permission(this, s, iam_action1) &&
62166213
verify_object_permission(this, s, iam_action2));
62176214
}
62186215

src/rgw/rgw_op.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,6 @@ class RGWGetHealthCheck : public RGWOp {
21702170
}
21712171
};
21722172

2173-
21742173
class RGWDeleteMultiObj : public RGWOp {
21752174
/**
21762175
* Handles the deletion of an individual object and uses

0 commit comments

Comments
 (0)