Skip to content

Commit 61bf8cb

Browse files
authored
Merge pull request ceph#56802 from clwluvw/rgw-mdsearch
rgw: allow disabling mdsearch APIs Reviewed-by: Casey Bodley <[email protected]>
2 parents 969d23e + 587ea74 commit 61bf8cb

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
@@ -2409,6 +2409,15 @@ options:
24092409
services:
24102410
- rgw
24112411
with_legacy: true
2412+
- name: rgw_enable_mdsearch
2413+
type: bool
2414+
level: basic
2415+
desc: Enable elastic metadata search APIs
2416+
long_desc: This configurable controls whether RGW handles the elastic metadata search APIs.
2417+
default: true
2418+
services:
2419+
- rgw
2420+
with_legacy: true
24122421
- name: rgw_user_unique_email
24132422
type: bool
24142423
level: basic

src/rgw/rgw_rest_s3.cc

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

46044604
if (s->info.args.exists("mdsearch")) {
4605+
if (!s->cct->_conf->rgw_enable_mdsearch) {
4606+
return NULL;
4607+
}
46054608
return new RGWGetBucketMetaSearch_ObjStore_S3;
46064609
}
46074610

@@ -4724,6 +4727,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_delete()
47244727
}
47254728

47264729
if (s->info.args.exists("mdsearch")) {
4730+
if (!s->cct->_conf->rgw_enable_mdsearch) {
4731+
return NULL;
4732+
}
47274733
return new RGWDelBucketMetaSearch_ObjStore_S3;
47284734
}
47294735

@@ -4737,6 +4743,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_post()
47374743
}
47384744

47394745
if (s->info.args.exists("mdsearch")) {
4746+
if (!s->cct->_conf->rgw_enable_mdsearch) {
4747+
return NULL;
4748+
}
47404749
return new RGWConfigBucketMetaSearch_ObjStore_S3;
47414750
}
47424751

0 commit comments

Comments
 (0)