From 1299278ec26d638f8af8e681fea3706ff6cdb248 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 14 Mar 2019 09:27:36 -0400 Subject: [PATCH] rgw: reject bucket tagging requests and document unsupported Signed-off-by: Casey Bodley --- doc/radosgw/s3.rst | 2 ++ src/rgw/rgw_rest_s3.cc | 2 ++ src/rgw/rgw_rest_s3.h | 3 +++ 3 files changed, 7 insertions(+) diff --git a/doc/radosgw/s3.rst b/doc/radosgw/s3.rst index cf6eaba7fa4d..d1d4b6b53193 100644 --- a/doc/radosgw/s3.rst +++ b/doc/radosgw/s3.rst @@ -74,6 +74,8 @@ The following table describes the support status for current Amazon S3 functiona +---------------------------------+-----------------+----------------------------------------+ | **Object Tagging** | Supported | See :ref:`tag_policy` for Policy verbs | +---------------------------------+-----------------+----------------------------------------+ +| **Bucket Tagging** | Not Supported | | ++---------------------------------+-----------------+----------------------------------------+ | **Storage Class** | Supported | See :ref:`storage_classes` | +---------------------------------+-----------------+----------------------------------------+ diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index be1c3fe6c430..a5cb4c8ee3ba 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -3196,6 +3196,8 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_put() return new RGWPutLC_ObjStore_S3; } else if(is_policy_op()) { return new RGWPutBucketPolicy; + } else if (is_tagging_op()) { + return nullptr; } return new RGWCreateBucket_ObjStore_S3; } diff --git a/src/rgw/rgw_rest_s3.h b/src/rgw/rgw_rest_s3.h index 0c5ab184dddd..9d3e7311b9ab 100644 --- a/src/rgw/rgw_rest_s3.h +++ b/src/rgw/rgw_rest_s3.h @@ -555,6 +555,9 @@ protected: bool is_policy_op() { return s->info.args.exists("policy"); } + bool is_tagging_op() const { + return s->info.args.exists("tagging"); + } RGWOp *get_obj_op(bool get_data); RGWOp *op_get() override; -- 2.47.3