Audit events can be forwarded from DAP directly into Splunk. Splunk can read the event and parse out every field. This makes searching DAP logs in Splunk easy and also makes it simple to set up alerts on specific events that happen inside DAP. For example, an alert can be sent to the security team if a user repeatedly tries to fetch a secret for which they don't have access. Forwarding DAP audit logs to Splunk is a powerful way to inspect, detect, and act on DAP events.
Splunk Cloud was used for this guide, but the same steps work for any recent version of Splunk.
1. Mount the audit messages file
Audit messages in JSON are written to the file
/var/log/conjur/audit.json inside the DAP appliance.
This file has a newline separating each audit event. To make this file available for
forwarding, its directory must be mounted to the host running in the DAP container.
After initializing the Docker container, you should see the file
/var/log/conjur/audit.json on the
host that is running the DAP appliance.
2. Point a universal forwarder to the file
Follow this guide to install and configure a universal forwarder on the DAP master. Configuration management or a separate linked container can be used to automate this step.
3. Configure forwarding in the Splunk UI
Once the forwarder is set up the remaining configuration can be done in the Splunk UI.
Settings > Add Datafrom the top menubar and select
If the forwarder is configured and running, you will see a host in the list on the following page. Choose this host and add it to a server class ('conjur' is a good class name).
On the next screen, select
Files and Directoriesin the sidebar and set Splunk to follow the file
Since the file is in JSON format, choose
_jsonas the source type on the next screen. Choose the index you want to use.
Finally, review settings and submit changes.
In a short time you will see DAP audit events in your Splunk search dashboard.