Ensure that Audit Log Forwarding Is Enabled
An XCCDF Rule
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
ClusterLogForwardersresource. The forementioned resource can be configured to logs to different third party systems. For more information on this, please reference the official documentation: https://docs.openshift.com/container-platform/4.6/logging/cluster-logging-external.html
warning alert: Warning
This rule's check operates on the cluster configuration dump.
Therefore, you need to use a tool that can query the OCP API, retrieve the
/apis/logging.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders/instance
API endpoint to the local /apis/logging.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders/instance
file. true
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.
- ID
- xccdf_org.ssgproject.content_rule_audit_log_forwarding_enabled
- Severity
- Medium
- References
- Updated