Skip to content

Commit c89db39

Browse files
committed
DLPX-86530 CIS: delphix user lockout after failed login attempts
PR URL: https://www.github.com/delphix/delphix-platform/pull/522
1 parent 7fcc2e7 commit c89db39

File tree

2 files changed

+38
-3
lines changed
  • .github/workflows
  • files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks

2 files changed

+38
-3
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v2
2424
- uses: actions/setup-python@v1
2525
with:
26-
python-version: '3.8'
26+
python-version: '3.9.21'
2727
- run: python3 -m pip install pylint
2828
- run: python3 -m pip install netifaces
2929
- run: pylint -d invalid-name,E0611 files/common/usr/bin/delphix-startup-screen
@@ -33,7 +33,7 @@ jobs:
3333
- uses: actions/checkout@v2
3434
- uses: actions/setup-python@v1
3535
with:
36-
python-version: '3.8'
36+
python-version: '3.9.21'
3737
- run: python3 -m pip install yapf
3838
- run: yapf --diff --style google files/common/usr/bin/delphix-startup-screen
3939
check-mypy:
@@ -42,6 +42,6 @@ jobs:
4242
- uses: actions/checkout@v2
4343
- uses: actions/setup-python@v1
4444
with:
45-
python-version: '3.8'
45+
python-version: '3.9.21'
4646
- run: python3 -m pip install mypy
4747
- run: mypy --ignore-missing-imports files/common/usr/bin/delphix-startup-screen

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,41 @@
336336
regexp: '^#?[\s]*(auth[\s]+required[\s]+pam_wheel\.so.*)$'
337337
replace: '\1'
338338

339+
#
340+
#
341+
# Lock out the user after an unsuccessful consecutive login attempts.
342+
#
343+
- lineinfile:
344+
path: /etc/pam.d/common-auth
345+
line: "{{ item }}"
346+
insertbefore: '^auth\s+\[success=1\s+default=ignore\]\s+pam_unix\.so\s+nullok\s+try_first_pass'
347+
with_items:
348+
- 'auth required pam_tally2.so audit deny=5 unlock_time=60'
349+
350+
#
351+
#
352+
# Configuration to enforce account lockout policies.
353+
#
354+
- lineinfile:
355+
path: /etc/pam.d/common-account
356+
line: "{{ item }}"
357+
insertafter: EOF
358+
with_items:
359+
- 'account required pam_tally2.so'
360+
361+
362+
#
363+
#
364+
# Configuration to remember user password history.
365+
#
366+
- lineinfile:
367+
path: /etc/pam.d/common-password
368+
line: "{{ item }}"
369+
insertbefore: '^password\s+\[success=1 default=ignore\]\s+pam_unix\.so\s+obscure\s+sha512'
370+
with_items:
371+
- 'password required pam_pwhistory.so remember=5'
372+
373+
339374
#
340375
# Enable SNMP client tools to load MIBs by default.
341376
#

0 commit comments

Comments
 (0)