From: Yuval Lifshitz Date: Thu, 19 Dec 2024 13:49:07 +0000 (+0000) Subject: rgw/logging: log bucket must not have encryption X-Git-Tag: v20.0.0~387^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b7174ca14091c09d3e168ff20493532e44215ac2;p=ceph.git rgw/logging: log bucket must not have encryption Signed-off-by: Yuval Lifshitz --- diff --git a/src/rgw/rgw_rest_bucket_logging.cc b/src/rgw/rgw_rest_bucket_logging.cc index 5689a7acc56..b2676fc3bec 100644 --- a/src/rgw/rgw_rest_bucket_logging.cc +++ b/src/rgw/rgw_rest_bucket_logging.cc @@ -200,7 +200,12 @@ class RGWPutBucketLoggingOp : public RGWDefaultResponseOp { op_ret = -EINVAL; return; } - // TODO: verify target bucket does not have encryption + // verify target bucket does not have encryption + if (target_attrs.find(RGW_ATTR_BUCKET_ENCRYPTION_POLICY) != target_attrs.end()) { + ldpp_dout(this, 1) << "ERROR: logging target bucket '" << target_bucket_id << "', is configured with encryption" << dendl; + op_ret = -EINVAL; + return; + } bufferlist conf_bl; encode(configuration, conf_bl); attrs[RGW_ATTR_BUCKET_LOGGING] = conf_bl;