@@ -4,6 +4,8 @@ Security Checklist
4
4
5
5
.. default-domain:: mongodb
6
6
7
+ .. |arrow| unicode:: U+27A4
8
+
7
9
*Last updated: 2020-03-25*
8
10
9
11
This documents provides a list of security measures that you should
@@ -18,260 +20,203 @@ Pre-production Checklist/Considerations
18
20
|arrow| Enable Access Control and Enforce Authentication
19
21
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
22
21
- .. container::
22
-
23
- Enable access control and specify the authentication mechanism.
24
- You can use MongoDB's SCRAM or x.509 authentication mechanism or
25
- integrate with your existing Kerberos/LDAP infrastructure. Authentication
26
- requires that all clients and servers provide valid credentials
27
- before they can connect to the system.
23
+ - Enable access control and specify the authentication mechanism.
24
+ You can use MongoDB's SCRAM or x.509 authentication mechanism or
25
+ integrate with your existing Kerberos/LDAP infrastructure. Authentication
26
+ requires that all clients and servers provide valid credentials
27
+ before they can connect to the system.
28
+
29
+ .. see::
28
30
29
- See :doc:`/core/authentication` and
30
- doc:`/tutorial/enable-authentication`.
31
+ - :doc:`/core/authentication`
32
+ - : doc:`/tutorial/enable-authentication`
31
33
32
34
.. _security-checklist-role-based-access-control:
33
35
34
36
Configure Role-Based Access Control
35
37
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
38
37
- .. list-table::
38
- :widths: 5 95
39
-
40
- * -
41
-
42
- - Create a user administrator **first**, then create additional
43
- users. Create a unique MongoDB user for each person/application
44
- that accesses the system.
39
+ - Create a user administrator **first**, then create additional
40
+ users. Create a unique MongoDB user for each person/application
41
+ that accesses the system.
45
42
46
- |
43
+ - Follow the principle of least privilege. Create roles that define the
44
+ exact access rights required by a set of users. Then create
45
+ users and assign them only the roles they need to perform their
46
+ operations. A user can be a person or a client application.
47
47
48
- Follow the principle of least privilege. Create roles that define the
49
- exact access rights required by a set of users. Then create
50
- users and assign them only the roles they need to perform their
51
- operations. A user can be a person or a client application.
48
+ .. tip::
52
49
53
- .. tip::
50
+ A user can have privileges across different databases. If a
51
+ user requires privileges on multiple databases, create a
52
+ single user with roles that grant applicable database
53
+ privileges instead of creating the user multiple times in
54
+ different databases.
54
55
55
- A user can have privileges across different databases. If a
56
- user requires privileges on multiple databases, create a
57
- single user with roles that grant applicable database
58
- privileges instead of creating the user multiple times in
59
- different databases.
56
+ .. see::
60
57
61
- See :doc:`/core/authorization` and
62
- :doc:`/tutorial/manage-users-and-roles`.
58
+ - :doc:`/core/authorization`
59
+ - :doc:`/tutorial/manage-users-and-roles`
63
60
64
61
|arrow| Encrypt Communication (TLS/SSL)
65
62
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66
63
67
- .. list-table::
68
- :widths: 5 95
64
+ - Configure MongoDB to use TLS/SSL for all incoming and outgoing
65
+ connections. Use TLS/SSL to encrypt communication between
66
+ :binary:`~bin.mongod` and :binary:`~bin.mongos` components of a
67
+ MongoDB deployment as well as between all applications and
68
+ MongoDB.
69
69
70
- * -
70
+ .. include:: /includes/fact-tls-libraries.rst
71
71
72
- - Configure MongoDB to use TLS/SSL for all incoming and outgoing
73
- connections. Use TLS/SSL to encrypt communication between
74
- :binary:`~bin.mongod` and :binary:`~bin.mongos` components of a
75
- MongoDB deployment as well as between all applications and
76
- MongoDB.
72
+ .. note::
77
73
78
- .. include:: /includes/fact-tls-libraries .rst
74
+ .. include:: /includes/fact-tls-1.0 .rst
79
75
80
- .. note::
81
-
82
- .. include:: /includes/fact-tls-1.0.rst
76
+ .. see::
83
77
84
- See :doc:`/tutorial/configure-ssl`.
78
+ - :doc:`/tutorial/configure-ssl`.
85
79
86
80
.. |binary| replace:: MongoDB
87
81
88
82
|arrow| Encrypt and Protect Data
89
83
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90
84
91
- .. list-table::
92
- :widths: 5 95
85
+ - Starting with MongoDB Enterprise 3.2, you can encrypt data in
86
+ the storage layer with the WiredTiger storage engine's native
87
+ :doc:`/core/security-encryption-at-rest`.
93
88
94
- * -
89
+ - If you are not using WiredTiger's encryption at rest, MongoDB
90
+ data should be encrypted on each host using file-system, device,
91
+ or physical encryption (e.g. dm-crypt). Protect MongoDB data
92
+ using file-system permissions. MongoDB data includes data files,
93
+ configuration files, auditing logs, and key files.
95
94
96
- - Starting with MongoDB Enterprise 3.2, you can encrypt data in
97
- the storage layer with the WiredTiger storage engine's native
98
- :doc:`/core/security-encryption-at-rest`.
99
-
100
- * -
101
-
102
- - If you are not using WiredTiger's encryption at rest, MongoDB
103
- data should be encrypted on each host using file-system, device,
104
- or physical encryption (e.g. dm-crypt). Protect MongoDB data
105
- using file-system permissions. MongoDB data includes data files,
106
- configuration files, auditing logs, and key files.
107
-
108
- * -
109
-
110
- - Collect logs to a central log store. These logs contain DB
111
- authentication attempts including source IP address.
95
+ - Collect logs to a central log store. These logs contain DB
96
+ authentication attempts including source IP address.
112
97
113
98
114
99
|arrow| Limit Network Exposure
115
100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116
101
117
- .. list-table::
118
- :widths: 5 95
102
+ - Ensure that MongoDB runs in a trusted network environment and
103
+ configure firewall or security groups to control inbound and
104
+ outbound traffic for your MongoDB instances.
119
105
120
- * -
106
+ - Disable direct SSH root access.
121
107
122
- - Ensure that MongoDB runs in a trusted network environment and
123
- configure firewall or security groups to control inbound and
124
- outbound traffic for your MongoDB instances.
125
-
126
- Allow only trusted clients to access the network interfaces and
127
- ports on which MongoDB instances are available. For instance,
128
- use IP whitelisting to allow access from trusted IP addresses (see )
108
+ - Allow only trusted clients to access the network interfaces and
109
+ ports on which MongoDB instances are available.
129
110
130
- .. note::
111
+ .. note::
131
112
132
- .. include:: /includes/fact-default-bind-ip-change.rst
113
+ .. include:: /includes/fact-default-bind-ip-change.rst
133
114
134
- See:
135
-
136
- - :doc:`/core/security-hardening`
137
-
138
- - :setting:`net.bindIp` configuration setting
139
-
140
- - :setting:`security.clusterIpSourceWhitelist` configuration setting
141
-
142
- - :ref:`authenticationRestrictions
143
- <db-createUser-authenticationRestrictions>` to specify
144
- per-user IP whitelist.
115
+ .. see::
116
+
117
+ - :doc:`/core/security-hardening`
145
118
146
- * -
119
+ - the :setting:`net.bindIp` configuration setting
120
+
121
+ - the :setting:`security.clusterIpSourceWhitelist` configuration
122
+ setting
147
123
148
- - Disable direct SSH root access.
124
+ - the :ref:`authenticationRestrictions
125
+ <db-createUser-authenticationRestrictions>` field to the
126
+ :dbcommand:`db.createUser()` command to specify a per-user IP
127
+ whitelist.
149
128
150
129
151
130
|arrow| Audit System Activity
152
131
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153
132
154
- .. list-table::
155
- :widths: 5 95
156
-
157
- * -
133
+ - Track access and changes to database configurations and data.
134
+ `MongoDB Enterprise
135
+ <http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server>`_
136
+ includes a system auditing facility that can record
137
+ system events (e.g. user operations, connection events) on a
138
+ MongoDB instance. These audit records permit forensic analysis
139
+ and allow administrators to verify proper controls. You can set
140
+ up filters to record specific events, such as authentication
141
+ events.
158
142
159
- - Track access and changes to database configurations and data.
160
- `MongoDB Enterprise
161
- <http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server>`_
162
- includes a system auditing facility that can record
163
- system events (e.g. user operations, connection events) on a
164
- MongoDB instance. These audit records permit forensic analysis
165
- and allow administrators to verify proper controls. You can set
166
- up filters to record specific events, such as authentication
167
- events.
143
+ .. see::
168
144
169
- See :doc:`/core/auditing` and
170
- :doc:`/tutorial/configure-auditing`.
145
+ - :doc:`/core/auditing`
146
+ - :doc:`/tutorial/configure-auditing`
171
147
172
148
|arrow| Run MongoDB with a Dedicated User
173
149
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174
150
175
- .. list-table::
176
- :widths: 5 95
151
+ - Run MongoDB processes with a dedicated operating system user
152
+ account. Ensure that the account has permissions to access data
153
+ but no unnecessary permissions.
177
154
178
- * -
179
-
180
- - Run MongoDB processes with a dedicated operating system user
181
- account. Ensure that the account has permissions to access data
182
- but no unnecessary permissions.
155
+ .. see::
183
156
184
- See :doc:`/installation` for more information on running MongoDB.
157
+ - :doc:`/installation`
185
158
186
159
.. _security-checklist-javascript:
187
160
188
161
|arrow| Run MongoDB with Secure Configuration Options
189
162
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190
163
191
- .. list-table::
192
- :widths: 5 95
164
+ - MongoDB supports the execution of JavaScript code for certain
165
+ server-side operations: :dbcommand:`mapReduce`, :query:`$where`,
166
+ :group:`$accumulator`, and :expression:`$function`. If you do
167
+ not use these operations, disable server-side scripting by using
168
+ the :option:`--noscripting <mongod --noscripting>` option on the
169
+ command line.
193
170
194
- * -
195
-
196
- - MongoDB supports the execution of JavaScript code for certain
197
- server-side operations: :dbcommand:`mapReduce`, :query:`$where`,
198
- :group:`$accumulator`, and :expression:`$function`. If you do
199
- not use these operations, disable server-side scripting by using
200
- the :option:`--noscripting <mongod --noscripting>` option on the
201
- command line.
202
-
203
- * -
204
-
205
- - Keep input validation enabled. MongoDB enables input validation
206
- by default through the :setting:`net.wireObjectCheck` setting.
207
- This ensures that all documents stored by the
208
- :binary:`~bin.mongod` instance are valid :term:`BSON`.
171
+ - Keep input validation enabled. MongoDB enables input validation
172
+ by default through the :setting:`net.wireObjectCheck` setting.
173
+ This ensures that all documents stored by the
174
+ :binary:`~bin.mongod` instance are valid :term:`BSON`.
209
175
210
176
.. see::
211
177
212
- :doc:`/core/security-hardening`.
178
+ - :doc:`/core/security-hardening`
213
179
214
180
|arrow| Request a Security Technical Implementation Guide (where applicable)
215
181
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216
182
217
- .. list-table::
218
- :widths: 5 95
219
-
220
- * -
221
-
222
- - The Security Technical Implementation Guide (STIG) contains
223
- security guidelines for deployments within the United States
224
- Department of Defense. MongoDB Inc. provides its STIG, upon
225
- request, for situations where it is required. Please `request a
226
- copy <http://www.mongodb.com/lp/contact/stig-requests>`_ for
227
- more information.
183
+ - The Security Technical Implementation Guide (STIG) contains
184
+ security guidelines for deployments within the United States
185
+ Department of Defense. MongoDB Inc. provides its STIG, upon
186
+ request, for situations where it is required. Please `request a
187
+ copy <http://www.mongodb.com/lp/contact/stig-requests>`_ for
188
+ more information.
228
189
229
190
|arrow| Consider Security Standards Compliance
230
191
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
231
192
232
- .. list-table::
233
- :widths: 5 95
234
-
235
- * -
236
-
237
- - For applications requiring HIPAA or PCI-DSS compliance, please
238
- refer to the `MongoDB Security Reference Architecture
239
- <https://www.mongodb.com/collateral/mongodb-security-architecture>`_
240
- to learn more about how you can use the key security
241
- capabilities to build compliant application infrastructure.
193
+ - For applications requiring HIPAA or PCI-DSS compliance, please
194
+ refer to the `MongoDB Security Reference Architecture
195
+ <https://www.mongodb.com/collateral/mongodb-security-architecture>`_
196
+ to learn more about how you can use the key security
197
+ capabilities to build compliant application infrastructure.
242
198
243
199
244
200
Periodic/Ongoing Production Checks
245
201
----------------------------------
246
202
247
- .. list-table::
248
- :widths: 5 95
249
-
250
- * -
251
-
252
- - Periodically check for `MongoDB Product CVE
253
- <https://www.mongodb.com/alerts>`_ and upgrade your products .
203
+ - Periodically check for `MongoDB Product CVE
204
+ <https://www.mongodb.com/alerts>`_ and upgrade your products .
254
205
255
- * -
206
+ - Consult the `MongoDB end of life dates
207
+ <https://www.mongodb.com/support-policy>`_ and upgrade your
208
+ MongoDB installation. In general, try to stay on the latest
209
+ version.
256
210
257
- - Consult the `MongoDB end of life dates
258
- <https://www.mongodb.com/support-policy>`_ and upgrade your
259
- MongoDB installation. In general, try to stay on the latest
260
- version.
211
+ - Ensure that your information security management system policies
212
+ and procedures extend to your MongoDB installation, including
213
+ performing the following:
261
214
262
- * -
215
+ - Periodically apply patches to your machine and review
216
+ guidelines.
263
217
264
- - Ensure that your information security management system policies
265
- and procedures extend to your MongoDB installation, including
266
- performing the following:
218
+ - Review policy/procedure changes, especially changes to your
219
+ network rules to prevent inadvertent MongoDB exposure to the
220
+ Internet.
267
221
268
- - Periodically apply patches to your machine and review
269
- guidelines.
270
-
271
- - Review policy/procedure changes, especially changes to your
272
- network rules to prevent inadvertent MongoDB exposure to the
273
- Internet.
274
-
275
- - Review MongoDB database users and periodically rotate them.
276
-
277
- .. |arrow| unicode:: U+27A4
222
+ - Review MongoDB database users and periodically rotate them.
0 commit comments