audit-settings.asciidoc 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. [role="xpack"]
  2. [[auditing-settings]]
  3. === Auditing security settings
  4. ++++
  5. <titleabbrev>Auditing settings</titleabbrev>
  6. ++++
  7. You configure security auditing settings in the `elasticsearch.yml` configuration file
  8. on each node in the cluster. For more information, see <<enable-audit-logging>>.
  9. [[general-audit-settings]]
  10. ==== General Auditing Settings
  11. `xpack.security.audit.enabled`::
  12. Set to `true` to enable auditing on the node. The default value is `false`.
  13. This puts the auditing events in a dedicated file named `<clustername>_audit.json`
  14. on each node.
  15. [[event-audit-settings]]
  16. ==== Audited Event Settings
  17. The events and some other information about what gets logged can be controlled
  18. by using the following settings:
  19. `xpack.security.audit.logfile.events.include`::
  20. Specifies which events to include in the auditing output. The default value is:
  21. `access_denied, access_granted, anonymous_access_denied, authentication_failed,
  22. connection_denied, tampered_request, run_as_denied, run_as_granted`.
  23. `xpack.security.audit.logfile.events.exclude`::
  24. Excludes the specified events from the output. By default, no events are
  25. excluded.
  26. `xpack.security.audit.logfile.events.emit_request_body`::
  27. Specifies whether to include the request body from REST requests on certain
  28. event types such as `authentication_failed`. The default value is `false`.
  29. +
  30. --
  31. IMPORTANT: No filtering is performed when auditing, so sensitive data may be
  32. audited in plain text when including the request body in audit events.
  33. --
  34. [[node-audit-settings]]
  35. ==== Local Node Info Settings
  36. `xpack.security.audit.logfile.emit_node_name`::
  37. Specifies whether to include the <<node.name,node name>> as a field in
  38. each audit event. The default value is `false`.
  39. `xpack.security.audit.logfile.emit_node_host_address`::
  40. Specifies whether to include the node's IP address as a field in each audit event.
  41. The default value is `false`.
  42. `xpack.security.audit.logfile.emit_node_host_name`::
  43. Specifies whether to include the node's host name as a field in each audit event.
  44. The default value is `false`.
  45. `xpack.security.audit.logfile.emit_node_id`::
  46. Specifies whether to include the node id as a field in each audit event.
  47. This is available for the new format only. That is to say, this information
  48. does not exist in the `<clustername>_access.log` file.
  49. Unlike <<node.name,node name>>, whose value might change if the administrator
  50. changes the setting in the config file, the node id will persist across cluster
  51. restarts and the administrator cannot change it.
  52. The default value is `true`.
  53. [[audit-event-ignore-policies]]
  54. ==== Audit Logfile Event Ignore Policies
  55. These settings affect the <<audit-log-ignore-policy,ignore policies>>
  56. that enable fine-grained control over which audit events are printed to the log file.
  57. All of the settings with the same policy name combine to form a single policy.
  58. If an event matches all of the conditions for a specific policy, it is ignored
  59. and not printed.
  60. `xpack.security.audit.logfile.events.ignore_filters.<policy_name>.users`::
  61. A list of user names or wildcards. The specified policy will
  62. not print audit events for users matching these values.
  63. `xpack.security.audit.logfile.events.ignore_filters.<policy_name>.realms`::
  64. A list of authentication realm names or wildcards. The specified policy will
  65. not print audit events for users in these realms.
  66. `xpack.security.audit.logfile.events.ignore_filters.<policy_name>.roles`::
  67. A list of role names or wildcards. The specified policy will
  68. not print audit events for users that have these roles. If the user has several
  69. roles, some of which are *not* covered by the policy, the policy will
  70. *not* cover this event.
  71. `xpack.security.audit.logfile.events.ignore_filters.<policy_name>.indices`::
  72. A list of index names or wildcards. The specified policy will
  73. not print audit events when all the indices in the event match
  74. these values. If the event concerns several indices, some of which are
  75. *not* covered by the policy, the policy will *not* cover this event.