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

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.

主站蜘蛛池模板: 遂川县| 巩留县| 拉萨市| 门源| 磐石市| 新邵县| 从化市| 贵州省| 山丹县| 美姑县| 宣汉县| 平舆县| 云和县| 淮安市| 资中县| 九龙县| 梁平县| 遂溪县| 如东县| 定安县| 天镇县| 留坝县| 泰宁县| 定边县| 安平县| 百色市| 南投市| 海口市| 饶平县| 金寨县| 松阳县| 五大连池市| 普宁市| 贵溪市| 修武县| 汝州市| 商丘市| 铁岭县| 江西省| 大安市| 塘沽区|