1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
title: Ensure that Audit Log Forwarding Is Enabled
description: |-
OpenShift audit works at the API server level, logging all requests coming to the server.
Audit is on by default and the best practice is to ship audit logs off the cluster for retention.
The cluster-logging-operator is able to do this with the <pre>ClusterLogForwarders</pre> resource.
The forementioned resource can be configured to log to different third party systems.
For more information on this, please reference the official documentation:
{{{ weblink(link="https://docs.openshift.com/container-platform/latest/observability/logging/logging-6.0/log6x-clf.html") }}}
rationale: |-
Retaining logs ensures the ability to go back in time to investigate or correlate any events.
Offloading audit logs from the cluster ensures that an attacker that has access to the cluster will not be able to
tamper with the logs because of the logs being stored off-site.
severity: medium
identifiers:
cce@ocp4: CCE-86265-6
references:
cis@ocp4: 1.2.21
nerc-cip: CIP-003-8 R5.2,CIP-004-6 R2.2.2,CIP-004-6 R2.2.3,CIP-004-6 R3.3,CIP-007-3 R.1.3,CIP-007-3 R5,CIP-007-3 R5.1.1,CIP-007-3 R5.2,CIP-007-3 R5.3.1,CIP-007-3 R5.3.2,CIP-007-3 R5.3.3,CIP-007-3 R6.5
nist: AC-2(12),AU-3(2),AU-5(1),AU-6,AU-6(1),AU-6(3),AU-9(2),SI-4(16),AU-4(1),AU-11,AU-7,AU-7(1),SI-4(20)
pcidss: Req-2.2,Req-10.5.3,Req-10.5.4
srg: SRG-APP-000092-CTR-000165,SRG-APP-000111-CTR-000220,SRG-APP-000358-CTR-000805
platform: not ocp4-on-hypershift and not ocp4-on-hypershift-hosted
ocil_clause: 'Logs are not forwarded outside the cluster'
ocil: |-
Run the following command:
<pre>oc get clusterlogforwarders -n openshift-logging -ojson | jq -r '.items[].spec.pipelines[].inputRefs | contains(["audit"])'</pre>
The output should return <pre>true</pre>.
warnings:
- general: |-
{{{ openshift_cluster_setting("/apis/observability.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders", true) | indent(4) }}}
template:
name: yamlfile_value
vars:
ocp_data: "true"
filepath: /apis/observability.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders
yamlpath: ".items[].spec.pipelines[:].inputRefs[:]"
entity_check: "at least one"
values:
- value: "audit"
entity_check: "at least one"
|