From: Abhishek Lekshmanan Date: Thu, 23 Jul 2020 09:51:24 +0000 (+0200) Subject: rgw: s3: mark bucket encryption as not implemented X-Git-Tag: v15.2.9~122^2~93^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F36691%2Fhead;p=ceph.git rgw: s3: mark bucket encryption as not implemented Currently otherwise this op in deletion would delete the bucket instead Fixes: https://tracker.ceph.com/issues/46263 Signed-off-by: Abhishek Lekshmanan (cherry picked from commit cf4cf2c1b735cabc5ccb5d13215a7b85ee68fd2e) --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 0de040968c7..748d72de9cc 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -4320,6 +4320,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::get_obj_op(bool get_data) const RGWOp *RGWHandler_REST_Bucket_S3::op_get() { + if (s->info.args.sub_resource_exists("encryption")) + return nullptr; + if (s->info.args.sub_resource_exists("logging")) return new RGWGetBucketLogging_ObjStore_S3; @@ -4380,8 +4383,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_head() RGWOp *RGWHandler_REST_Bucket_S3::op_put() { - if (s->info.args.sub_resource_exists("logging")) - return NULL; + if (s->info.args.sub_resource_exists("logging") || + s->info.args.sub_resource_exists("encryption")) + return nullptr; if (s->info.args.sub_resource_exists("versioning")) return new RGWSetBucketVersioning_ObjStore_S3; if (s->info.args.sub_resource_exists("website")) { @@ -4422,6 +4426,10 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_put() RGWOp *RGWHandler_REST_Bucket_S3::op_delete() { + if (s->info.args.sub_resource_exists("logging") || + s->info.args.sub_resource_exists("encryption")) + return nullptr; + if (is_tagging_op()) { return new RGWDeleteBucketTags_ObjStore_S3; } else if (is_cors_op()) {