| 1 | <?xml version="1.0"?> |
| 2 | <oval-def:oval_definitions xmlns:ind="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:linux="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:unix="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd"> |
| 3 | <oval-def:generator> |
| 4 | <oval:product_name>combine_ovals.py from SCAP Security Guide</oval:product_name> |
| 5 | <oval:product_version>ssg: [0, 1, 58], python: 3.9.6</oval:product_version> |
| 6 | <oval:schema_version>5.11</oval:schema_version> |
| 7 | <oval:timestamp>2021-09-17T07:13:13</oval:timestamp> |
| 8 | </oval-def:generator> |
| 9 | <oval-def:definitions> |
| 10 | <oval-def:definition class="compliance" id="oval:ssg-accounts_passwords_pam_faillock_unlock_time:def:1" version="2"> |
| 11 | <oval-def:metadata> |
| 12 | <oval-def:title>Set Lockout Time for Failed Password Attempts</oval-def:title> |
| 13 | <oval-def:affected family="unix"> |
| 14 | <oval-def:platform>Fedora</oval-def:platform> |
| 15 | </oval-def:affected> |
| 16 | <oval-def:description>The unlock time after number of failed logins should be set correctly.</oval-def:description> |
| 17 | <oval-def:reference ref_id="accounts_passwords_pam_faillock_unlock_time" source="ssg"/> |
| 18 | </oval-def:metadata> |
| 19 | <oval-def:criteria operator="OR"> |
| 20 | <oval-def:criteria comment="When ext var unlock_time is zero, all configs must be zero or never"> |
| 21 | <oval-def:criterion comment="Is ext var unlock time zero?" test_ref="oval:ssg-test_var_faillock_unlock_time_is_never:tst:1"/> |
| 22 | <oval-def:criterion comment="Test if config is zero or never" test_ref="oval:ssg-test_accounts_passwords_pam_faillock_unlock_time_is_never:tst:1"/> |
| 23 | </oval-def:criteria> |
| 24 | <oval-def:criteria comment="When ext var unlock_time is not zero, configs should be zero or never, or greater than or equal the external variable"> |
| 25 | <oval-def:criterion comment="Is ext var unlock time different than zero?" test_ref="oval:ssg-test_var_faillock_unlock_time_is_never:tst:1" negate="true"/> |
| 26 | <oval-def:criterion comment="Test if config is greater than or equals the ext var unlock time" test_ref="oval:ssg-test_accounts_passwords_pam_faillock_unlock_time_greater_or_equal_ext_var:tst:1"/> |
| 27 | </oval-def:criteria> |
| 28 | </oval-def:criteria> |
| 29 | </oval-def:definition> |
| 30 | </oval-def:definitions> |
| 31 | <oval-def:tests> |
| 32 | <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="Check if unlock time is never, or greater than or equal external variable" id="oval:ssg-test_accounts_passwords_pam_faillock_unlock_time_greater_or_equal_ext_var:tst:1" state_operator="OR" version="3"> |
| 33 | <ind:object object_ref="oval:ssg-object_accounts_passwords_pam_faillock_unlock_time:obj:1"/> |
| 34 | <ind:state state_ref="oval:ssg-state_accounts_passwords_pam_unlock_time_greater_or_equal_than_ext_var:ste:1"/> |
| 35 | <ind:state state_ref="oval:ssg-state_accounts_passwords_pam_unlock_time_is_never:ste:1"/> |
| 36 | </ind:textfilecontent54_test> |
| 37 | <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="Check if unlock time is never" id="oval:ssg-test_accounts_passwords_pam_faillock_unlock_time_is_never:tst:1" version="3"> |
| 38 | <ind:object object_ref="oval:ssg-object_accounts_passwords_pam_faillock_unlock_time:obj:1"/> |
| 39 | <ind:state state_ref="oval:ssg-state_accounts_passwords_pam_unlock_time_is_never:ste:1"/> |
| 40 | </ind:textfilecontent54_test> |
| 41 | <ind:variable_test id="oval:ssg-test_var_faillock_unlock_time_is_never:tst:1" version="1" check="all" comment="Check if external variable unlock time is never"> |
| 42 | <ind:object object_ref="oval:ssg-object_var_faillock_unlock_time:obj:1"/> |
| 43 | <ind:state state_ref="oval:ssg-state_var_faillock_unlock_time_is_never:ste:1"/> |
| 44 | </ind:variable_test> |
| 45 | </oval-def:tests> |
| 46 | <oval-def:objects> |
| 47 | <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_unlock_time:obj:1" version="2"> |
| 48 | <oval-def:set> |
| 49 | <oval-def:object_reference>oval:ssg-object_accounts_passwords_pam_faillock_unlock_time_system-auth:obj:1</oval-def:object_reference> |
| 50 | <oval-def:object_reference>oval:ssg-object_accounts_passwords_pam_faillock_unlock_time_password-auth:obj:1</oval-def:object_reference> |
| 51 | </oval-def:set> |
| 52 | </ind:textfilecontent54_object> |
| 53 | <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_unlock_time_system-auth:obj:1" version="2"> |
| 54 | <oval-def:set> |
| 55 | <oval-def:object_reference>oval:ssg-object_accounts_passwords_pam_faillock_preauth_unlock_time_system-auth:obj:1</oval-def:object_reference> |
| 56 | <oval-def:object_reference>oval:ssg-object_accounts_passwords_pam_faillock_authfail_unlock_time_system-auth:obj:1</oval-def:object_reference> |
| 57 | </oval-def:set> |
| 58 | </ind:textfilecontent54_object> |
| 59 | <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_unlock_time_password-auth:obj:1" version="2"> |
| 60 | <oval-def:set> |
| 61 | <oval-def:object_reference>oval:ssg-object_accounts_passwords_pam_faillock_preauth_unlock_time_password-auth:obj:1</oval-def:object_reference> |
| 62 | <oval-def:object_reference>oval:ssg-object_accounts_passwords_pam_faillock_authfail_unlock_time_password-auth:obj:1</oval-def:object_reference> |
| 63 | </oval-def:set> |
| 64 | </ind:textfilecontent54_object> |
| 65 | <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_preauth_unlock_time_system-auth:obj:1" version="2"> |
| 66 | <ind:filepath>/etc/pam.d/system-auth</ind:filepath> |
| 67 | <ind:pattern operation="pattern match">^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*unlock_time=(\w*).*$</ind:pattern> |
| 68 | <ind:instance datatype="int" operation="greater than or equal">1</ind:instance> |
| 69 | </ind:textfilecontent54_object> |
| 70 | <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_authfail_unlock_time_system-auth:obj:1" version="2"> |
| 71 | <ind:filepath>/etc/pam.d/system-auth</ind:filepath> |
| 72 | <ind:pattern operation="pattern match">^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*unlock_time=(\w*).*$</ind:pattern> |
| 73 | <ind:instance datatype="int" operation="greater than or equal">1</ind:instance> |
| 74 | </ind:textfilecontent54_object> |
| 75 | <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_authfail_unlock_time_password-auth:obj:1" version="2"> |
| 76 | <ind:filepath>/tmp/test_variable_conversion.txt</ind:filepath> |
| 77 | <ind:pattern operation="pattern match">^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*unlock_time=(\w*).*$</ind:pattern> |
| 78 | <ind:instance datatype="int" operation="greater than or equal">1</ind:instance> |
| 79 | </ind:textfilecontent54_object> |
| 80 | <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_preauth_unlock_time_password-auth:obj:1" version="2"> |
| 81 | <ind:filepath>/tmp/test_variable_conversion.txt</ind:filepath> |
| 82 | <ind:pattern operation="pattern match">^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*unlock_time=(\w*).*$</ind:pattern> |
| 83 | <ind:instance datatype="int" operation="greater than or equal">1</ind:instance> |
| 84 | </ind:textfilecontent54_object> |
| 85 | <ind:variable_object id="oval:ssg-object_var_faillock_unlock_time:obj:1" version="1"> |
| 86 | <ind:var_ref>oval:ssg-var_accounts_passwords_pam_faillock_unlock_time:var:1</ind:var_ref> |
| 87 | </ind:variable_object> |
| 88 | </oval-def:objects> |
| 89 | <oval-def:states> |
| 90 | <ind:textfilecontent54_state id="oval:ssg-state_accounts_passwords_pam_unlock_time_greater_or_equal_than_ext_var:ste:1" version="2"> |
| 91 | <ind:subexpression datatype="int" operation="greater than or equal" var_ref="oval:ssg-var_accounts_passwords_pam_faillock_unlock_time:var:1"/> |
| 92 | </ind:textfilecontent54_state> |
| 93 | <ind:textfilecontent54_state id="oval:ssg-state_accounts_passwords_pam_unlock_time_is_never:ste:1" version="1"> |
| 94 | <ind:subexpression datatype="string" operation="pattern match">^0$|^never$</ind:subexpression> |
| 95 | </ind:textfilecontent54_state> |
| 96 | <ind:variable_state id="oval:ssg-state_var_faillock_unlock_time_is_never:ste:1" version="1"> |
| 97 | <ind:value datatype="int" operation="equals">0</ind:value> |
| 98 | </ind:variable_state> |
| 99 | </oval-def:states> |
| 100 | <oval-def:variables> |
| 101 | <oval-def:constant_variable comment="lockout time for failed password attempts" datatype="int" id="oval:ssg-var_accounts_passwords_pam_faillock_unlock_time:var:1" version="2"> |
| 102 | <oval-def:value>0</oval-def:value> |
| 103 | </oval-def:constant_variable> |
| 104 | </oval-def:variables> |
| 105 | </oval-def:oval_definitions> |