SV-257520r960891_rule
V-257520
SRG-APP-000095-CTR-000170
CNTR-OS-000180
CAT II
10
Apply the machine config setting auditd to active and enabled by executing the following:
for mcpool in $(oc get mcp -oname | sed "s:.*/::" ); do
echo "apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
name: 80-auditd-service-enable-$mcpool
labels:
machineconfiguration.openshift.io/role: $mcpool
spec:
config:
ignition:
version: 3.1.0
systemd:
units:
- name: auditd.service
enabled: true
" | oc apply -f -
done
Verify the audit service is enabled and active by executing the following:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; systemctl is-enabled auditd.service; systemctl is-active auditd.service' 2>/dev/null; done
If the auditd service is not "enabled" and "active" this is a finding.
V-257520
False
CNTR-OS-000180
Verify the audit service is enabled and active by executing the following:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; systemctl is-enabled auditd.service; systemctl is-active auditd.service' 2>/dev/null; done
If the auditd service is not "enabled" and "active" this is a finding.
M
5547