Skip to content

Commit b7174ca

Browse files
committed
rgw/logging: log bucket must not have encryption
Signed-off-by: Yuval Lifshitz <[email protected]>
1 parent 462edf3 commit b7174ca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/rgw/rgw_rest_bucket_logging.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,12 @@ class RGWPutBucketLoggingOp : public RGWDefaultResponseOp {
200200
op_ret = -EINVAL;
201201
return;
202202
}
203-
// TODO: verify target bucket does not have encryption
203+
// verify target bucket does not have encryption
204+
if (target_attrs.find(RGW_ATTR_BUCKET_ENCRYPTION_POLICY) != target_attrs.end()) {
205+
ldpp_dout(this, 1) << "ERROR: logging target bucket '" << target_bucket_id << "', is configured with encryption" << dendl;
206+
op_ret = -EINVAL;
207+
return;
208+
}
204209
bufferlist conf_bl;
205210
encode(configuration, conf_bl);
206211
attrs[RGW_ATTR_BUCKET_LOGGING] = conf_bl;

0 commit comments

Comments
 (0)