Configuring IBM Cloud Private to forward audit logs
You can enable audit logging for individual services to forward your audit logs to ELK or to SIEM.
For more information on generating audit logs, see Configuring IBM Cloud Private services to generate audit logs.
Enabling and disabling forwarding for audit logging
By default, forwarding is disabled. Each plug-in has a separate ConfigMap. See the following table for more information about audit logging ConfigMaps:
| ConfigMap | Description |
|---|---|
| audit-logging-fluentd-ds-config | This ConfigMap is the primary ConfigMap for audit logging. Source plug-ins and output plug-ins are imported to this ConfigMap. |
| audit-logging-fluentd-ds-source-config | Source plug-in ConfigMap |
| audit-logging-fluentd-ds-elk-config | ELK output plug-in ConfigMap |
| audit-logging-fluentd-ds-remote-syslog-config | IBM QRadar output plug-in ConfigMap |
| audit-logging-fluentd-ds-splunk-hec-config | Splunk output ConfigMap |
Enable and disable forwarding for audit logging from the management console with following steps:
-
Log in to your IBM® Cloud Private cluster.
-
From the navigation menu, click Configuration > ConfigMap.
-
Select the
audit-logging-fluentd-ds-configConfigMap. -
Click the Open and close options icon and click Edit.
-
Enable forwarding for audit logging by setting the
ENABLE_AUDIT_LOGGING_FORWARDINGparameter value totrue. -
Disable forwarding for audit logging by setting the
ENABLE_AUDIT_LOGGING_FORWARDINGparameter value tofalse. If you disable forwarding, ignore step 7. -
Forward your audit logs to ELK or SIEM.
Note: There is one input plug-in configuration file and multiple output plug-in configuration files in your ConfigMap. Be sure to use only one output plug-in at a time.
-
Edit the
audit-logging-fluentd-ds-configfile. Uncomment@include /fluentd/etc/elk.conffrom thefluent.confparameter to forward to ELK. You must keep other output plug-ins commented. Note: Ensure that the IBM Cloud Privateloggingservice is deployed. -
Edit the
audit-logging-fluentd-ds-configfile to forward audit logs to IBM QRadar with SIEM by uncommenting@include /fluentd/etc/remoteSyslog.conf. You must keep other output plug-ins commented.- Edit the
audit-logging-fluentd-ds-remote-syslog-configand add the following information for IBM QRadar with SIEM: IBM QRadar server host name, port number, and log identifier. For more information to update theaudit-logging-fluentd-dsandaudit-logging-fluentd-ds-remote-syslog-configfiles see Configuring IBM Cloud Private cluster to send audit logs over TLS to IBM QRadar.
- Edit the
-
Edit the
audit-logging-fluentd-ds-configfile to forward to Splunk by uncommenting@include /fluentd/etc/splunkHEC.conf. You must keep other output plug-ins commented.- Edit the
audit-logging-fluentd-ds-splunk-hec-configand add the following information for Splunk: Splunk server host name, port number, and HEC token. For more information to update theaudit-logging-fluentd-dsandaudit-logging-fluentd-ds-splunk-hec-configfiles, see Integrating IBM Cloud Private with Splunk.
- Edit the
-
-
Click Submit
-
Remove all pods of the
audit-logging-fluentd-dsDaemonset. Your pods are recreated automatically.-
Remove the pods from the management console:
- Log in to your IBM Cloud Private cluster.
- From the navigation menu, click Workload > Daemonsets.
- Locate and click the
audit-logging-fluentd-dsDaemonset. - From the Pods section, delete each pod by clicking the Options icon.
- Click Remove.
-
Remove the pods with the Kubernetes CLI by running the following command:
kubectl get pod -n kube-system -o wide | grep audit-logging-fluentd-ds- | awk '{print $1}' | xargs kubectl delete pod -n kube-system
-
Note:
Fluentd has an input plug-in that reads audit logs from journald. The plug-in is included in the audit-logging-fluentd-ds-source-config ConfigMap file.
The default path of journald is /run/log/journal. You can set a different path during cluster installation. For example, /var/log/journal. If you change the default journald path, you must update
the path in following files:
-
Update path in the
audit-logging-fluentd-ds-source-configconfigmap file.- From the navigation menu, click Configuration > ConfigMap.
- Select the
audit-logging-fluentd-ds-source-configconfigmap. - Click the Open and close options icon and click Edit.
- Ensure
pathvalue fortag icp-auditis thejournaldpath that you set during installation. For example,/var/log/journalor any other path that you set forjournald. - Click
Submit.
-
Update mounted path in
audit-logging-fluentd-dsDaemonSet.- From the navigation menu, click Workloads > DaemonSets.
- Select the
audit-logging-fluentd-dsDaemonSet. - Click the Open and close options icon and click Edit.
- Ensure
volumeMountsmountPath andvolumeshostPath forjournalare set to thejournaldpath that you set during installation. For example,/var/log/journalor any other path that you set forjournald. - Click
Submit.