]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: read_obj_policy() consults s3:prefix when deciding between 403/404 68651/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 23 Apr 2026 15:53:16 +0000 (11:53 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 28 Apr 2026 12:40:23 +0000 (08:40 -0400)
commitb2bfc15c0dc11f04ce7e82f487a9c111d3c40289
tree147ee2a9bff9cf10708617148e63b88da6675e1b
parent24090a29eeaf50640cb4d3fd4a6c4108d5862b57
rgw: read_obj_policy() consults s3:prefix when deciding between 403/404

when read_obj_policy() gets ENOENT, it only returns 404 NoSuchKey if the
requester has s3:ListBucket permission. however, policy that allows
s3:ListBucket may be conditional on the s3:prefix to restrict listings
to certain paths/object names. add the requested object name to the iam
environment as s3:prefix to match aws behavior here

Fixes: https://tracker.ceph.com/issues/74398
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 363a81ca8d0bf2f1e84b2d48aa02be40d5398147)
src/rgw/rgw_op.cc