MD4X-00-001550 - MongoDB must limit the total number of concurrent connections to the database.

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

MongoDB must limit the total number of concurrent connections to the database.

Solution

MongoDB can limit the total number of connections served by mongod process by setting the following in the MongoDB configuration file (default location: /etc/mongod.conf)

net:
maxIncomingConnections: %int%

See the following documentation:
https://docs.mongodb.com/v4.4/reference/configuration-options/

Products outside of MongoDB can be used to monitor database sessions and limit the maximum number of connections that can be made.

Alternatively most UNIX-like operating systems, including Linux and macOS, provide ways to limit and control the usage of system resources such as threads, files, and network connections on a per-process and per-user basis.

These ulimits prevent single users from using too many system resources.

The following is the MongoDB documentation regarding these user limits: https://docs.mongodb.com/v4.4/reference/ulimit/

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_MDB_Enterprise_Advanced_4-x_V1R1_STIG.zip

Item Details

References: CAT|II, CCI|CCI-000054, Rule-ID|SV-252148r813826_rule, STIG-ID|MD4X-00-001550, Vuln-ID|V-252148

Plugin: Unix

Control ID: 98555546d7d8b5a17743d222bf119af392855df9ce42f9f8081a97996062f272