8
8
[[auditing-settings-description]]
9
9
You can use <<enable-audit-logging,audit logging>> to record security-related
10
10
events, 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
+ --
12
20
13
21
If configured, auditing settings must be set on every node in the cluster.
14
22
Static settings, such as `xpack.security.audit.enabled`, must be configured in
@@ -40,29 +48,38 @@ by using the following settings:
40
48
// tag::xpack-sa-lf-events-include-tag[]
41
49
`xpack.security.audit.logfile.events.include`::
42
50
(<<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:
44
55
`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`.
46
58
// end::xpack-sa-lf-events-include-tag[]
47
59
48
60
[[xpack-sa-lf-events-exclude]]
49
61
// tag::xpack-sa-lf-events-exclude-tag[]
50
62
`xpack.security.audit.logfile.events.exclude`::
51
63
(<<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.
54
67
// end::xpack-sa-lf-events-exclude-tag[]
55
68
56
69
[[xpack-sa-lf-events-emit-request]]
57
70
// tag::xpack-sa-lf-events-emit-request-tag[]
58
71
`xpack.security.audit.logfile.events.emit_request_body`::
59
72
(<<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.
62
78
+
63
79
--
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.
66
83
--
67
84
68
85
// end::xpack-sa-lf-events-emit-request-tag[]
@@ -99,8 +116,6 @@ The default value is `false`.
99
116
`xpack.security.audit.logfile.emit_node_id`::
100
117
(<<dynamic-cluster-setting,Dynamic>>)
101
118
Specifies 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.
104
119
Unlike <<node-name,node name>>, whose value might change if the administrator
105
120
changes the setting in the config file, the node id will persist across cluster
106
121
restarts and the administrator cannot change it.
@@ -110,11 +125,13 @@ The default value is `true`.
110
125
[[audit-event-ignore-policies]]
111
126
==== Audit Logfile Event Ignore Policies
112
127
113
- These settings affect the <<audit-log-ignore-policy,ignore policies>>
128
+ The following settings affect the <<audit-log-ignore-policy,ignore policies>>
114
129
that enable fine-grained control over which audit events are printed to the log file.
115
130
All 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.
118
135
119
136
[[xpack-sa-lf-events-ignore-users]]
120
137
// tag::xpack-sa-lf-events-ignore-users-tag[]
0 commit comments