diff options
author | Yuval Lifshitz <ylifshit@ibm.com> | 2024-12-19 14:49:07 +0100 |
---|---|---|
committer | Yuval Lifshitz <ylifshit@ibm.com> | 2025-01-13 07:38:49 +0100 |
commit | b7174ca14091c09d3e168ff20493532e44215ac2 (patch) | |
tree | 309053a620d7fb2349bd5393299b229dbc2f6dd0 | |
parent | rgw/logging: source and log bucket must be different (diff) | |
download | ceph-b7174ca14091c09d3e168ff20493532e44215ac2.tar.xz ceph-b7174ca14091c09d3e168ff20493532e44215ac2.zip |
rgw/logging: log bucket must not have encryption
Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
-rw-r--r-- | src/rgw/rgw_rest_bucket_logging.cc | 7 |
1 files changed, 6 insertions, 1 deletions
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; |