audit-settings.asciidoc 4.0 KB

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