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

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