]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/account: Support backward compatibility for s3:PutAcls calls for users migrated...
authorkchheda3 <kchheda3@bloomberg.net>
Fri, 7 Nov 2025 17:35:19 +0000 (12:35 -0500)
committerKrunal Chheda <kchheda3@bloomberg.net>
Tue, 14 Apr 2026 15:16:46 +0000 (20:46 +0530)
fixes tracker https://tracker.ceph.com/issues/73759

Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
src/rgw/rgw_op.cc

index 34836da3f7eafbc604c7f1289c56e42f622136e2..dc9c624cfa072d75e9c9acc3852082015e20c19a 100644 (file)
@@ -6691,8 +6691,12 @@ void RGWPutACLs::execute(optional_yield y)
   if (op_ret < 0)
     return;
 
+  // only allow acl owner to change if the requester views them as equivalent.
+  // the requester may change between their user id and account id.
   if (!existing_owner.empty() &&
-      existing_owner.id != new_policy.get_owner().id) {
+      existing_owner.id != new_policy.get_owner().id &&
+      !(s->auth.identity->is_owner_of(existing_owner.id) &&
+        s->auth.identity->is_owner_of(new_policy.get_owner().id))) {
     s->err.message = "Cannot modify ACL Owner";
     op_ret = -EPERM;
     return;