@@ -47,9 +47,11 @@ For information on how to configure `xpack.security.audit.appender`, refer to
4747
4848Refer to the table of events that can be logged for auditing purposes.
4949
50- Each event is broken down into ` category`, ` type`, ` action` and ` outcome` fields
50+ Each event is broken down into <<field-event- category, category>>, <<field-event- type, type>>, <<field-event- action, action>> and <<field-event- outcome, outcome>> fields
5151to make it easy to filter, query and aggregate the resulting logs.
5252
53+ Refer to <<xpack-security-ecs-audit-schema>> for a table of fields that get logged with audit event.
54+
5355[NOTE]
5456============================================================================
5557To ensure that a record of every operation is persisted even in case of an
@@ -230,3 +232,188 @@ Refer to the corresponding {es} logs for potential write errors.
230232| `http_request`
231233| `unknown` | User is making an HTTP request.
232234|======
235+
236+
237+ [[xpack-security-ecs-audit-schema]]
238+ ==== ECS audit schema
239+
240+ Audit logs are written in JSON using https://www.elastic.co/guide/en/ecs/1.6/index.html[Elastic Common Schema (ECS)] specification.
241+
242+ [cols="2*<"]
243+ |======
244+
245+ 2+a| ===== Base Fields
246+
247+ | *Field*
248+ | *Description*
249+
250+ | `@timestamp`
251+ | Time when the event was generated.
252+
253+ Example: `2016-05-23T08:05:34.853Z`
254+
255+ | `message`
256+ | Human readable description of the event.
257+
258+ 2+a| ===== Event Fields
259+
260+ | *Field*
261+ | *Description*
262+
263+ | [[field-event-action]] `event.action`
264+ | The action captured by the event.
265+
266+ Refer to <<xpack-security-ecs-audit-logging>> for a table of possible actions.
267+
268+ | [[field-event-category]] `event.category`
269+ | High level category associated with the event.
270+
271+ This field is closely related to `event.type`, which is used as a subcategory.
272+
273+ Possible values:
274+ `database`,
275+ `web`,
276+ `authentication`
277+
278+ | [[field-event-type]] `event.type`
279+ | Subcategory associated with the event.
280+
281+ This field can be used along with the `event.category` field to enable filtering events down to a level appropriate for single visualization.
282+
283+ Possible values:
284+ `creation`,
285+ `access`,
286+ `change`,
287+ `deletion`
288+
289+ | [[field-event-outcome]] `event.outcome`
290+ | Denotes whether the event represents a success or failure.
291+
292+ Possible values:
293+ `success`,
294+ `failure`,
295+ `unknown`
296+
297+ 2+a| ===== User Fields
298+
299+ | *Field*
300+ | *Description*
301+
302+ | `user.name`
303+ | Login name of the user.
304+
305+ Example: `jdoe`
306+
307+ | `user.roles[]`
308+ | Set of user roles at the time of the event.
309+
310+ Example: `[kibana_admin, reporting_user]`
311+
312+ 2+a| ===== Kibana Fields
313+
314+ | *Field*
315+ | *Description*
316+
317+ | `kibana.space_id`
318+ | ID of the space associated with the event.
319+
320+ Example: `default`
321+
322+ | `kibana.session_id`
323+ | ID of the user session associated with the event.
324+
325+ Each login attempt results in a unique session id.
326+
327+ | `kibana.saved_object.type`
328+ | Type of saved object associated with the event.
329+
330+ Example: `dashboard`
331+
332+ | `kibana.saved_object.id`
333+ | ID of the saved object associated with the event.
334+
335+ | `kibana.authentication_provider`
336+ | Name of the authentication provider associated with the event.
337+
338+ Example: `my-saml-provider`
339+
340+ | `kibana.authentication_type`
341+ | Type of the authentication provider associated with the event.
342+
343+ Example: `saml`
344+
345+ | `kibana.authentication_realm`
346+ | Name of the Elasticsearch realm that has authenticated the user.
347+
348+ Example: `native`
349+
350+ | `kibana.lookup_realm`
351+ | Name of the Elasticsearch realm where the user details were retrieved from.
352+
353+ Example: `native`
354+
355+ | `kibana.add_to_spaces[]`
356+ | Set of space IDs that a saved object is being shared to as part of the event.
357+
358+ Example: `[default, marketing]`
359+
360+ | `kibana.delete_from_spaces[]`
361+ | Set of space IDs that a saved object is being removed from as part of the event.
362+
363+ Example: `[marketing]`
364+
365+ 2+a| ===== Error Fields
366+
367+ | *Field*
368+ | *Description*
369+
370+ | `error.code`
371+ | Error code describing the error.
372+
373+ | `error.message`
374+ | Error message.
375+
376+ 2+a| ===== HTTP and URL Fields
377+
378+ | *Field*
379+ | *Description*
380+
381+ | `http.request.method`
382+ | HTTP request method.
383+
384+ Example: `get`, `post`, `put`, `delete`
385+
386+ | `url.domain`
387+ | Domain of the url.
388+
389+ Example: `www.elastic.co`
390+
391+ | `url.path`
392+ | Path of the request.
393+
394+ Example: `/search`
395+
396+ | `url.port`
397+ | Port of the request.
398+
399+ Example: `443`
400+
401+ | `url.query`
402+ | The query field describes the query string of the request.
403+
404+ Example: `q=elasticsearch`
405+
406+ | `url.scheme`
407+ | Scheme of the request.
408+
409+ Example: `https`
410+
411+ 2+a| ===== Tracing Fields
412+
413+ | *Field*
414+ | *Description*
415+
416+ | `trace.id`
417+ | Unique identifier allowing events of the same transaction from {kib} and {es} to be be correlated.
418+
419+ |======
0 commit comments