From 2e02b54a55a9b9ecacc329a826d052f1beaf6119 Mon Sep 17 00:00:00 2001 From: Andrew Feierabend Date: Mon, 23 Nov 2020 14:57:20 -0500 Subject: [PATCH] DOCSP-11591 update SELinux FTDC note, still required --- .../includes/fact-selinux-redhat-options.rst | 120 +++++++++--------- 1 file changed, 59 insertions(+), 61 deletions(-) diff --git a/source/includes/fact-selinux-redhat-options.rst b/source/includes/fact-selinux-redhat-options.rst index be80613afb0..cb3b83154be 100644 --- a/source/includes/fact-selinux-redhat-options.rst +++ b/source/includes/fact-selinux-redhat-options.rst @@ -1,7 +1,10 @@ .. important:: If SELinux is in ``enforcing`` mode, you must customize your SELinux - policy for MongoDB. + policy for MongoDB by making the following two policy adjustments: + +Permit Access to ``cgroup`` ++++++++++++++++++++++++++++ .. container:: @@ -48,17 +51,65 @@ The MongoDB process is now able to access the correct files with SELinux set to ``enforcing``. +Permit Access to ``netstat`` for FTDC ++++++++++++++++++++++++++++++++++++++ + +.. container:: + + The current SELinux Policy does not allow the MongoDB process to open + and read ``/proc/net/netstat``, which is required for + :ref:`Full Time Diagnostic Data Capture (FTDC) `. + If you intend to run SELinux in + ``enforcing`` mode, you will need to make the following adjustment + to your SELinux policy: + + #. Ensure your system has the ``checkpolicy`` package installed: + + .. code-block:: sh + + sudo yum install checkpolicy + + #. Create a custom policy file :file:`mongodb_proc_net.te`: + + .. code-block:: sh + + cat > mongodb_proc_net.te <`. -Non-Default MongoDB Directory Path(s) +Using a Custom MongoDB Directory Path +++++++++++++++++++++++++++++++++++++ .. container:: @@ -127,64 +178,11 @@ Non-Default MongoDB Directory Path(s) restorecon -R -v '/mongodb/log' -Non-Default MongoDB Ports -+++++++++++++++++++++++++ +Using a Custom MongoDB Port ++++++++++++++++++++++++++++ .. container:: .. code-block:: sh sudo semanage port -a -t mongod_port_t -p tcp - -*Optional.* Suppress ``FTDC`` Warnings -++++++++++++++++++++++++++++++++++++++ - -.. container:: - - The current SELinux Policy does not allow the MongoDB process to open - and read ``/proc/net/netstat`` for :ref:`param-ftdc` (FTDC). As such, - the audit log may include numerous messages regarding lack of access - to this path. - - To track the proposed fix, see ``__. - - Optionally, as a temporary fix, you can manually adjust the SELinux - Policy: - - #. Ensure your system has the ``checkpolicy`` package installed: - - .. code-block:: none - - sudo yum install checkpolicy - - #. Create a custom policy file :file:`mongodb_proc_net.te`: - - .. code-block:: none - - cat > mongodb_proc_net.te <