@@ -6,9 +6,9 @@ Security Checklist
6
6
7
7
.. |arrow| unicode:: U+27A4
8
8
9
- *Last updated: 2020-03-25 *
9
+ *Last updated: 2021-09-29 *
10
10
11
- This documents provides a list of security measures that you should
11
+ This document provides a list of security measures that you should
12
12
implement to protect your MongoDB installation. The list is not meant
13
13
to be exhaustive.
14
14
@@ -20,46 +20,54 @@ Pre-production Checklist/Considerations
20
20
|arrow| Enable Access Control and Enforce Authentication
21
21
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22
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 an authentication mechanism.
28
24
29
- |
25
+ MongoDB Community supports a number of :ref:`authentication mechanisms
26
+ <security-authentication-mechanisms>` that clients can use to verify
27
+ their identity:
30
28
31
- See also:
29
+ - :ref:`authentication-scram` (*Default*)
30
+ - :ref:`x.509 Certificate Authentication <security-auth-x509>`.
32
31
33
- - :doc:`/core/authentication`
34
- - :doc:`/tutorial/enable-authentication`
32
+ In addition to the preceding mechanisms, MongoDB Atlas and MongoDB
33
+ Enterprise support the following mechanisms:
34
+
35
+ - :ref:`LDAP proxy authentication <security-auth-ldap>`, and
36
+ - :ref:`Kerberos authentication <security-auth-kerberos>`.
37
+
38
+ These mechanisms allow MongoDB to integrate into your
39
+ existing authentication system.
40
+
41
+ .. seealso::
42
+
43
+ - :doc:`/core/authentication`
44
+ - :doc:`/tutorial/enable-authentication`
35
45
36
46
.. _security-checklist-role-based-access-control:
37
47
38
48
|arrow| Configure Role-Based Access Control
39
49
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40
50
41
- - Create a user administrator **first**, then create additional
42
- users. Create a unique MongoDB user for each person/application
43
- that accesses the system.
44
-
51
+ - Create a :ref:` user administrator <create-user-admin>` **first**, then
52
+ create additional users. Create a unique MongoDB user for each
53
+ person/application that accesses the system.
54
+
45
55
- Follow the principle of least privilege. Create roles that define the
46
56
exact access rights required by a set of users. Then create
47
57
users and assign them only the roles they need to perform their
48
58
operations. A user can be a person or a client application.
49
59
50
60
.. note::
51
-
61
+
52
62
A user can have privileges across different databases. If a user
53
63
requires privileges on multiple databases, create a single user
54
64
with roles that grant applicable database privileges instead of
55
65
creating the user multiple times in different databases.
56
66
57
- |
58
-
59
- See also:
67
+ .. seealso::
60
68
61
- - :doc:`/core/authorization`
62
- - :doc:`/tutorial/manage-users-and-roles`
69
+ - :doc:`/core/authorization`
70
+ - :doc:`/tutorial/manage-users-and-roles`
63
71
64
72
|arrow| Encrypt Communication (TLS/SSL)
65
73
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -72,33 +80,29 @@ Pre-production Checklist/Considerations
72
80
73
81
.. include:: /includes/fact-tls-libraries.rst
74
82
75
- .. note::
76
-
77
- .. include:: /includes/fact-tls-1.0.rst
83
+ .. seealso::
78
84
79
- |
80
-
81
- See also: :doc:`/tutorial/configure-ssl`.
82
-
83
- .. |binary| replace:: MongoDB
85
+ :doc:`/tutorial/configure-ssl`.
84
86
85
87
|arrow| Encrypt and Protect Data
86
88
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87
89
88
- - Starting with MongoDB Enterprise 3.2, you can encrypt data in
89
- the storage layer with the WiredTiger storage engine's native
90
- :doc:`/core/security-encryption-at-rest`.
90
+ - You can encrypt data in the storage layer with the WiredTiger storage
91
+ engine's native :doc:`/core/security-encryption-at-rest`.
91
92
92
93
- If you are not using WiredTiger's encryption at rest, MongoDB
93
94
data should be encrypted on each host using file-system, device,
94
- or physical encryption (e.g. dm-crypt). Protect MongoDB data
95
- using file-system permissions. MongoDB data includes data files,
96
- configuration files, auditing logs, and key files.
97
-
98
- - Collect logs to a central log store. These logs contain DB
99
- authentication attempts including source IP address.
100
-
101
-
95
+ or physical encryption (for example dm-crypt). You should also protect
96
+ MongoDB data using file-system permissions. MongoDB data includes data
97
+ files, configuration files, auditing logs, and key files.
98
+
99
+ - You can use :doc:`/core/security-client-side-encryption` to encrypt
100
+ fields in documents application-side prior to transmitting data over
101
+ the wire to the server.
102
+
103
+ - Collect logs to a central log store. These logs contain database
104
+ authentication attempts including source IP addresses.
105
+
102
106
|arrow| Limit Network Exposure
103
107
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104
108
@@ -111,47 +115,39 @@ Pre-production Checklist/Considerations
111
115
- Allow only trusted clients to access the network interfaces and
112
116
ports on which MongoDB instances are available.
113
117
114
- .. note::
115
-
116
- .. include:: /includes/fact-default-bind-ip-change.rst
118
+ .. seealso::
117
119
118
- |
120
+ - :doc:`/core/security-hardening`
119
121
120
- See also:
122
+ - the :setting:`net.bindIp` configuration setting
121
123
122
- - :doc:`/core/security-hardening`
124
+ - the :setting:`security.clusterIpSourceAllowlist` configuration
125
+ setting
123
126
124
- - the :setting:`net.bindIp` configuration setting
125
-
126
- - the :setting:`security.clusterIpSourceAllowlist` configuration
127
- setting
128
-
129
- - the :ref:`authenticationRestrictions
130
- <db-createUser-authenticationRestrictions>` field to the
131
- :method:`db.createUser()` command to specify a per-user IP
132
- allow list.
127
+ - the :ref:`authenticationRestrictions
128
+ <db-createUser-authenticationRestrictions>` field to the
129
+ :method:`db.createUser()` command to specify a per-user IP
130
+ allow list.
133
131
134
132
135
133
|arrow| Audit System Activity
136
134
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137
135
138
136
- Track access and changes to database configurations and data.
139
137
`MongoDB Enterprise
140
- <http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server>`_
138
+ <http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server>`_
141
139
includes a system auditing facility that can record
142
- system events (e.g. user operations, connection events) on a
140
+ system events (including user operations and connection events) on a
143
141
MongoDB instance. These audit records permit forensic analysis
144
- and allow administrators to verify proper controls. You can set
145
- up filters to record specific events, such as authentication
142
+ and allow administrators to exercise proper controls. You can set
143
+ up filters to record only specific events, such as authentication
146
144
events.
147
145
148
- |
149
-
150
- See also:
146
+ .. seealso::
151
147
152
- - :doc:`/core/auditing`
148
+ - :doc:`/core/auditing`
153
149
154
- - :doc:`/tutorial/configure-auditing`
150
+ - :doc:`/tutorial/configure-auditing`
155
151
156
152
|arrow| Run MongoDB with a Dedicated User
157
153
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -160,9 +156,9 @@ Pre-production Checklist/Considerations
160
156
account. Ensure that the account has permissions to access data
161
157
but no unnecessary permissions.
162
158
163
- |
159
+ .. seealso::
164
160
165
- See also: :doc:`/installation`
161
+ :doc:`/installation`
166
162
167
163
.. _security-checklist-javascript:
168
164
@@ -173,35 +169,32 @@ Pre-production Checklist/Considerations
173
169
server-side operations: :dbcommand:`mapReduce`, :query:`$where`,
174
170
:group:`$accumulator`, and :expression:`$function`. If you do
175
171
not use these operations, disable server-side scripting by using
176
- the :option:`--noscripting <mongod --noscripting>` option on the
177
- command line.
172
+ the :option:`--noscripting <mongod --noscripting>` option.
178
173
179
174
- Keep input validation enabled. MongoDB enables input validation
180
175
by default through the :setting:`net.wireObjectCheck` setting.
181
176
This ensures that all documents stored by the
182
177
:binary:`~bin.mongod` instance are valid :term:`BSON`.
183
178
184
- |
179
+ .. seealso::
185
180
186
- See also: :doc:`/core/security-hardening`
181
+ :doc:`/core/security-hardening`
187
182
188
183
|arrow| Request a Security Technical Implementation Guide (where applicable)
189
184
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190
185
191
186
- The Security Technical Implementation Guide (STIG) contains
192
187
security guidelines for deployments within the United States
193
188
Department of Defense. MongoDB Inc. provides its STIG, upon
194
- request, for situations where it is required. Please `request a
195
- copy <http://www.mongodb.com/lp/contact/stig-requests>`_ for
196
- more information.
189
+ `request <http://www.mongodb.com/lp/contact/stig-requests>`_.
197
190
198
191
|arrow| Consider Security Standards Compliance
199
192
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200
193
201
194
- For applications requiring HIPAA or PCI-DSS compliance, please
202
195
refer to the `MongoDB Security Reference Architecture
203
196
<https://www.mongodb.com/collateral/mongodb-security-architecture>`_
204
- to learn more about how you can use the key security
197
+ to learn more about how you can use MongoDB's key security
205
198
capabilities to build compliant application infrastructure.
206
199
207
200
@@ -213,15 +206,14 @@ Periodic/Ongoing Production Checks
213
206
214
207
- Consult the `MongoDB end of life dates
215
208
<https://www.mongodb.com/support-policy>`_ and upgrade your
216
- MongoDB installation. In general, try to stay on the latest
209
+ MongoDB installation as needed . In general, try to stay on the latest
217
210
version.
218
211
219
212
- Ensure that your information security management system policies
220
213
and procedures extend to your MongoDB installation, including
221
214
performing the following:
222
215
223
- - Periodically apply patches to your machine and review
224
- guidelines.
216
+ - Periodically apply patches to your machine.
225
217
226
218
- Review policy/procedure changes, especially changes to your
227
219
network rules to prevent inadvertent MongoDB exposure to the
0 commit comments