]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw/auth: replace uses of verify_bucket_owner_or_policy()
authorCasey Bodley <cbodley@redhat.com>
Wed, 21 Feb 2024 23:51:44 +0000 (18:51 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 12 Apr 2024 19:34:29 +0000 (15:34 -0400)
commitcbc6fef433067a7ce3077bec191b2fef7fd372d5
treec9f5ff22b518641625a9089050be2e23e9412fd6
parent27ff9182b34889aa668b933dd680a63ecc24c028
rgw/auth: replace uses of verify_bucket_owner_or_policy()

all of the s3 actions that we call verify_bucket_owner_or_policy() for
are already covered by rgw::IAM::op_to_perm(), which maps actions to
acl permissions like RGW_PERM_READ, RGW_PERM_WRITE_ACP etc

that means we can call verify_bucket_permission() as most other bucket
ops do, and rely on its call to verify_bucket_permission_no_policy() to
find the owner's acl grant

i also hadn't implemented the cross-account rules for
verify_bucket_owner_or_policy() yet, and didn't want to

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit b021d0f2f133da6ac9e5972b481094d86802e979)
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_op.cc