Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RHEL 10 Test Platforms #12802

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9, Red Hat Enterprise Linux 10
# profiles = xccdf_org.ssgproject.content_profile_ospp

mkdir -p /etc/ssh/sshd_config.d
Expand Down
6 changes: 3 additions & 3 deletions linux_os/guide/services/sssd/sssd_enable_smartcards/rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-
<pre>[pam]
pam_cert_auth = True
</pre>
{{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9"] %}}
{{% if product in ["fedora", "ol8", "ol9"] or 'rhel' in product %}}
Add or update "pam_sss.so" line in auth section of "/etc/pam.d/system-auth" file to include
"try_cert_auth" or "require_cert_auth" option, like in the following example:
<pre>
Expand Down Expand Up @@ -58,7 +58,7 @@ ocil: |-
If configured properly, output should be
<pre>pam_cert_auth = True</pre>

{{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9"] %}}
{{% if product in ["fedora", "ol8", "ol9"] or 'rhel' in product %}}
To verify that smart cards are enabled in PAM files, run the following command:
<pre>$ sudo grep -e "auth.*pam_sss\.so.*\(allow_missing_name\|try_cert_auth\)" /etc/pam.d/smartcard-auth /etc/pam.d/system-auth</pre>
If configured properly, output should be
Expand All @@ -73,7 +73,7 @@ fixtext: |-

pam_cert_auth = True

{{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9"] %}}
{{% if product in ["fedora", "ol8", "ol9"] or 'rhel' in product %}}
Enable the <tt>with-smartcard</tt> feature using the <tt>authselect</tt> command:
sudo authselect enable-feature with-smartcard
sudo authselect apply-changes -b
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

authselect create-profile test_profile -b sssd
authselect select "custom/test_profile" --force
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

authselect create-profile test_profile -b sssd
authselect select "custom/test_profile" --force
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

authselect create-profile test_profile -b sssd
authselect select "custom/test_profile" --force
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

authselect create-profile test_profile -b sssd
authselect select "custom/test_profile" --force
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

pam_files=("password-auth" "system-auth")

Expand All @@ -20,7 +20,7 @@ for file in ${pam_files[@]}; do
if grep -qP "auth.*faillock\.so.*preauth" $CUSTOM_PROFILE_DIR/$file; then
sed -i "/^\s*auth.*faillock\.so.*preauth/ s/$/even_deny_root/" \
"$CUSTOM_PROFILE_DIR/$file"
else
else
sed -i "0,/^\s*auth.*/i auth required pam_faillock.so preauth even_deny_root" \
"$CUSTOM_PROFILE_DIR/$file"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9,Red Hat Enterprise Linux 10

# Clean sysctl config directories
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9,Red Hat Enterprise Linux 10

# Clean sysctl config directories
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9,Red Hat Enterprise Linux 10

# Clean sysctl config directories
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9,Red Hat Enterprise Linux 10

# Clean sysctl config directories
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# packages = crypto-policies-scripts

# IMPORTANT: This is a false negative scenario.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# packages = crypto-policies-scripts

update-crypto-policies --set "DEFAULT"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_ospp
# packages = crypto-policies-scripts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_ospp
# packages = crypto-policies-scripts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_ospp
# packages = crypto-policies-scripts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_ospp
# packages = crypto-policies-scripts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

{{{ tests_init_faillock_vars("correct") }}}

Expand All @@ -23,7 +23,7 @@ for file in ${pam_files[@]}; do
if grep -qP "auth.*faillock\.so.*preauth" $CUSTOM_PROFILE_DIR/$file; then
sed -i "/^\s*auth.*faillock\.so.*preauth/ s/$/$PRM_NAME=$TEST_VALUE/" \
"$CUSTOM_PROFILE_DIR/$file"
else
else
sed -i "0,/^\s*auth.*/i auth required pam_faillock.so preauth $PRM_NAME=$TEST_VALUE" \
"$CUSTOM_PROFILE_DIR/$file"
fi
Expand Down
Loading