Skip to content

Commit

Permalink
Merge pull request ComplianceAsCode#11476 from Mab879/sssd_include_dr…
Browse files Browse the repository at this point in the history
…op_in

Update Select SSSD Rules for RHEL 7 STIG Update
  • Loading branch information
marcusburghardt authored Jan 25, 2024
2 parents 1c4be7e + 02bdaff commit 1016ad3
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ ocil: |-
The output should return the following with a correctly configured CA cert path:
<pre>ldap_tls_cacert /path/to/tls/ca.cert</pre>
warnings:
- general:
A remediation is not provided for this rule as each system has unique requirements.

platform: sssd-ldap
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ references:
nist: SC-12(3),CM-6(a)
srg: SRG-OS-000250-GPOS-00093
stigid@ol7: OL07-00-040200
stigid@rhel7: RHEL-07-040200

ocil_clause: 'the TLS CA cert is not configured'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ind:textfilecontent54_test>

<ind:textfilecontent54_object id="object_sssd_ldap_tls_reqcert" version="1">
<ind:filepath>/etc/sssd/sssd.conf</ind:filepath>
<ind:filepath operation="pattern match">^\/etc\/sssd\/(sssd.conf|conf\.d\/.+\.conf)$</ind:filepath>
<ind:pattern operation="pattern match">^[\s]*\[domain\/[^]]*]([^\n\[\]]*\n+)+?[\s]*ldap_tls_reqcert[ \t]*=[ \t]*((?i)demand)[ \t]*$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# packages = /usr/lib/systemd/system/sssd.service

. $SHARED/setup_config_files.sh
setup_correct_sssd_config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# packages = /usr/lib/systemd/system/sssd.service

. $SHARED/setup_config_files.sh
setup_correct_sssd_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# packages = /usr/lib/systemd/system/sssd.service

. $SHARED/setup_config_files.sh
setup_correct_sssd_config

sed -i '/ldap_tls_reqcert/d' /etc/sssd/sssd.conf

echo '[domain/default]' >> /etc/sssd/conf.d/cac.conf
echo 'ldap_tls_reqcert = demand' >> /etc/sssd/conf.d/cac.conf
systemctl enable sssd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# packages = /usr/lib/systemd/system/sssd.service

. $SHARED/setup_config_files.sh
setup_correct_sssd_config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# packages = /usr/lib/systemd/system/sssd.service

. $SHARED/setup_config_files.sh
setup_correct_sssd_config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# packages = /usr/lib/systemd/system/sssd.service

. $SHARED/setup_config_files.sh
setup_correct_sssd_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ind:textfilecontent54_test>

<ind:textfilecontent54_object id="object_use_starttls_sssd_conf" version="1">
<ind:filepath>/etc/sssd/sssd.conf</ind:filepath>
<ind:filepath operation="pattern match">^\/etc\/sssd\/(sssd.conf|conf\.d\/.+\.conf)$</ind:filepath>
<ind:pattern operation="pattern match">^[\s]*\[domain\/[^]]*]([^\n\[\]]*\n+)+?[\s]*ldap_id_use_start_tls[ \t]*=[ \t]*((?i)true)[ \t]*$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# packages = /usr/lib/systemd/system/sssd.service

. $SHARED/setup_config_files.sh
setup_correct_sssd_config

sed -i '/ldap_id_use_start_tls/d' /etc/sssd/sssd.conf

echo '[domain/default]' >> /etc/sssd/conf.d/cac.conf
echo 'ldap_id_use_start_tls = True' >> /etc/sssd/conf.d/cac.conf
systemctl enable sssd
1 change: 0 additions & 1 deletion products/rhel7/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ selections:
- sshd_enable_warning_banner
- sssd_ldap_start_tls
- sssd_ldap_start_tls.severity=medium
- sssd_ldap_configure_tls_ca_dir
- sssd_ldap_configure_tls_ca
- sssd_ldap_configure_tls_reqcert
- sysctl_kernel_randomize_va_space
Expand Down

0 comments on commit 1016ad3

Please sign in to comment.