Blame SOURCES/scap-security-guide-0.1.58-RHEL_08_030720-PR_7288.patch

76240a
From fbaa0ae639fbb001e4c9e92d9e35f9dd9309d605 Mon Sep 17 00:00:00 2001
76240a
From: Matthew Burket <mburket@redhat.com>
76240a
Date: Mon, 9 Aug 2021 10:56:36 -0500
76240a
Subject: [PATCH 1/2] Allow set_config_file bash macro and lineinfile to set a
76240a
 custom sed path separator
76240a
76240a
So that if the text has '/' in it  the sed path separator can be changed.
76240a
---
76240a
 .../developer/06_contributing_with_content.md |  3 +++
76240a
 shared/macros-bash.jinja                      | 23 ++++++++++---------
76240a
 shared/templates/lineinfile/bash.template     |  6 ++++-
76240a
 3 files changed, 20 insertions(+), 12 deletions(-)
76240a
76240a
diff --git a/docs/manual/developer/06_contributing_with_content.md b/docs/manual/developer/06_contributing_with_content.md
76240a
index 245db1550de..c0d62bef5ca 100644
76240a
--- a/docs/manual/developer/06_contributing_with_content.md
76240a
+++ b/docs/manual/developer/06_contributing_with_content.md
76240a
@@ -1572,6 +1572,9 @@ the following to `rule.yml`:
76240a
     -   **oval_extend_definitions** - optional, list of additional OVAL
76240a
         definitions that have to pass along the generated check.
76240a
 
76240a
+        **sed_path_separator** - optional, default is `/`, sets the sed path separator. Set this
76240a
+        to a character like `#` if `/` is in use in your text.
76240a
+
76240a
 -   Languages: Ansible, Bash, OVAL
76240a
 
76240a
 
76240a
diff --git a/shared/macros-bash.jinja b/shared/macros-bash.jinja
76240a
index d654a0e0e89..7af8038a783 100644
76240a
--- a/shared/macros-bash.jinja
76240a
+++ b/shared/macros-bash.jinja
76240a
@@ -444,11 +444,12 @@ printf '%s\n' "{{{ message | replace('"', '\\"') }}}" >&2
76240a
 # separator_regex: regular expression that describes the separator and surrounding whitespace
76240a
 # prefix_regex: regular expression describing allowed leading characters at each line
76240a
 #}}
76240a
-{{%- macro set_config_file(path, parameter, value, create, insert_after, insert_before, insensitive=true, separator=" ", separator_regex="\s\+", prefix_regex="^\s*") -%}}
76240a
-    {{%- set line_regex = prefix_regex + ((parameter | escape_regex) | replace("/", "\/")) + separator_regex -%}}
76240a
+
76240a
+{{%- macro set_config_file(path, parameter, value, create, insert_after, insert_before, insensitive=true, separator=" ", separator_regex="\s\+", prefix_regex="^\s*", sed_path_separator="/") -%}}
76240a
     {{%- set new_line = parameter+separator+value -%}}
76240a
+    {{%- set line_regex = prefix_regex + ((parameter | escape_regex) | replace("/", "\/")) + separator_regex -%}}
76240a
 if [ -e "{{{ path }}}" ] ; then
76240a
-    {{{ lineinfile_absent(path, line_regex, insensitive) | indent(4) }}}
76240a
+    {{{ lineinfile_absent(path, line_regex, insensitive, sed_path_separator=sed_path_separator) | indent(4) }}}
76240a
 else
76240a
     {{%- if create %}}
76240a
     touch "{{{ path }}}"
76240a
@@ -456,19 +457,19 @@ else
76240a
     {{{ die("Path '" + path + "' wasn't found on this system. Refusing to continue.", action="return") | indent(4) }}}
76240a
     {{%- endif %}}
76240a
 fi
76240a
-{{{ lineinfile_present(path, new_line, insert_after, insert_before, insensitive) }}}
76240a
+{{{ lineinfile_present(path, new_line, insert_after, insert_before, insensitive, sed_path_separator=sed_path_separator) }}}
76240a
 {{%- endmacro -%}}
76240a
 
76240a
-{{%- macro lineinfile_absent(path, regex, insensitive=true) -%}}
76240a
+{{%- macro lineinfile_absent(path, regex, insensitive=true, sed_path_separator="/") -%}}
76240a
     {{%- if insensitive -%}}
76240a
         {{%- set modifier="Id" -%}}
76240a
     {{%- else -%}}
76240a
         {{%- set modifier="d" -%}}
76240a
     {{%- endif -%}}
76240a
-    {{% if '/' in regex %}}
76240a
-    {{{ raise("regex (" + regex + ") uses sed path separator (/) in " + rule_id) }}}
76240a
+    {{% if sed_path_separator in regex %}}
76240a
+    {{{ raise("regex (" + regex + ") uses sed path separator (" + sed_path_separator + ") in " + rule_id) }}}
76240a
     {{% endif %}}
76240a
-LC_ALL=C sed -i "/{{{ regex }}}/{{{ modifier }}}" "{{{ path }}}"
76240a
+LC_ALL=C sed -i "{{{ sed_path_separator }}}{{{ regex }}}{{{ sed_path_separator }}}{{{ modifier }}}" "{{{ path }}}"
76240a
 {{%- endmacro -%}}
76240a
 
76240a
 {{%- macro lineinfile_absent_in_directory(dirname, regex, insensitive=true) -%}}
76240a
@@ -480,7 +481,7 @@ LC_ALL=C sed -i "/{{{ regex }}}/{{{ modifier }}}" "{{{ path }}}"
76240a
 LC_ALL=C sed -i "/{{{ regex }}}/{{{ modifier }}}" "{{{ dirname }}}"/*
76240a
 {{%- endmacro -%}}
76240a
 
76240a
-{{%- macro lineinfile_present(path, line, insert_after="", insert_before="", insensitive=true) -%}}
76240a
+{{%- macro lineinfile_present(path, line, insert_after="", insert_before="", insensitive=true, sed_path_separator="/") -%}}
76240a
     {{%- if insensitive -%}}
76240a
         {{%- set grep_args="-q -m 1 -i" -%}}
76240a
     {{%- else -%}}
76240a
@@ -496,7 +497,7 @@ printf '%s\n' "{{{ line }}}" > "{{{ path }}}"
76240a
 cat "{{{ path }}}.bak" >> "{{{ path }}}"
76240a
     {{%- elif insert_after %}}
76240a
 # Insert after the line matching the regex '{{{ insert_after }}}'
76240a
-line_number="$(LC_ALL=C grep -n "{{{ insert_after }}}" "{{{ path }}}.bak" | LC_ALL=C sed 's/:.*//g')"
76240a
+line_number="$(LC_ALL=C grep -n "{{{ insert_after }}}" "{{{ path }}}.bak" | LC_ALL=C sed 's{{{sed_path_separator}}}:.*{{{sed_path_separator}}}{{{sed_path_separator}}}g')"
76240a
 if [ -z "$line_number" ]; then
76240a
     # There was no match of '{{{ insert_after }}}', insert at
76240a
     # the end of the file.
76240a
@@ -508,7 +509,7 @@ else
76240a
 fi
76240a
     {{%- elif insert_before %}}
76240a
 # Insert before the line matching the regex '{{{ insert_before }}}'.
76240a
-line_number="$(LC_ALL=C grep -n "{{{ insert_before }}}" "{{{ path }}}.bak" | LC_ALL=C sed 's/:.*//g')"
76240a
+line_number="$(LC_ALL=C grep -n "{{{ insert_before }}}" "{{{ path }}}.bak" | LC_ALL=C sed 's{{{sed_path_separator}}}:.*{{{sed_path_separator}}}{{{sed_path_separator}}}g')"
76240a
 if [ -z "$line_number" ]; then
76240a
     # There was no match of '{{{ insert_before }}}', insert at
76240a
     # the end of the file.
76240a
diff --git a/shared/templates/lineinfile/bash.template b/shared/templates/lineinfile/bash.template
76240a
index 0e43e88842a..6d1ca349268 100644
76240a
--- a/shared/templates/lineinfile/bash.template
76240a
+++ b/shared/templates/lineinfile/bash.template
76240a
@@ -4,4 +4,8 @@
76240a
 # complexity = low
76240a
 # disruption = low
76240a
 
76240a
-{{{ set_config_file(PATH, TEXT, value="", create='yes', insert_after="", insert_before="", separator="", separator_regex="", prefix_regex="^\s*") -}}}
76240a
+{{% if SED_PATH_SEPARATOR %}}
76240a
+    {{{ set_config_file(PATH, TEXT, value="", create='yes', insert_after="", insert_before="", separator="", separator_regex="", prefix_regex="^\s*", sed_path_separator=SED_PATH_SEPARATOR) -}}}
76240a
+{{% else %}}
76240a
+    {{{ set_config_file(PATH, TEXT, value="", create='yes', insert_after="", insert_before="", separator="", separator_regex="", prefix_regex="^\s*") -}}}
76240a
+{{% endif %}}
76240a
76240a
From 4b3182bd5d5308fed16f58da9656aa76a4275569 Mon Sep 17 00:00:00 2001
76240a
From: Matthew Burket <mburket@redhat.com>
76240a
Date: Mon, 9 Aug 2021 13:56:32 -0500
76240a
Subject: [PATCH 2/2] Add new rule for RHEL-08-030720
76240a
76240a
---
76240a
 .../ansible/shared.yml                        |  9 ++++
76240a
 .../bash/shared.sh                            | 11 +++++
76240a
 .../oval/shared.xml                           | 43 +++++++++++++++++++
76240a
 .../rule.yml                                  | 40 +++++++++++++++++
76240a
 .../tests/default_no_pass.fail.sh             |  7 +++
76240a
 .../tests/rsyslog.pass.sh                     |  4 ++
76240a
 .../tests/rsyslog_wrong_value.fail.sh         |  4 ++
76240a
 .../tests/rsyslogd.pass.sh                    |  4 ++
76240a
 .../tests/rsyslogd_wrong_value.fail.sh        |  4 ++
76240a
 .../tests/setup.sh                            |  9 ++++
76240a
 products/rhel8/profiles/stig.profile          |  1 +
76240a
 shared/references/cce-redhat-avail.txt        |  1 -
76240a
 .../data/profile_stability/rhel8/stig.profile |  1 +
76240a
 .../profile_stability/rhel8/stig_gui.profile  |  1 +
76240a
 14 files changed, 138 insertions(+), 1 deletion(-)
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/ansible/shared.yml
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/bash/shared.sh
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/oval/shared.xml
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/rule.yml
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/default_no_pass.fail.sh
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslog.pass.sh
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslog_wrong_value.fail.sh
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslogd.pass.sh
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslogd_wrong_value.fail.sh
76240a
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/setup.sh
76240a
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/ansible/shared.yml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/ansible/shared.yml
76240a
new file mode 100644
76240a
index 00000000000..637f90003b2
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/ansible/shared.yml
76240a
@@ -0,0 +1,9 @@
76240a
+# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel
76240a
+# reboot = false
76240a
+# strategy = configure
76240a
+# complexity = low
76240a
+# disruption = low
76240a
+
76240a
+{{{ ansible_set_config_file_dir(msg, "/etc/rsyslog.conf", "/etc/rsyslog.d", "/etc/rsyslog.conf", 
76240a
+                                "$ActionSendStreamDriverAuthMode", separator=' ', separator_regex='\s', 
76240a
+                                value="x509/name", create='yes') }}}
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/bash/shared.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/bash/shared.sh
76240a
new file mode 100644
76240a
index 00000000000..71d312f332f
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/bash/shared.sh
76240a
@@ -0,0 +1,11 @@
76240a
+# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel
76240a
+# reboot = false
76240a
+# strategy = configure
76240a
+# complexity = low
76240a
+# disruption = low
76240a
+
76240a
+if ! grep -s "\$ActionSendStreamDriverAuthMode\s*x509/name" /etc/rsyslog.conf /etc/rsyslog.d/*.conf; then
76240a
+	mkdir -p /etc/rsyslog.d
76240a
+    sed -i '/^.*\$ActionSendStreamDriverAuthMode.*/d' /etc/rsyslog.conf /etc/rsyslog.d/*.conf
76240a
+    echo "\$ActionSendStreamDriverAuthMode x509/name" > /etc/rsyslog.d/stream_driver_auth.conf
76240a
+fi
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/oval/shared.xml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/oval/shared.xml
76240a
new file mode 100644
76240a
index 00000000000..8e1ec48a974
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/oval/shared.xml
76240a
@@ -0,0 +1,43 @@
76240a
+<def-group>
76240a
+    <definition class="compliance" id="{{{ rule_id }}}" version="1">
76240a
+        {{{ oval_metadata("Rsyslogd must authenticate remote system its sending logs to.") }}}
76240a
+        <criteria operator="AND">
76240a
+            <criteria operator="OR">
76240a
+                 
76240a
+                            test_ref="test_{{{rule_id}}}_action_send_stream_driver_auth_mode" />
76240a
+                
76240a
+                            test_ref="test_{{{rule_id}}}_action_send_stream_driver_auth_mode_dir" />
76240a
+            </criteria>
76240a
+        </criteria>
76240a
+    </definition>
76240a
+
76240a
+    
76240a
+                                comment="Check if $ActionSendStreamDriverAuthMode x509/name is set in /etc/rsyslog.conf"
76240a
+                                id="test_{{{rule_id}}}_action_send_stream_driver_auth_mode" version="1">
76240a
+
76240a
+        <ind:object object_ref="obj_{{{rule_id}}}_action_send_stream_driver_auth_mode" />
76240a
+    </ind:textfilecontent54_test>
76240a
+
76240a
+    
76240a
+                                    comment="Check if  $ActionSendStreamDriverAuthMode x509/name is set in /etc/rsyslog.conf"
76240a
+                                    version="1">
76240a
+        <ind:filepath>/etc/rsyslog.conf</ind:filepath>
76240a
+        <ind:pattern operation="pattern match">^\$ActionSendStreamDriverAuthMode x509/name$</ind:pattern>
76240a
+        <ind:instance datatype="int">1</ind:instance>
76240a
+    </ind:textfilecontent54_object>
76240a
+
76240a
+    
76240a
+                                comment="Check if $ActionSendStreamDriverAuthMode x509/name is set in /etc/rsyslog.conf"
76240a
+                                id="test_{{{rule_id}}}_action_send_stream_driver_auth_mode_dir" version="1">
76240a
+        <ind:object object_ref="obj_{{{rule_id}}}_action_send_stream_driver_auth_mode_dir" />
76240a
+    </ind:textfilecontent54_test>
76240a
+
76240a
+    
76240a
+                                    comment="Check if $ActionSendStreamDriverAuthMode x509/name is set in /etc/rsyslog.d"
76240a
+                                    version="1">
76240a
+        <ind:path>/etc/rsyslog.d</ind:path>
76240a
+        <ind:filename operation="pattern match">^.*conf$</ind:filename>
76240a
+        <ind:pattern operation="pattern match">^\$ActionSendStreamDriverAuthMode x509/name$</ind:pattern>
76240a
+        <ind:instance datatype="int">1</ind:instance>
76240a
+    </ind:textfilecontent54_object>
76240a
+</def-group>
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/rule.yml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/rule.yml
76240a
new file mode 100644
76240a
index 00000000000..beaf8ce96da
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/rule.yml
76240a
@@ -0,0 +1,40 @@
76240a
+documentation_complete: true
76240a
+
76240a
+title: Ensure Rsyslog Authenticates Off-Loaded Audit Records
76240a
+
76240a
+description: |-
76240a
+    Rsyslogd is a system utility providing support for message logging. Support
76240a
+    for both internet and UNIX domain sockets enables this utility to support both local
76240a
+    and remote logging.  Couple this utility with <tt>gnutls</tt> (which is a secure communications
76240a
+    library implementing the SSL, TLS and DTLS protocols), and you have a method to securely
76240a
+    encrypt and off-load auditing.
76240a
+
76240a
+    When using <tt>rsyslogd</tt> to off-load logs the remote system must be authenticated.
76240a
+
76240a
+rationale: |-
76240a
+    The audit records generated by Rsyslog contain valuable information regarding system
76240a
+    configuration, user authentication, and other such information. Audit records should be
76240a
+    protected from unauthorized access.
76240a
+
76240a
+severity: medium
76240a
+
76240a
+identifiers:
76240a
+    cce@rhel8: CCE-86339-9
76240a
+
76240a
+references:
76240a
+    disa: CCI-001851
76240a
+    nist: AU-4(1)
76240a
+    srg: SRG-OS-000342-GPOS-00133,SRG-OS-000479-GPOS-00224
76240a
+    stigid@rhel8: RHEL-08-030720
76240a
+
76240a
+
76240a
+ocil_clause: '$ActionSendStreamDriverAuthMode in /etc/rsyslog.conf is not set to x509/name'
76240a
+
76240a
+ocil: |-
76240a
+    Verify the operating system authenticates the remote logging server for off-loading audit logs with the following command:
76240a
+
76240a
+    
$ sudo grep -i '$ActionSendStreamDriverAuthMode' /etc/rsyslog.conf /etc/rsyslog.d/*.conf
76240a
+    The output should be
76240a
+    
$/etc/rsyslog.conf:$ActionSendStreamDriverAuthMode x509/name
76240a
+
76240a
+
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/default_no_pass.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/default_no_pass.fail.sh
76240a
new file mode 100644
76240a
index 00000000000..54d70f6b85f
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/default_no_pass.fail.sh
76240a
@@ -0,0 +1,7 @@
76240a
+#!/bin/bash
76240a
+bash -x setup.sh
76240a
+
76240a
+if [[ -f encrypt.conf ]]; then
76240a
+  sed -i "/^\$ActionSendStreamDriverMod.*/d" /etc/rsyslog.conf
76240a
+fi
76240a
+  sed -i "/^\$ActionSendStreamDriverMod.*/d" /etc/rsyslog.conf
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslog.pass.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslog.pass.sh
76240a
new file mode 100644
76240a
index 00000000000..fe3db6f9c41
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslog.pass.sh
76240a
@@ -0,0 +1,4 @@
76240a
+#!/bin/bash
76240a
+bash -x setup.sh
76240a
+
76240a
+echo "\$ActionSendStreamDriverAuthMode x509/name" >> /etc/rsyslog.conf
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslog_wrong_value.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslog_wrong_value.fail.sh
76240a
new file mode 100644
76240a
index 00000000000..bad06fba0e9
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslog_wrong_value.fail.sh
76240a
@@ -0,0 +1,4 @@
76240a
+#!/bin/bash
76240a
+bash -x setup.sh
76240a
+
76240a
+echo "\$ActionSendStreamDriverAuthMode 0" >> /etc/rsyslog.conf
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslogd.pass.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslogd.pass.sh
76240a
new file mode 100644
76240a
index 00000000000..ab511daecc7
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslogd.pass.sh
76240a
@@ -0,0 +1,4 @@
76240a
+#!/bin/bash
76240a
+bash -x setup.sh
76240a
+
76240a
+echo "\$ActionSendStreamDriverAuthMode x509/name" >> /etc/rsyslog.d/encrypt.conf
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslogd_wrong_value.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslogd_wrong_value.fail.sh
76240a
new file mode 100644
76240a
index 00000000000..02bf64747a7
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/rsyslogd_wrong_value.fail.sh
76240a
@@ -0,0 +1,4 @@
76240a
+#!/bin/bash
76240a
+bash -x setup.sh
76240a
+
76240a
+echo "\$ActionSendStreamDriverAuthMode x509/certvalid" >> /etc/rsyslog.d/encrypt.conf
76240a
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/setup.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/setup.sh
76240a
new file mode 100644
76240a
index 00000000000..9686f16bcc9
76240a
--- /dev/null
76240a
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdriverauthmode/tests/setup.sh
76240a
@@ -0,0 +1,9 @@
76240a
+#!/bin/bash
76240a
+# Use this script to ensure the rsyslog directory structure and rsyslog conf file
76240a
+# exist in the test env.
76240a
+config_file=/etc/rsyslog.conf
76240a
+
76240a
+# Ensure directory structure exists (useful for container based testing)
76240a
+test -f $config_file || touch $config_file
76240a
+
76240a
+test -d /etc/rsyslog.d/ || mkdir /etc/rsyslog.d/
76240a
diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile
76240a
index ec0a3b17537..382247057cd 100644
76240a
--- a/products/rhel8/profiles/stig.profile
76240a
+++ b/products/rhel8/profiles/stig.profile
76240a
@@ -854,6 +854,7 @@ selections:
76240a
     - rsyslog_encrypt_offload_actionsendstreamdrivermode
76240a
 
76240a
     # RHEL-08-030720
76240a
+    - rsyslog_encrypt_offload_actionsendstreamdriverauthmode
76240a
 
76240a
     # RHEL-08-030730
76240a
     # this rule expects configuration in MB instead percentage as how STIG demands
76240a
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
76240a
index 61384c108a0..03211442aba 100644
76240a
--- a/shared/references/cce-redhat-avail.txt
76240a
+++ b/shared/references/cce-redhat-avail.txt
76240a
@@ -460,7 +460,6 @@ CCE-86335-7
76240a
 CCE-86336-5
76240a
 CCE-86337-3
76240a
 CCE-86338-1
76240a
-CCE-86339-9
76240a
 CCE-86340-7
76240a
 CCE-86341-5
76240a
 CCE-86342-3
76240a
diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile
76240a
index bffa509b698..481e7b28228 100644
76240a
--- a/tests/data/profile_stability/rhel8/stig.profile
76240a
+++ b/tests/data/profile_stability/rhel8/stig.profile
76240a
@@ -238,6 +238,7 @@ selections:
76240a
 - require_singleuser_auth
76240a
 - root_permissions_syslibrary_files
76240a
 - rsyslog_cron_logging
76240a
+- rsyslog_encrypt_offload_actionsendstreamdriverauthmode
76240a
 - rsyslog_encrypt_offload_actionsendstreamdrivermode
76240a
 - rsyslog_encrypt_offload_defaultnetstreamdriver
76240a
 - rsyslog_remote_access_monitoring
76240a
diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile
76240a
index c84ac75c7bf..7fb3d892a30 100644
76240a
--- a/tests/data/profile_stability/rhel8/stig_gui.profile
76240a
+++ b/tests/data/profile_stability/rhel8/stig_gui.profile
76240a
@@ -249,6 +249,7 @@ selections:
76240a
 - require_singleuser_auth
76240a
 - root_permissions_syslibrary_files
76240a
 - rsyslog_cron_logging
76240a
+- rsyslog_encrypt_offload_actionsendstreamdriverauthmode
76240a
 - rsyslog_encrypt_offload_actionsendstreamdrivermode
76240a
 - rsyslog_encrypt_offload_defaultnetstreamdriver
76240a
 - rsyslog_remote_access_monitoring