]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: s3: mark bucket encryption as not implemented 36691/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Thu, 23 Jul 2020 09:51:24 +0000 (11:51 +0200)
committerNathan Cutler <ncutler@suse.com>
Mon, 17 Aug 2020 16:36:57 +0000 (18:36 +0200)
Currently otherwise this op in deletion would delete the bucket instead

Fixes: https://tracker.ceph.com/issues/46263
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit cf4cf2c1b735cabc5ccb5d13215a7b85ee68fd2e)

src/rgw/rgw_rest_s3.cc

index 0de040968c7c85d2ce4f9b2683766aaa21c0a3d4..748d72de9ccd2420d9a8df1144112139cdc1dee6 100644 (file)
@@ -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()) {