官术网_书友最值得收藏!

  • Mastering MongoDB 3.x
  • Alex Giamas
  • 163字
  • 2021-08-20 10:10:58

Use secure configuration options

It goes without saying that sane configuration options should be used. We must use one of the following:

  1. MapReduce.
  2. mongo shell group operation or a group operation from our client driver.
  3. $where JavaScript server evaluation.

If we don't, we should disable server-side scripting by using the --noscripting option on the command line when we start our server.

Number 2 in the previous list can be a tricky one as many drivers may use MongoDB's group() command when we issue group commands in the driver; however, given the limitations that group() has in terms of performance and output documents, we should rethink our design to use the aggregation framework or application side aggregations.

The web interface also has to be disabled, by not using any of the following commands:

  • net.http.enabled
  • net.http.JSONPEnabled
  • net.http.RESTInterfaceEnabled

On the contrary, wireObjectCheck needs to remain enabled, as it is by default, as this ensures that all documents stored by the mongod instance are valid BSON.

主站蜘蛛池模板: 九寨沟县| 西峡县| 新化县| 绥德县| 张家界市| 紫金县| 宜丰县| 石林| 桐梓县| 晋江市| 垦利县| 喀喇| 玉山县| 江川县| 桃源县| 高安市| 新竹县| 利川市| 吉林省| 乐昌市| 文山县| 运城市| 乌拉特前旗| 雷山县| 临夏县| 乾安县| 化州市| 平江县| 乌鲁木齐市| 方正县| 根河市| 贵定县| 昌宁县| 鲁山县| 湖北省| 邓州市| 泰顺县| 宝坻区| 西安市| 措美县| 拉孜县|