Skip to content

Commit 0850110

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

File tree

6 files changed

+123
-5
lines changed

6 files changed

+123
-5
lines changed

source/administration/monitoring.txt

Lines changed: 52 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,55 @@ 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+
removes :doc:`messages </reference/log-messages>` associated with any given log
366+
event, leaving only metadata, source files, or line numbers related to the
367+
event. :setting:`security.redactClientLogData` prevents potentially sensitive
368+
information from entering the system log at the cost of diagnostic detail.
369+
370+
For example, the following operation inserts a document into a
371+
:program:`mongod` running without log redaction. The :program:`mongod`
372+
has :setting:`systemLog.component.query.verbosity` set to ``0``:
373+
374+
.. code-block:: javascript
375+
376+
db.clients.insertOne( { "name" : Joe, "PII" : "Sensitive Information" } )
377+
378+
This operation produces the following log event:
379+
380+
.. code-block:: text
381+
382+
2016-09-23T13:51:43.572-0400 I COMMAND [conn1] command employeeData.directory
383+
appName: "MongoDB Shell"
384+
command: insert {
385+
insert: "directory",
386+
documents: [
387+
{
388+
_id: ObjectId('57e56baf6a71e2b785153aec'),
389+
name: "Joe",
390+
PII: "Sensitive Information"
391+
}
392+
],
393+
...
394+
395+
A :program:`mongod` running with :setting:`security.redactClientLogData`
396+
performing the same insert operation produces the following log event:
397+
398+
.. code-block:: text
399+
400+
2016-09-23T13:51:43.572-0400 I COMMAND [conn1] ###
401+
402+
Use :setting:`~security.redactClientLogData` in conjunction with
403+
:doc:`encryption </core/security-encryption>` to assist compliance with
404+
regulatory requirements.
405+
357406
Diagnosing Performance Issues
358407
-----------------------------
359408

@@ -497,7 +546,7 @@ using this lock.
497546

498547
.. toctree::
499548
:titlesonly:
500-
549+
501550
/tutorial/monitor-with-snmp
502551
/tutorial/monitor-with-snmp-on-windows
503-
/tutorial/troubleshoot-snmp
552+
/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}} removes any message accompanying a given
2176+
log event. This prevents the {{program}} from writing potentially sensitive
2177+
data stored on the database to the diagnostic log. Metadata such as
2178+
error or operation codes, line numbers, and source file names are still
2179+
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

0 commit comments

Comments
 (0)