diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/ansible/shared.yml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/ansible/shared.yml new file mode 100644 index 00000000000..07bd642ec99 --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/ansible/shared.yml @@ -0,0 +1,7 @@ +# platform = multi_platform_all +# reboot = false +# strategy = enable +# complexity = low +# disruption = low + +{{{ ansible_pam_faillock_enable() }}} diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/bash/shared.sh b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/bash/shared.sh new file mode 100644 index 00000000000..ac92bd5be1e --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/bash/shared.sh @@ -0,0 +1,7 @@ +# platform = multi_platform_all +# reboot = false +# strategy = enable +# complexity = low +# disruption = low + +{{{ bash_pam_faillock_enable() }}} diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/oval/shared.xml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/oval/shared.xml new file mode 100644 index 00000000000..19b1e18cb03 --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/oval/shared.xml @@ -0,0 +1,79 @@ + + + {{{ oval_metadata( + "Configure the use of the pam_faillock.so module in the /etc/pam.d/password-auth file.") + }}} + + + + + + + + + + ^[\s]*auth[\s]+(required|\[(?=.*?\bsuccess=ok\b)(?=.*?\bnew_authtok_reqd=ok\b)(?=.*?\bignore=ignore\b)(?=.*?\bdefault=bad\b).*\])[\s]+pam_faillock\.so[\s\w\d=]+preauth[\s\S]*^[\s]*auth[\s]+(sufficient|\[(?=.*\bsuccess=done\b)(?=.*?\bnew_authtok_reqd=done\b)(?=.*?\bdefault=ignore\b).*\])[\s]+pam_unix\.so[\s\S]*^[\s]*auth[\s]+(required|\[(?=.*?\bsuccess=ok\b)(?=.*?\bnew_authtok_reqd=ok\b)(?=.*?\bignore=ignore\b)(?=.*?\bdefault=bad\b).*\])[\s]+pam_faillock\.so[\s\w\d=]+authfail + + + ^[\s]*account[\s]+(required|\[(?=.*?\bsuccess=ok\b)(?=.*?\bnew_authtok_reqd=ok\b)(?=.*?\bignore=ignore\b)(?=.*?\bdefault=bad\b).*\])[\s]+pam_faillock\.so[\s\S]*^[\s]*account[\s]+(required|\[(?=.*?\bsuccess=ok\b)(?=.*?\bnew_authtok_reqd=ok\b)(?=.*?\bignore=ignore\b)(?=.*?\bdefault=bad\b).*\])[\s]+pam_unix\.so + + + + + + + + + ^/etc/pam.d/password-auth$ + ^[\s]*auth\N+pam_unix\.so + 1 + + + + + + + + + ^/etc/pam.d/password-auth$ + + 1 + + + + + + + + ^/etc/pam.d/password-auth$ + + 1 + + diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/rule.yml index d3eeadde64b..ff52c86993f 100644 --- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/rule.yml +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/rule.yml @@ -20,6 +20,7 @@ references: disa: CCI-000044 nist: AC-7 (a) srg: SRG-OS-000021-GPOS-00005 + stigid@ol8: OL08-00-020026 stigid@rhel8: RHEL-08-020026 stigid@rhel9: RHEL-09-611035 diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/tests/correct_value.pass.sh b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/tests/correct_value.pass.sh new file mode 100644 index 00000000000..98fab185853 --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/tests/correct_value.pass.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# packages = authselect,pam +# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9 + +authselect create-profile test_profile -b sssd +authselect select "custom/test_profile" --force + +authselect enable-feature with-faillock + +authselect apply-changes diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/tests/no_value.fail.sh b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/tests/no_value.fail.sh new file mode 100644 index 00000000000..ce36c2d2214 --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_password_auth/tests/no_value.fail.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# packages = authselect,pam +# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9 + +authselect create-profile test_profile -b sssd +authselect select "custom/test_profile" --force + +authselect disable-feature with-faillock + +authselect apply-changes diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/ansible/shared.yml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/ansible/shared.yml new file mode 100644 index 00000000000..07bd642ec99 --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/ansible/shared.yml @@ -0,0 +1,7 @@ +# platform = multi_platform_all +# reboot = false +# strategy = enable +# complexity = low +# disruption = low + +{{{ ansible_pam_faillock_enable() }}} diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/bash/shared.sh b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/bash/shared.sh new file mode 100644 index 00000000000..ac92bd5be1e --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/bash/shared.sh @@ -0,0 +1,7 @@ +# platform = multi_platform_all +# reboot = false +# strategy = enable +# complexity = low +# disruption = low + +{{{ bash_pam_faillock_enable() }}} diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/oval/shared.xml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/oval/shared.xml new file mode 100644 index 00000000000..f9f12949170 --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/oval/shared.xml @@ -0,0 +1,79 @@ + + + {{{ oval_metadata( + "Configure the use of the pam_faillock.so module in the /etc/pam.d/system-auth file.") + }}} + + + + + + + + + + ^[\s]*auth[\s]+(required|\[(?=.*?\bsuccess=ok\b)(?=.*?\bnew_authtok_reqd=ok\b)(?=.*?\bignore=ignore\b)(?=.*?\bdefault=bad\b).*\])[\s]+pam_faillock\.so[\s\w\d=]+preauth[\s\S]*^[\s]*auth[\s]+(sufficient|\[(?=.*\bsuccess=done\b)(?=.*?\bnew_authtok_reqd=done\b)(?=.*?\bdefault=ignore\b).*\])[\s]+pam_unix\.so[\s\S]*^[\s]*auth[\s]+(required|\[(?=.*?\bsuccess=ok\b)(?=.*?\bnew_authtok_reqd=ok\b)(?=.*?\bignore=ignore\b)(?=.*?\bdefault=bad\b).*\])[\s]+pam_faillock\.so[\s\w\d=]+authfail + + + ^[\s]*account[\s]+(required|\[(?=.*?\bsuccess=ok\b)(?=.*?\bnew_authtok_reqd=ok\b)(?=.*?\bignore=ignore\b)(?=.*?\bdefault=bad\b).*\])[\s]+pam_faillock\.so[\s\S]*^[\s]*account[\s]+(required|\[(?=.*?\bsuccess=ok\b)(?=.*?\bnew_authtok_reqd=ok\b)(?=.*?\bignore=ignore\b)(?=.*?\bdefault=bad\b).*\])[\s]+pam_unix\.so + + + + + + + + + ^/etc/pam.d/system-auth$ + ^[\s]*auth\N+pam_unix\.so + 1 + + + + + + + + + ^/etc/pam.d/system-auth$ + + 1 + + + + + + + + ^/etc/pam.d/system-auth$ + + 1 + + diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/rule.yml index 1c48f48e3ef..a42e7350bdd 100644 --- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/rule.yml +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/rule.yml @@ -20,6 +20,7 @@ references: disa: CCI-000044 nist: AC-7 (a) srg: SRG-OS-000021-GPOS-00005 + stigid@ol8: OL08-00-020025 stigid@rhel8: RHEL-08-020025 stigid@rhel9: RHEL-09-611030 diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/tests/correct_value.pass.sh b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/tests/correct_value.pass.sh new file mode 100644 index 00000000000..98fab185853 --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/tests/correct_value.pass.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# packages = authselect,pam +# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9 + +authselect create-profile test_profile -b sssd +authselect select "custom/test_profile" --force + +authselect enable-feature with-faillock + +authselect apply-changes diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/tests/no_value.fail.sh b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/tests/no_value.fail.sh new file mode 100644 index 00000000000..ce36c2d2214 --- /dev/null +++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/account_password_pam_faillock_system_auth/tests/no_value.fail.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# packages = authselect,pam +# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9 + +authselect create-profile test_profile -b sssd +authselect select "custom/test_profile" --force + +authselect disable-feature with-faillock + +authselect apply-changes diff --git a/products/ol8/profiles/stig.profile b/products/ol8/profiles/stig.profile index 82d89ad3b8d..ca0a603607f 100644 --- a/products/ol8/profiles/stig.profile +++ b/products/ol8/profiles/stig.profile @@ -489,7 +489,7 @@ selections: # OL08-00-020000 - account_temp_expire_date - # OL08-00-020010, OL08-00-020011, OL08-00-020025, OL08-00-020026 + # OL08-00-020010, OL08-00-020011 - accounts_passwords_pam_faillock_deny # OL08-00-020012, OL08-00-020013 @@ -514,6 +514,12 @@ selections: # OL08-00-020024 - accounts_max_concurrent_login_sessions + # OL08-00-020025 + - account_password_pam_faillock_system_auth + + # OL08-00-020026 + - account_password_pam_faillock_password_auth + # OL08-00-020027, OL08-00-020028 - account_password_selinux_faillock_dir