Issue https://tracker.ceph.com/issues/68884 revealed that because
user_acl is initialized by default in RGWUserPermHandler::Init with
the same identity, calling verify_bucket_permission_no_policy()
would mistakenly allow the request since the user ACL matches the
identity. Removing the default creation of user_acl would align the
behavior with other S3 operations to prevent unauthorized data replication.
Fixes: https://tracker.ceph.com/issues/69972
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
ret = RGWUserPermHandler::policy_from_attrs(
sync_env->cct, user->get_attrs(), &info->user_acl);
- if (ret == -ENOENT) {
- info->user_acl.create_default(uid, user->get_display_name());
+ if (ret < 0 && ret != -ENOENT) {
+ return ret;
}
return 0;