From: Seena Fallah Date: Fri, 28 Mar 2025 20:48:34 +0000 (+0100) Subject: rgw: give hint via header for perm evaluation in GetObj X-Git-Tag: v20.1.0~329^2~11 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2edd51ba0923dbc31ae6d14886db741227916e13;p=ceph.git rgw: give hint via header for perm evaluation in GetObj Return `Rgwx-Perm-Checked` header as a hint for the destination zone to know whether the perms where considered or not. This is just a backward compatibility for upgrade and can be dropped in T+2 release. Signed-off-by: Seena Fallah (cherry picked from commit 84a8d1ba0ed4a9a1abc80c1b839f95aaeef5f27b) --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index b5516f030d637..946424f17df87 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -411,6 +411,8 @@ int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs, total_len = 0; } + dump_header(s, "Rgwx-Perm-Checked", "true"); + // check for GetObject(Version)Tagging permission to include tags in response auto action = s->object->get_instance().empty() ? rgw::IAM::s3GetObjectTagging : rgw::IAM::s3GetObjectVersionTagging; // since we are already under s->system_request, if the request is not impersonating,