Skip to content

Commit be8fccb

Browse files
committed
Disables password expiration and inactivity policies
This was causing the kayobe and kolla service accounts to be locked out of the system.
1 parent 821fcd8 commit be8fccb

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

etc/kayobe/ansible/cis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@
1818
state: absent
1919
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8'
2020

21+
- name: Ensure service accounts have no expiry options set
22+
# This is to workaround an issue where we set the expiry to 365 days on kayobe
23+
# service accounts in a previous iteration of the CIS benchmark hardening
24+
# defaults. This should restore the defaults and can eventually be removed.
25+
command: chage -m 0 -M 99999 -W 7 -I -1 {{ item }}
26+
become: true
27+
changed_when: false
28+
with_items:
29+
- "{{ kayobe_ansible_user }}"
30+
- "{{ kolla_ansible_user }}"
31+
2132
- include_role:
2233
name: ansible-lockdown.rhel8_cis
2334
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8'

etc/kayobe/inventory/group_vars/overcloud/cis

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ rhel9cis_max_log_file_size: 1024
7575
# `rhel9cis_bootloader_password_hash`
7676
rhel9cis_set_boot_pass: false
7777

78+
# NOTICE: rule disabled otherwise rule will prevent access to accounts
79+
# as it will expire passwords older than one year.
80+
rhel9cis_rule_5_6_1_1: false
81+
7882
##############################################################################
7983
# Ubuntu Jammy CIS Hardening Configuration
8084

@@ -159,4 +163,20 @@ ubtu22cis_max_log_file_size: 1024
159163
# ubtu22cis_bootloader_password_hash
160164
ubtu22cis_rule_1_4_1: false
161165
ubtu22cis_rule_1_4_3: false
166+
167+
# Disable: Ensure minimum days between password changes is configured
168+
ubtu22cis_rule_5_5_1_1: false
169+
170+
# Disable: Ensure password expiration is 365 days or less
171+
ubtu22cis_rule_5_5_1_2: false
172+
173+
# Disable: Ensure password expiration warning days is 7 or more
174+
ubtu22cis_rule_5_5_1_3: false
175+
176+
# Disable: Ensure inactive password lock is 30 days or less
177+
ubtu22cis_rule_5_5_1_4: false
178+
179+
# Disable: Ensure all users last password change date is in the past
180+
ubtu22cis_rule_5_5_1_5: false
181+
162182
##############################################################################
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
critical:
3+
- |
4+
Disables password expiration and inactivity policies. This caused the kayobe
5+
and kolla service accounts to be locked out of the system. You should re-apply
6+
the CIS benchmark hardening playbook as soon as possible to avoid being locked
7+
out of your system.

0 commit comments

Comments
 (0)