Skip to content

Commit 52303b5

Browse files
authored
add new state for benchmark minion (#624)
1 parent 0d750ae commit 52303b5

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Forbid any root SSH login
2+
PermitRootLogin no
3+
4+
# Only allow public key auth for all users
5+
PasswordAuthentication no
6+
KbdInteractiveAuthentication no
7+
ChallengeResponseAuthentication no
8+
PubkeyAuthentication yes
9+
10+
# Restrict who can SSH in - allow PSF users and system admins
11+
AllowGroups psf-users sudo admin
12+
13+
# Where to read user keys from
14+
AuthorizedKeysFile .ssh/authorized_keys
15+
16+
# Keep PAM enabled for account/session modules (e.g., limits)
17+
UsePAM yes

salt/benchmarks/init.sls

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/etc/ssh/sshd_config.d/99-hardening.conf:
2+
file.managed:
3+
- source: salt://benchmarks/configs/sshd-hardening.conf
4+
- user: root
5+
- group: root
6+
- mode: "0644"
7+
8+
ssh-reload-benchmarks:
9+
service.running:
10+
- name: ssh
11+
- reload: True
12+
- watch:
13+
- file: /etc/ssh/sshd_config.d/99-hardening.conf

salt/top.sls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ base:
3636
- pgbouncer
3737
- buildbot
3838

39+
'benchmarks':
40+
- match: nodegroup
41+
- benchmarks
42+
3943
'cdn-logs':
4044
- match: nodegroup
4145
- cdn-logs

0 commit comments

Comments
 (0)