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

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.

主站蜘蛛池模板: 京山县| 博客| 罗甸县| 化州市| 镇坪县| 阳春市| 诸城市| 林口县| 大连市| 吉林省| 唐山市| 互助| 射洪县| 绥化市| 成安县| 盈江县| 孝昌县| 高雄县| 永定县| 酒泉市| 嵊州市| 兴宁市| 平顶山市| 绥江县| 新巴尔虎右旗| 福建省| 昆明市| 新晃| 江山市| 靖宇县| 海安县| 丰台区| 保德县| 滨海县| 寿阳县| 客服| 策勒县| 临泉县| 赞皇县| 大冶市| 通渭县|