API Audit Logging

Audit middleware supports delivery of CADF audit events via Oslo messaging notifier capability. Based on notification_driver configuration, audit events can be routed to messaging infrastructure (notification_driver = messagingv2) or can be routed to a log file ([oslo_messaging_notifications]/driver = log).

Audit middleware creates two events per REST API interaction. First event has information extracted from request data and the second one has request outcome (response).

Enabling API Audit Logging

Audit middleware is available as part of keystonemiddleware (>= 1.6) library. For information regarding how audit middleware functions refer here.

Auditing can be enabled for the Bare Metal service by making the following changes to /etc/ironic/ironic.conf.

  1. To enable audit logging of API requests:

  2. To customize auditing API requests, the audit middleware requires the audit_map_file setting to be defined. Update the value of configuration setting ‘audit_map_file’ to set its location. Audit map file configuration options for the Bare Metal service are included in the etc/ironic/ironic_api_audit_map.conf.sample file. To understand CADF format specified in ironic_api_audit_map.conf file refer to CADF Format.:

  3. Comma separated list of Ironic REST API HTTP methods to be ignored during audit. It is used only when API audit is enabled. For example:


Sample Audit Event

Following is the sample of audit event for ironic node list request.

   "timestamp":"2016-06-15 06:04:30.904397",