]> 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)
committerCasey Bodley <cbodley@redhat.com>
Tue, 29 Apr 2025 14:22:47 +0000 (10:22 -0400)
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>
(cherry picked from commit 84a8d1ba0ed4a9a1abc80c1b839f95aaeef5f27b)

src/rgw/rgw_rest_s3.cc

index b5516f030d637505fa544a922c259597656c8f6c..946424f17df871b3e92014b6d25166f8e0f1ae11 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,