]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: give hint via header for perm evaluation in GetObj
authorSeena Fallah <seenafallah@gmail.com>
Fri, 28 Mar 2025 20:48:34 +0000 (21:48 +0100)
committerSeena Fallah <seenafallah@gmail.com>
Mon, 28 Apr 2025 16:56:06 +0000 (18:56 +0200)
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 <seenafallah@gmail.com>
src/rgw/rgw_rest_s3.cc

index 92fb8c37f638e9f9bd4fd434d0e7f256a19758ab..83a3249e0a99c5265a1ed699420cc4cb42a1a310 100644 (file)
@@ -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,