SV-257519r960888_rule
V-257519
SRG-APP-000092-CTR-000165
CNTR-OS-000170
CAT I
10
Apply the machine config by executing the following:
for mcpool in $(oc get mcp -oname | sed "s:.*/::" ); do
echo "apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
name: 05-kernelarg-audit-enabled-$mcpool
labels:
machineconfiguration.openshift.io/role: $mcpool
spec:
config:
ignition:
version: 3.1.0
kernelArguments:
- audit=1
- audit_backlog_limit=8192
" | oc create -f -
done
Verify the RHCOS boot loader configuration has audit enabled, including backlog:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; grep audit /boot/loader/entries/*.conf || echo "not found"' 2>/dev/null; done
If "audit" is not set to "1" or returns "not found", this is a finding.
If "audit_backlog" is not set to 8192 or returns "not found", this is a finding.
V-257519
False
CNTR-OS-000170
Verify the RHCOS boot loader configuration has audit enabled, including backlog:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; grep audit /boot/loader/entries/*.conf || echo "not found"' 2>/dev/null; done
If "audit" is not set to "1" or returns "not found", this is a finding.
If "audit_backlog" is not set to 8192 or returns "not found", this is a finding.
M
5547