Skip to content

Commit 587ea74

Browse files
committed
rgw: allow disabling mdsearch APIs
Since this is visible to the bucket owners, it can be presumed to be a functional feature. Providing the ability to deactivate the feature could be beneficial in such scenarios. Fixes: https://tracker.ceph.com/issues/65397 Signed-off-by: Seena Fallah <[email protected]>
1 parent 8478774 commit 587ea74

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/common/options/rgw.yaml.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,6 +2384,15 @@ options:
23842384
services:
23852385
- rgw
23862386
with_legacy: true
2387+
- name: rgw_enable_mdsearch
2388+
type: bool
2389+
level: basic
2390+
desc: Enable elastic metadata search APIs
2391+
long_desc: This configurable controls whether RGW handles the elastic metadata search APIs.
2392+
default: true
2393+
services:
2394+
- rgw
2395+
with_legacy: true
23872396
- name: rgw_user_unique_email
23882397
type: bool
23892398
level: basic

src/rgw/rgw_rest_s3.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4605,6 +4605,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_get()
46054605
}
46064606

46074607
if (s->info.args.exists("mdsearch")) {
4608+
if (!s->cct->_conf->rgw_enable_mdsearch) {
4609+
return NULL;
4610+
}
46084611
return new RGWGetBucketMetaSearch_ObjStore_S3;
46094612
}
46104613

@@ -4727,6 +4730,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_delete()
47274730
}
47284731

47294732
if (s->info.args.exists("mdsearch")) {
4733+
if (!s->cct->_conf->rgw_enable_mdsearch) {
4734+
return NULL;
4735+
}
47304736
return new RGWDelBucketMetaSearch_ObjStore_S3;
47314737
}
47324738

@@ -4740,6 +4746,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_post()
47404746
}
47414747

47424748
if (s->info.args.exists("mdsearch")) {
4749+
if (!s->cct->_conf->rgw_enable_mdsearch) {
4750+
return NULL;
4751+
}
47434752
return new RGWConfigBucketMetaSearch_ObjStore_S3;
47444753
}
47454754

0 commit comments

Comments
 (0)