@@ -228,16 +228,87 @@ You may also specify these options in the :doc:`configuration file
228228 format: BSON
229229 path: data/db/auditLog.bson
230230
231- To view the contents of the file, pass the file to the MongoDB utility
232- :binary:`~bin.bsondump`. For example, the following converts the audit log
233- into a human-readable form and output to the terminal:
231+ The following example converts the audit log into readable form using
232+ :binary:`~bin.bsondump` and outputs the result:
234233
235234.. code-block:: bash
236235
237236 bsondump data/db/auditLog.bson
238237
238+ .. _runtime-audit-configuration:
239+
240+ Runtime Audit Filter Management
241+ -------------------------------
242+
243+ Starting in MongoDB 5.0, audit filters can be configured at runtime.
244+ Runtime Audit Filter Management provides three benefits compared to
245+ audit filter configurations that are specified in a local
246+ :binary:`~bin.mongod` or :binary:`~bin.mongos` configuration file:
247+
248+ - :ref:`rafm-separation`
249+ - :ref:`rafm-configurability`
250+ - :ref:`rafm-consistency`
251+
252+ .. _rafm-separation:
253+
254+ Separation of Concerns
255+ ~~~~~~~~~~~~~~~~~~~~~~
256+
257+ Prior to MongoDB 5.0, anyone auditing a MongoDB :binary:`~bin.mongod`
258+ or :binary:`~bin.mongos` instance had to have write access to the host
259+ server's file system in order to update audit filters. Runtime Audit
260+ Filter Management improves security by separating audit access from
261+ administrative access.
262+
263+ Using Runtime Audit Filter Management instead of editing configuration
264+ files directly means:
265+
266+ - File system access is not required so an auditor does not need access
267+ to the :binary:`~bin.mongod` or :binary:`~bin.mongos` host server.
268+
269+ - There is no direct access to the :binary:`~bin.mongod` or
270+ :binary:`~bin.mongos` instance's configuration file.
271+
272+ - Runtime Audit Filter Management only exposes :ref:`audit filters
273+ <audit-filter>` and the :parameter:`auditAuthorizationSuccess`
274+ parameter.
275+
276+ .. _rafm-configurability:
277+
278+ Runtime Configurability
279+ ~~~~~~~~~~~~~~~~~~~~~~~
280+
281+ Starting in MongoDB 5.0, when Runtime Audit Filter Management is
282+ enabled, auditing can be reconfigured at runtime without restarting the
283+ :binary:`~bin.mongod` or :binary:`~bin.mongos` instance. A statically
284+ configured instance has to be restarted to update its audit settings.
285+
286+ Audit filter modifications made at runtime persist when an instance is
287+ shutdown and restarted.
288+
289+ .. _rafm-consistency:
290+
291+ Consistency
292+ ~~~~~~~~~~~
293+
294+ Within a cluster, if all participating :binary:`~bin.mongod` and
295+ :binary:`~bin.mongos` nodes are configured to use Runtime Audit Filter
296+ Management, then every node will use the same audit filters. In
297+ contrast, if each node has its own locally configured audit filters,
298+ there is no guarantee of audit filter consistency across nodes.
299+
300+ .. _rafm-enable:
301+
302+ Enable Runtime Audit Filter Management
303+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
304+
305+ .. include:: /includes/fact-enable-runtime-audit-configuration.rst
306+
239307.. seealso::
240308
241309 - :doc:`/tutorial/configure-audit-filters`
242310 - :doc:`/core/auditing`
243311 - :doc:`/reference/audit-message`
312+ - :dbcommand:`setAuditConfig`
313+ - :dbcommand:`getAuditConfig`
314+
0 commit comments