Skip to content

Commit 2aa3275

Browse files
committed
DOCS-8276: Log Redaction with redactClientLogData
1 parent 51cf86b commit 2aa3275

File tree

7 files changed

+130
-6
lines changed

7 files changed

+130
-6
lines changed

source/administration/monitoring.txt

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ a paid subscription.
264264

265265
- |MMS| is a cloud-based suite of services for managing MongoDB
266266
deployments. |MMS| provides monitoring, backup, and automation
267-
functionality. For an on-premise solution, see also
267+
functionality. For an on-premise solution, see also
268268
:products:`Ops Manager, available in MongoDB Enterprise Advanced
269269
</mongodb-enterprise-advanced?jmp=docs>`.
270270

@@ -354,6 +354,61 @@ affect logging:
354354
- :dbcommand:`logRotate`. Rotates the log files for :program:`mongod`
355355
processes only. See :doc:`/tutorial/rotate-log-files`.
356356

357+
.. _monitoring-log-redaction:
358+
359+
Log Redaction
360+
~~~~~~~~~~~~~
361+
362+
.. versionadded:: 3.4 Available in MongoDB Enterprise only
363+
364+
A :program:`mongod` running with :setting:`security.redactClientLogData`
365+
redacts :doc:`messages </reference/log-messages>` associated with any given
366+
log event before logging, leaving only metadata, source files, or line numbers
367+
related to the event. :setting:`security.redactClientLogData` prevents
368+
potentially sensitive information from entering the system log at the cost of
369+
diagnostic detail.
370+
371+
For example, the following operation inserts a document into a
372+
:program:`mongod` running without log redaction. The :program:`mongod`
373+
has :setting:`systemLog.component.query.verbosity` set to ``0``:
374+
375+
.. code-block:: javascript
376+
377+
db.clients.insertOne( { "name" : Joe, "PII" : "Sensitive Information" } )
378+
379+
This operation produces the following log event:
380+
381+
.. code-block:: text
382+
383+
2016-09-23T13:51:43.572-0400 I COMMAND [conn1] command employeeData.directory
384+
appName: "MongoDB Shell"
385+
command: insert {
386+
insert: "directory",
387+
documents: [
388+
{
389+
_id: ObjectId('57e56baf6a71e2b785153aec'),
390+
name: "Joe",
391+
PII: "Sensitive Information"
392+
}
393+
],
394+
...
395+
396+
A :program:`mongod` running with :setting:`security.redactClientLogData`
397+
performing the same insert operation produces the following log event:
398+
399+
.. note::
400+
401+
The exact redacted output may change leading up to the MongoDB 3.4 release.
402+
This output is based on the 3.3 development series build.
403+
404+
.. code-block:: text
405+
406+
2016-09-23T13:51:43.572-0400 I COMMAND [conn1] ###
407+
408+
Use :setting:`~security.redactClientLogData` in conjunction with
409+
:doc:`encryption </core/security-encryption>` to assist compliance with
410+
regulatory requirements.
411+
357412
Diagnosing Performance Issues
358413
-----------------------------
359414

@@ -497,7 +552,7 @@ using this lock.
497552

498553
.. toctree::
499554
:titlesonly:
500-
555+
501556
/tutorial/monitor-with-snmp
502557
/tutorial/monitor-with-snmp-on-windows
503-
/tutorial/troubleshoot-snmp
558+
/tutorial/troubleshoot-snmp

source/core/security-encryption-at-rest.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,25 @@ transport encryption.
9999

100100
For details, see :ref:`rotate-encryption-keys`.
101101

102+
Logging
103+
~~~~~~~
104+
105+
.. versionadded:: 3.4 Available in MongoDB Enterprise only
106+
107+
The log file is not encrypted as a part of MongoDB's encrypted storage engine.
108+
A :program:`mongod` running with :ref:`logging <monitoring-standard-loggging>`
109+
may output potentially sensitive information to log files as a part of normal
110+
operations, depending on the configured :ref:`log verbosity
111+
<log-messages-configure-verbosity>`.
112+
113+
MongoDB 3.4 Enterprise provides the :setting:`security.redactClientLogData`
114+
setting to prevent potentially sensitive information from entering the
115+
:program:`mongod` process log. :setting:`~security.redactClientLogData`
116+
reduces detail in the log and may complicate log diagnostics.
117+
118+
See the :ref:`log redaction <monitoring-log-redaction>` manual entry for
119+
more information.
120+
102121
.. _app-level-encryption:
103122

104123
Application Level Encryption
@@ -107,7 +126,7 @@ Application Level Encryption
107126
Application Level Encryption provides encryption on a per-field or
108127
per-document basis within the application layer. To encrypt document or
109128
field level data, write custom encryption and decryption routines or
110-
use a commercial solution.
129+
use a commercial solution.
111130

112131
.. include:: /includes/partners-security.rst
113132

@@ -118,3 +137,4 @@ use a commercial solution.
118137

119138
/tutorial/configure-encryption
120139
/tutorial/rotate-encryption-key
140+

source/includes/options-conf.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,4 +1786,15 @@ inherit:
17861786
name: inMemorySizeGB
17871787
program: mongod
17881788
file: options-mongod.yaml
1789+
---
1790+
program: conf
1791+
name: security.redactClientLogData
1792+
type: boolean
1793+
directive: setting
1794+
inherit:
1795+
name: redactClientLogData
1796+
program: mongod
1797+
file: options-mongod.yaml
1798+
replacement:
1799+
program: :program:`mongod`
17891800
...

source/includes/options-mongod.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,4 +2164,37 @@ description: |
21642164
prior to restarting {{program}} without {{role}}.
21652165
21662166
optional: true
2167+
---
2168+
program: mongod
2169+
name: redactClientLogData
2170+
args: null
2171+
directive: option
2172+
description: |
2173+
.. versionadded:: 3.4 Available in MongoDB Enterprise only.
2174+
2175+
A {{program}} running with {{role}} redacts any message accompanying a given
2176+
log event before logging. This prevents the {{program}} from writing
2177+
potentially sensitive data stored on the database to the diagnostic log.
2178+
Metadata such as error or operation codes, line numbers, and source file
2179+
names are still visible in the logs.
2180+
2181+
Use {{role}} in conjunction with :doc:`encryption
2182+
</core/security-encryption>` to assist compliance with regulatory
2183+
requirements.
2184+
2185+
For example, a {{program}} might store Personally Identifiable Information
2186+
(PII) in one or more collections. The {{program}} logs events related to CRUD
2187+
operations, sharding metadata, or replication information. It is possible
2188+
that the {{program}} may expose PII as a part of these logging operations.
2189+
A {{program}} running with {{role}} removes any message accompanying
2190+
these events before being output to the log, effectively removing the PII.
2191+
2192+
Diagnostics on a {{mongod}} running with {{role}} may be more difficult
2193+
due to the lack of data related to a log event. See the
2194+
:ref:`process logging <monitoring-log-redaction>` manual page for an
2195+
example of the effect of {{role}} on log output.
2196+
2197+
You can toggle {{role}} on or off using :dbcommand:`setParameter` during
2198+
runtime.
2199+
21672200
...

source/reference/configuration-options.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,9 @@ Core Options
349349
keyFile: <string>
350350
clusterAuthMode: <string>
351351
authorization: <string>
352-
transitionToAuth: <bool>
352+
transitionToAuth: <boolean>
353353
javascriptEnabled: <boolean>
354+
redactClientLogData: <boolean>
354355
sasl:
355356
hostName: <string>
356357
serviceName: <string>
@@ -377,6 +378,8 @@ Core Options
377378

378379
.. include:: /includes/option/setting-conf-security.javascriptEnabled.rst
379380

381+
.. include:: /includes/option/setting-conf-security.redactClientLogData.rst
382+
380383
.. _encryption-key-management-conf-options:
381384

382385
Key Management Configuration Options

source/reference/program/mongod.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ Core Options
129129

130130
.. include:: /includes/option/option-mongod-shutdown.rst
131131

132+
.. include:: /includes/option/option-mongod-redactClientLogData.rst
133+
132134
Storage Options
133135
~~~~~~~~~~~~~~~
134136

source/tutorial/sharding-high-availability-writes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ election or datacenter failure.
2626

2727
These concepts require familiarity with MongoDB :term:`sharded clusters
2828
<sharded cluster>`, :term:`replica sets <replica set>`, and the general
29-
behavior of :ref:`tag-aware-sharding`.
29+
behavior of :ref:`zones <zone-sharding>`.
3030

3131
This tutorial assumes an insert-only or insert-intensive workload. The
3232
concepts and strategies discussed in this tutorial are not well suited for

0 commit comments

Comments
 (0)