]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: s3: mark bucket encryption as not implemented 36264/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Thu, 23 Jul 2020 09:51:24 +0000 (11:51 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 23 Jul 2020 09:51:24 +0000 (11:51 +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>
src/rgw/rgw_rest_s3.cc

index 3615f781af266fcd06398d4499858aa37d02f4f7..fd413b53bfce0cc0830558146bc5631c43f3f182 100644 (file)
@@ -4378,6 +4378,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;
 
@@ -4438,8 +4441,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")) {
@@ -4480,6 +4484,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()) {