88[[auditing-settings-description]]
99You can use <<enable-audit-logging,audit logging>> to record security-related
1010events, such as authentication failures, refused connections, and data-access
11- events.
11+ events. In addition, changes via the APIs to the security configuration, such
12+ as creating, updating and removing <<native-realm, native>> and
13+ <<built-in-users, built-in>> users, <<security-api-put-role, roles>>,
14+ <<security-api-put-role-mapping, role mappings>> and
15+ <<security-api-create-api-key, API keys>> are also recorded.
16+ --
17+ TIP: Audit logs are only available on certain subscription levels.
18+ For more information, see {subscriptions}.
19+ --
1220
1321If configured, auditing settings must be set on every node in the cluster.
1422Static settings, such as `xpack.security.audit.enabled`, must be configured in
@@ -40,29 +48,38 @@ by using the following settings:
4048// tag::xpack-sa-lf-events-include-tag[]
4149`xpack.security.audit.logfile.events.include`::
4250(<<dynamic-cluster-setting,Dynamic>>)
43- Specifies which events to include in the auditing output. The default value is:
51+ Specifies the <<audit-event-types, kind of events>> to print in the auditing output.
52+ In addition, `_all` can be used to exhaustively audit all the events, but this is usually
53+ discouraged since it will get very verbose.
54+ The default list value contains:
4455`access_denied, access_granted, anonymous_access_denied, authentication_failed,
45- connection_denied, tampered_request, run_as_denied, run_as_granted`.
56+ connection_denied, tampered_request, run_as_denied, run_as_granted,
57+ security_config_change`.
4658// end::xpack-sa-lf-events-include-tag[]
4759
4860[[xpack-sa-lf-events-exclude]]
4961// tag::xpack-sa-lf-events-exclude-tag[]
5062`xpack.security.audit.logfile.events.exclude`::
5163(<<dynamic-cluster-setting,Dynamic>>)
52- Excludes the specified events from the output. By default, no events are
53- excluded.
64+ Excludes the specified <<audit-event-types, kind of events>> from the include list.
65+ This is useful in the case where the `events.include` setting contains the special value `_all`.
66+ The default is the empty list.
5467// end::xpack-sa-lf-events-exclude-tag[]
5568
5669[[xpack-sa-lf-events-emit-request]]
5770// tag::xpack-sa-lf-events-emit-request-tag[]
5871`xpack.security.audit.logfile.events.emit_request_body`::
5972(<<dynamic-cluster-setting,Dynamic>>)
60- Specifies whether to include the request body from REST requests on certain
61- event types such as `authentication_failed`. The default value is `false`.
73+ Specifies whether to include the full request body from REST requests as an
74+ attribute of certain kinds of audit events. This setting can be used to
75+ <<auditing-search-queries, audit search queries>>.
76+ +
77+ The default value is `false`, so request bodies are not printed.
6278+
6379--
64- IMPORTANT: No filtering is performed when auditing, so sensitive data may be
65- audited in plain text when including the request body in audit events.
80+ IMPORTANT: Be advised that sensitive data may be audited in plain text when including
81+ the request body in audit events, even though all the security APIs, such as those that
82+ change the user's password, have the credentials filtered out when audited.
6683--
6784
6885// end::xpack-sa-lf-events-emit-request-tag[]
@@ -99,8 +116,6 @@ The default value is `false`.
99116`xpack.security.audit.logfile.emit_node_id`::
100117(<<dynamic-cluster-setting,Dynamic>>)
101118Specifies whether to include the node id as a field in each audit event.
102- This is available for the new format only. That is to say, this information
103- does not exist in the `<clustername>_access.log` file.
104119Unlike <<node-name,node name>>, whose value might change if the administrator
105120changes the setting in the config file, the node id will persist across cluster
106121restarts and the administrator cannot change it.
@@ -110,11 +125,13 @@ The default value is `true`.
110125[[audit-event-ignore-policies]]
111126==== Audit Logfile Event Ignore Policies
112127
113- These settings affect the <<audit-log-ignore-policy,ignore policies>>
128+ The following settings affect the <<audit-log-ignore-policy,ignore policies>>
114129that enable fine-grained control over which audit events are printed to the log file.
115130All of the settings with the same policy name combine to form a single policy.
116- If an event matches all of the conditions for a specific policy, it is ignored
117- and not printed.
131+ If an event matches all the conditions of any policy, it is ignored and not printed.
132+ Most audit events are subject to the ignore policies. The sole exception are
133+ events of the `security_config_change` type, which cannot be filtered out, unless
134+ <<xpack-sa-lf-events-exclude, excluded>> altogether.
118135
119136[[xpack-sa-lf-events-ignore-users]]
120137// tag::xpack-sa-lf-events-ignore-users-tag[]
0 commit comments