diff --git a/deploy-manage/monitor/logging-configuration/auditing-search-queries.md b/deploy-manage/monitor/logging-configuration/auditing-search-queries.md index f91abe8fb4..6c609be5b3 100644 --- a/deploy-manage/monitor/logging-configuration/auditing-search-queries.md +++ b/deploy-manage/monitor/logging-configuration/auditing-search-queries.md @@ -6,28 +6,39 @@ applies: ece: all eck: all stack: all + serverless: unavailable --- -# Auditing search queries [auditing-search-queries] +# Audit Elasticsearch search queries [auditing-search-queries] -There is no [audit event type](elasticsearch-audit-events.md) specifically dedicated to search queries. Search queries are analyzed and then processed; the processing triggers authorization actions that are audited. However, the original raw query, as submitted by the client, is not accessible downstream when authorization auditing occurs. +There is no [audit event type]() (asciidocalypse://elasticsearch/docs/reference/elasticsearch/elasticsearch-audit-events) specifically dedicated to search queries. Search queries are analyzed and then processed; the processing triggers authorization actions that are audited. However, the original raw query, as submitted by the client, is not accessible downstream when authorization auditing occurs. Search queries are contained inside HTTP request bodies, however, and some audit events that are generated by the REST layer, on the coordinating node, can be toggled to output the request body to the audit log. Therefore, one must audit request bodies in order to audit search queries. -To make certain audit events include the request body, edit the following setting in the `elasticsearch.yml` file: +To make certain audit events include the request body, configure the following setting in {{es}}: ```yaml xpack.security.audit.logfile.events.emit_request_body: true ``` +You can apply this setting through [cluster update settings API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html), as described in [](./configuring-audit-logs.md). Alternatively, you can modify `elasticsearch.yml` in all nodes and restart for the changes to take effect. + ::::{important} No filtering is performed when auditing, so sensitive data might be audited in plain text when audit events include the request body. Also, the request body can contain malicious content that can break a parser consuming the audit logs. :::: - The request body is printed as an escaped JSON string value (RFC 4627) to the `request.body` event attribute. -Not all events contain the `request.body` attribute, even when the above setting is toggled. The ones that do are: `authentication_success`, `authentication_failed`, `realm_authentication_failed`, `tampered_request`, `run_as_denied`, and `anonymous_access_denied`. The `request.body` attribute is printed on the coordinating node only (the node that handles the REST request). Most of these event types are [not included by default](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#xpack-sa-lf-events-include). +Not all events contain the `request.body` attribute, even when the above setting is toggled. The ones that do are: + +* `authentication_success` +* `authentication_failed` +* `realm_authentication_failed` +* `tampered_request` +* `run_as_denied` +* `anonymous_access_denied` + +The `request.body` attribute is printed on the coordinating node only (the node that handles the REST request). Most of these event types are [not included by default](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#xpack-sa-lf-events-include). A good practical piece of advice is to add `authentication_success` to the event types that are audited (add it to the list in the `xpack.security.audit.logfile.events.include`), as this event type is not audited by default. diff --git a/deploy-manage/monitor/logging-configuration/configuring-audit-logs.md b/deploy-manage/monitor/logging-configuration/configuring-audit-logs.md new file mode 100644 index 0000000000..03f84ee07b --- /dev/null +++ b/deploy-manage/monitor/logging-configuration/configuring-audit-logs.md @@ -0,0 +1,53 @@ +--- +applies: + hosted: all + ece: all + eck: all + stack: all + serverless: unavailable +--- + +# Configure audit logging [audit-logging-configuration] + +When auditing security events, a single client request might generate multiple audit events across multiple cluster nodes, potentially leading to a high volume of log data and I/O operations. To maintain clarity and ensure logs remain actionable, {{es}} and {{kib}} provide configuration mechanisms to control what events are logged and which can be ignored. + +### Elasticsearch auditing configuration + +{{es}} configuration options include: + + * [{{es}} audited events settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#event-audit-settings): Use include and exclude filters to control the types of events that get logged. + * [{{es}} node information settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#node-audit-settings): Control whether to add or hide node information such as hostname or IP address in the audited events. + * [{{es}} ignore policies settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#audit-event-ignore-policies): Use ignore policies for fine-grained control over which audit events are printed to the log file. + + ::::{tip} + In {{es}}, all auditing settings except `xpack.security.audit.enabled` are dynamic. This means you can configure them using the [cluster update settings API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html), allowing changes to take effect immediately without requiring a restart. This approach is faster and more convenient than modifying `elasticsearch.yml`. + :::: + +For a complete description of event details and format, refer to the following resources: + * [{{es}} audit events details and schema]() asciidocalypse://elasticsearch/docs/reference/elasticsearch/elasticsearch-audit-events + * [{{es}} log entry output format](/deploy-manage/monitor/logging-configuration/logfile-audit-output.md#audit-log-entry-format) + +### Kibana auditing configuration + +To control the logs that are outputted by Kibana, you can use [{{kib}} ignore filters](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#audit-logging-ignore-filters). These are a list of filters that determine which events should be excluded from the audit log. + +In self-managed systems, you can optionally configure audit logs location, and file/rolling file using [{{kib}} audit logging settings](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#audit-logging-settings). + + +::::{tip} +To configure {{kib}} settings, follow the same [procedure](./enabling-audit-logs.md#enable-audit-logging-procedure) as when enabling {{kib}} audit logs, but apply the relevant settings instead. +:::: + +For a complete description of auditing event details, such as `category`, `type`, or `action`, refer to [{{kib}} audit events](https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html#xpack-security-ecs-audit-logging). + +### General recommendations + +* Consider starting with {{es}} [`xpack.security.audit.logfile.events.include`](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#xpack-sa-lf-events-include) and [{{kib}} ignore filters](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#audit-logging-ignore-filters) settings to specify the type of events you want to include or exclude in the auditing output. + +* If you need a more granular control, refer to [{{es}} audit events ignore policies](./logfile-audit-events-ignore-policies.md) for a better understanding how ignore policies work and when they are beneficial. + +* Refer to [auditing search queries](./auditing-search-queries.md) for details on logging request bodies in the {{es}} audit logs. + + ::::{important} + Sensitive data may be audited in plain text when including the request body in audit events, even though all the security APIs, such as those that change the user’s password, have the credentials filtered out when audited. + :::: diff --git a/deploy-manage/monitor/logging-configuration/correlating-kibana-elasticsearch-audit-logs.md b/deploy-manage/monitor/logging-configuration/correlating-kibana-elasticsearch-audit-logs.md index fe36e8038d..25c0e2ca6d 100644 --- a/deploy-manage/monitor/logging-configuration/correlating-kibana-elasticsearch-audit-logs.md +++ b/deploy-manage/monitor/logging-configuration/correlating-kibana-elasticsearch-audit-logs.md @@ -1,4 +1,5 @@ --- +navigation_title: Correlate audit events mapped_pages: - https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html applies: @@ -6,372 +7,41 @@ applies: ece: all eck: all stack: all + serverless: unavailable --- -# Correlating Kibana and Elasticsearch audit logs [xpack-security-audit-logging] +# Correlating audit events [xpack-security-ecs-audit-correlation] -Audit logging is a [subscription feature](https://www.elastic.co/subscriptions) that you can enable to keep track of security-related events, such as authorization success and failures. Logging these events enables you to monitor {{kib}} for suspicious activity and provides evidence in the event of an attack. +When audit logs are enabled, a single request to {{kib}} or {{es}} generates multiple audit events in the logs. -Use the {{kib}} audit logs in conjunction with [{{es}} audit logging](enabling-elasticsearch-audit-logs.md) to get a holistic view of all security related events. {{kib}} defers to the {{es}} security model for authentication, data index authorization, and features that are driven by cluster-wide privileges. For more information on enabling audit logging in {{es}}, refer to [Auditing security events](https://www.elastic.co/guide/en/elasticsearch/reference/current/enable-audit-logging.html). +Audit events from {{kib}} can also be correlated with backend calls that produce {{es}} audit events, allowing for a more comprehensive view of user actions. -::::{note} -Audit logs are **disabled** by default. To enable this functionality, you must set `xpack.security.audit.enabled` to `true` in `kibana.yml`. - -You can optionally configure audit logs location, file/rolling file appenders and ignore filters using [Audit logging settings](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#audit-logging-settings). - -:::: - - -## Audit events [xpack-security-ecs-audit-logging] - -Refer to the table of events that can be logged for auditing purposes. +This section explains the key fields that help correlate these events, with examples to illustrate their relationships. -Each event is broken down into [category](enabling-kibana-audit-logs.md#field-event-category), [type](enabling-kibana-audit-logs.md#field-event-type), [action](enabling-kibana-audit-logs.md#field-event-action) and [outcome](enabling-kibana-audit-logs.md#field-event-outcome) fields to make it easy to filter, query and aggregate the resulting logs. The [trace.id](enabling-kibana-audit-logs.md#field-trace-id) field can be used to correlate multiple events that originate from the same request. +## `request.id` attribute in {{es}} audit events -Refer to [Audit schema](enabling-kibana-audit-logs.md#xpack-security-ecs-audit-schema) for a table of fields that get logged with audit event. - -::::{note} -To ensure that a record of every operation is persisted even in case of an unexpected error, asynchronous write operations are logged immediately after all authorization checks have passed, but before the response from {{es}} is received. Refer to the corresponding {{es}} logs for potential write errors. - -:::: +When an {{es}} request generates multiple audit events across multiple nodes, you can use the `request.id` attribute to correlate the associated events. +This identifier allows you to trace the flow of a request across the {{es}} cluster and reconstruct the full context of an operation. -| | -| --- | -| #### Category: authentication [_category_authentication]


| -| **Action** | **Outcome** | **Description** | -| `user_login` | `success` | User has logged in successfully. | -| `failure` | Failed login attempt (e.g. due to invalid credentials). | -| `user_logout` | `unknown` | User is logging out. | -| `session_cleanup` | `unknown` | Removing invalid or expired session. | -| `access_agreement_acknowledged` | n/a | User has acknowledged the access agreement. | -| #### Category: database [_category_database]

##### Type: creation [_type_creation]



| -| **Action** | **Outcome** | **Description** | -| `saved_object_create` | `unknown` | User is creating a saved object. | -| `failure` | User is not authorized to create a saved object. | -| `saved_object_open_point_in_time` | `unknown` | User is creating a Point In Time to use when querying saved objects. | -| `failure` | User is not authorized to create a Point In Time for the provided saved object types. | -| `connector_create` | `unknown` | User is creating a connector. | -| `failure` | User is not authorized to create a connector. | -| `rule_create` | `unknown` | User is creating a rule. | -| `failure` | User is not authorized to create a rule. | -| `ad_hoc_run_create` | `unknown` | User is creating an ad hoc run. | -| `failure` | User is not authorized to create an ad hoc run. | -| `space_create` | `unknown` | User is creating a space. | -| `failure` | User is not authorized to create a space. | -| `case_create` | `unknown` | User is creating a case. | -| `failure` | User is not authorized to create a case. | -| `case_configuration_create` | `unknown` | User is creating a case configuration. | -| `failure` | User is not authorized to create a case configuration. | -| `case_comment_create` | `unknown` | User is creating a case comment. | -| `failure` | User is not authorized to create a case comment. | -| `case_comment_bulk_create` | `unknown` | User is creating multiple case comments. | -| `failure` | User is not authorized to create multiple case comments. | -| `case_user_action_create_comment` | `success` | User has created a case comment. | -| `case_user_action_create_case` | `success` | User has created a case. | -| `ml_put_ad_job` | `success` | Creating anomaly detection job. | -| `failure` | Failed to create anomaly detection job. | -| `ml_put_ad_datafeed` | `success` | Creating anomaly detection datafeed. | -| `failure` | Failed to create anomaly detection datafeed. | -| `ml_put_calendar` | `success` | Creating calendar. | -| `failure` | Failed to create calendar. | -| `ml_post_calendar_events` | `success` | Adding events to calendar. | -| `failure` | Failed to add events to calendar. | -| `ml_forecast` | `success` | Creating anomaly detection forecast. | -| `failure` | Failed to create anomaly detection forecast. | -| `ml_put_filter` | `success` | Creating filter. | -| `failure` | Failed to create filter. | -| `ml_put_dfa_job` | `success` | Creating data frame analytics job. | -| `failure` | Failed to create data frame analytics job. | -| `ml_put_trained_model` | `success` | Creating trained model. | -| `failure` | Failed to create trained model. | -| `product_documentation_create` | `unknown` | User requested to install the product documentation for use in AI Assistants. | -| `knowledge_base_entry_create` | `success` | User has created knowledge base entry [id=x] | -| `failure` | Failed attempt to create a knowledge base entry | -| `knowledge_base_entry_update` | `success` | User has updated knowledge base entry [id=x] | -| `failure` | Failed attempt to update a knowledge base entry | -| `knowledge_base_entry_delete` | `success` | User has deleted knowledge base entry [id=x] | -| `failure` | Failed attempt to delete a knowledge base entry | -| ##### Type: change [_type_change]


| -| **Action** | **Outcome** | **Description** | -| `saved_object_update` | `unknown` | User is updating a saved object. | -| `failure` | User is not authorized to update a saved object. | -| `saved_object_update_objects_spaces` | `unknown` | User is adding and/or removing a saved object to/from other spaces. | -| `failure` | User is not authorized to add or remove a saved object to or from other spaces. | -| `saved_object_remove_references` | `unknown` | User is removing references to a saved object. | -| `failure` | User is not authorized to remove references to a saved object. | -| `saved_object_collect_multinamespace_references` | `success` | User has accessed references to a multi-space saved object. | -| `failure` | User is not authorized to access references to a multi-space saved object. | -| `connector_update` | `unknown` | User is updating a connector. | -| `failure` | User is not authorized to update a connector. | -| `rule_update` | `unknown` | User is updating a rule. | -| `failure` | User is not authorized to update a rule. | -| `rule_update_api_key` | `unknown` | User is updating the API key of a rule. | -| `failure` | User is not authorized to update the API key of a rule. | -| `rule_enable` | `unknown` | User is enabling a rule. | -| `failure` | User is not authorized to enable a rule. | -| `rule_disable` | `unknown` | User is disabling a rule. | -| `failure` | User is not authorized to disable a rule. | -| `rule_mute` | `unknown` | User is muting a rule. | -| `failure` | User is not authorized to mute a rule. | -| `rule_unmute` | `unknown` | User is unmuting a rule. | -| `failure` | User is not authorized to unmute a rule. | -| `rule_alert_mute` | `unknown` | User is muting an alert. | -| `failure` | User is not authorized to mute an alert. | -| `rule_alert_unmute` | `unknown` | User is unmuting an alert. | -| `failure` | User is not authorized to unmute an alert. | -| `space_update` | `unknown` | User is updating a space. | -| `failure` | User is not authorized to update a space. | -| `alert_update` | `unknown` | User is updating an alert. | -| `failure` | User is not authorized to update an alert. | -| `rule_snooze` | `unknown` | User is snoozing a rule. | -| `failure` | User is not authorized to snooze a rule. | -| `rule_unsnooze` | `unknown` | User is unsnoozing a rule. | -| `failure` | User is not authorized to unsnooze a rule. | -| `case_update` | `unknown` | User is updating a case. | -| `failure` | User is not authorized to update a case. | -| `case_push` | `unknown` | User is pushing a case to an external service. | -| `failure` | User is not authorized to push a case to an external service. | -| `case_configuration_update` | `unknown` | User is updating a case configuration. | -| `failure` | User is not authorized to update a case configuration. | -| `case_comment_update` | `unknown` | User is updating a case comment. | -| `failure` | User is not authorized to update a case comment. | -| `case_user_action_add_case_assignees` | `success` | User has added a case assignee. | -| `case_user_action_update_case_connector` | `success` | User has updated a case connector. | -| `case_user_action_update_case_description` | `success` | User has updated a case description. | -| `case_user_action_update_case_settings` | `success` | User has updated the case settings. | -| `case_user_action_update_case_severity` | `success` | User has updated the case severity. | -| `case_user_action_update_case_status` | `success` | User has updated the case status. | -| `case_user_action_pushed_case` | `success` | User has pushed a case to an external service. | -| `case_user_action_add_case_tags` | `success` | User has added tags to a case. | -| `case_user_action_update_case_title` | `success` | User has updated the case title. | -| `ml_open_ad_job` | `success` | Opening anomaly detection job. | -| `failure` | Failed to open anomaly detection job. | -| `ml_close_ad_job` | `success` | Closing anomaly detection job. | -| `failure` | Failed to close anomaly detection job. | -| `ml_start_ad_datafeed` | `success` | Starting anomaly detection datafeed. | -| `failure` | Failed to start anomaly detection datafeed. | -| `ml_stop_ad_datafeed` | `success` | Stopping anomaly detection datafeed. | -| `failure` | Failed to stop anomaly detection datafeed. | -| `ml_update_ad_job` | `success` | Updating anomaly detection job. | -| `failure` | Failed to update anomaly detection job. | -| `ml_reset_ad_job` | `success` | Resetting anomaly detection job. | -| `failure` | Failed to reset anomaly detection job. | -| `ml_revert_ad_snapshot` | `success` | Reverting anomaly detection snapshot. | -| `failure` | Failed to revert anomaly detection snapshot. | -| `ml_update_ad_datafeed` | `success` | Updating anomaly detection datafeed. | -| `failure` | Failed to update anomaly detection datafeed. | -| `ml_put_calendar_job` | `success` | Adding job to calendar. | -| `failure` | Failed to add job to calendar. | -| `ml_delete_calendar_job` | `success` | Removing job from calendar. | -| `failure` | Failed to remove job from calendar. | -| `ml_update_filter` | `success` | Updating filter. | -| `failure` | Failed to update filter. | -| `ml_start_dfa_job` | `success` | Starting data frame analytics job. | -| `failure` | Failed to start data frame analytics job. | -| `ml_stop_dfa_job` | `success` | Stopping data frame analytics job. | -| `failure` | Failed to stop data frame analytics job. | -| `ml_update_dfa_job` | `success` | Updating data frame analytics job. | -| `failure` | Failed to update data frame analytics job. | -| `ml_start_trained_model_deployment` | `success` | Starting trained model deployment. | -| `failure` | Failed to start trained model deployment. | -| `ml_stop_trained_model_deployment` | `success` | Stopping trained model deployment. | -| `failure` | Failed to stop trained model deployment. | -| `ml_update_trained_model_deployment` | `success` | Updating trained model deployment. | -| `failure` | Failed to update trained model deployment. | -| `product_documentation_update` | `unknown` | User requested to update the product documentation for use in AI Assistants. | -| ##### Type: deletion [_type_deletion]


| -| **Action** | **Outcome** | **Description** | -| `saved_object_delete` | `unknown` | User is deleting a saved object. | -| `failure` | User is not authorized to delete a saved object. | -| `saved_object_close_point_in_time` | `unknown` | User is deleting a Point In Time that was used to query saved objects. | -| `failure` | User is not authorized to delete a Point In Time. | -| `connector_delete` | `unknown` | User is deleting a connector. | -| `failure` | User is not authorized to delete a connector. | -| `rule_delete` | `unknown` | User is deleting a rule. | -| `failure` | User is not authorized to delete a rule. | -| `ad_hoc_run_delete` | `unknown` | User is deleting an ad hoc run. | -| `failure` | User is not authorized to delete an ad hoc run. | -| `space_delete` | `unknown` | User is deleting a space. | -| `failure` | User is not authorized to delete a space. | -| `case_delete` | `unknown` | User is deleting a case. | -| `failure` | User is not authorized to delete a case. | -| `case_comment_delete_all` | `unknown` | User is deleting all comments associated with a case. | -| `failure` | User is not authorized to delete all comments associated with a case. | -| `case_comment_delete` | `unknown` | User is deleting a case comment. | -| `failure` | User is not authorized to delete a case comment. | -| `case_user_action_delete_case_assignees` | `success` | User has removed a case assignee. | -| `case_user_action_delete_comment` | `success` | User has deleted a case comment. | -| `case_user_action_delete_case` | `success` | User has deleted a case. | -| `case_user_action_delete_case_tags` | `success` | User has removed tags from a case. | -| `ml_delete_ad_job` | `success` | Deleting anomaly detection job. | -| `failure` | Failed to delete anomaly detection job. | -| `ml_delete_model_snapshot` | `success` | Deleting model snapshot. | -| `failure` | Failed to delete model snapshot. | -| `ml_delete_ad_datafeed` | `success` | Deleting anomaly detection datafeed. | -| `failure` | Failed to delete anomaly detection datafeed. | -| `ml_delete_calendar` | `success` | Deleting calendar. | -| `failure` | Failed to delete calendar. | -| `ml_delete_calendar_event` | `success` | Deleting calendar event. | -| `failure` | Failed to delete calendar event. | -| `ml_delete_filter` | `success` | Deleting filter. | -| `failure` | Failed to delete filter. | -| `ml_delete_forecast` | `success` | Deleting forecast. | -| `failure` | Failed to delete forecast. | -| `ml_delete_dfa_job` | `success` | Deleting data frame analytics job. | -| `failure` | Failed to delete data frame analytics job. | -| `ml_delete_trained_model` | `success` | Deleting trained model. | -| `failure` | Failed to delete trained model. | -| `product_documentation_delete` | `unknown` | User requested to delete the product documentation for use in AI Assistants. | -| ##### Type: access [_type_access]


| -| **Action** | **Outcome** | **Description** | -| `saved_object_get` | `success` | User has accessed a saved object. | -| `failure` | User is not authorized to access a saved object. | -| `saved_object_resolve` | `success` | User has accessed a saved object. | -| `failure` | User is not authorized to access a saved object. | -| `saved_object_find` | `success` | User has accessed a saved object as part of a search operation. | -| `failure` | User is not authorized to search for saved objects. | -| `connector_get` | `success` | User has accessed a connector. | -| `failure` | User is not authorized to access a connector. | -| `connector_find` | `success` | User has accessed a connector as part of a search operation. | -| `failure` | User is not authorized to search for connectors. | -| `rule_get` | `success` | User has accessed a rule. | -| `failure` | User is not authorized to access a rule. | -| `rule_get_execution_log` | `success` | User has accessed execution log for a rule. | -| `failure` | User is not authorized to access execution log for a rule. | -| `rule_find` | `success` | User has accessed a rule as part of a search operation. | -| `failure` | User is not authorized to search for rules. | -| `rule_schedule_backfill` | `success` | User has accessed a rule as part of a backfill schedule operation. | -| `failure` | User is not authorized to access rule for backfill scheduling. | -| `ad_hoc_run_get` | `success` | User has accessed an ad hoc run. | -| `failure` | User is not authorized to access ad hoc run. | -| `ad_hoc_run_find` | `success` | User has accessed an ad hoc run as part of a search operation. | -| `failure` | User is not authorized to search for ad hoc runs. | -| `space_get` | `success` | User has accessed a space. | -| `failure` | User is not authorized to access a space. | -| `space_find` | `success` | User has accessed a space as part of a search operation. | -| `failure` | User is not authorized to search for spaces. | -| `alert_get` | `success` | User has accessed an alert. | -| `failure` | User is not authorized to access an alert. | -| `alert_find` | `success` | User has accessed an alert as part of a search operation. | -| `failure` | User is not authorized to access alerts. | -| `case_get` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_bulk_get` | `success` | User has accessed multiple cases. | -| `failure` | User is not authorized to access multiple cases. | -| `case_resolve` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_find` | `success` | User has accessed a case as part of a search operation. | -| `failure` | User is not authorized to search for cases. | -| `case_ids_by_alert_id_get` | `success` | User has accessed cases. | -| `failure` | User is not authorized to access cases. | -| `case_get_metrics` | `success` | User has accessed metrics for a case. | -| `failure` | User is not authorized to access metrics for a case. | -| `cases_get_metrics` | `success` | User has accessed metrics for cases. | -| `failure` | User is not authorized to access metrics for cases. | -| `case_configuration_find` | `success` | User has accessed a case configuration as part of a search operation. | -| `failure` | User is not authorized to search for case configurations. | -| `case_comment_get_metrics` | `success` | User has accessed metrics for case comments. | -| `failure` | User is not authorized to access metrics for case comments. | -| `case_comment_alerts_attach_to_case` | `success` | User has accessed case alerts. | -| `failure` | User is not authorized to access case alerts. | -| `case_comment_get` | `success` | User has accessed a case comment. | -| `failure` | User is not authorized to access a case comment. | -| `case_comment_bulk_get` | `success` | User has accessed multiple case comments. | -| `failure` | User is not authorized to access multiple case comments. | -| `case_comment_get_all` | `success` | User has accessed case comments. | -| `failure` | User is not authorized to access case comments. | -| `case_comment_find` | `success` | User has accessed a case comment as part of a search operation. | -| `failure` | User is not authorized to search for case comments. | -| `case_categories_get` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_tags_get` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_reporters_get` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_find_statuses` | `success` | User has accessed a case as part of a search operation. | -| `failure` | User is not authorized to search for cases. | -| `case_user_actions_get` | `success` | User has accessed the user activity of a case. | -| `failure` | User is not authorized to access the user activity of a case. | -| `case_user_actions_find` | `success` | User has accessed the user activity of a case as part of a search operation. | -| `failure` | User is not authorized to access the user activity of a case. | -| `case_user_action_get_metrics` | `success` | User has accessed metrics for the user activity of a case. | -| `failure` | User is not authorized to access metrics for the user activity of a case. | -| `case_user_action_get_users` | `success` | User has accessed the users associated with a case. | -| `failure` | User is not authorized to access the users associated with a case. | -| `case_connectors_get` | `success` | User has accessed the connectors of a case. | -| `failure` | User is not authorized to access the connectors of a case. | -| `ml_infer_trained_model` | `success` | Inferring using trained model. | -| `failure` | Failed to infer using trained model. | -| #### Category: web [_category_web]


| -| **Action** | **Outcome** | **Description** | -| `http_request` | `unknown` | User is making an HTTP request. | +Refer to [linkTBD]() asciidocalypse://elasticsearch/docs/reference/elasticsearch/elasticsearch-audit-events for a complete reference of event types and attributes. +## `trace.id` field in {{kib}} audit events -## Audit schema [xpack-security-ecs-audit-schema] +In {{kib}}, the [trace.id](https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html#field-trace-id) field allows to correlate multiple events that originate from the same request. -Audit logs are written in JSON using [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs/1.6/index.html) specification. +Additionally, this field helps correlate events from one request with the backend calls that create {{es}} audit events. When {{kib}} sends requests to {{es}}, the `trace.id` value is propagated and stored in the `opaque_id` attribute of {{es}} audit logs, allowing cross-component correlation. -| | -| --- | -| #### Base Fields [_base_fields]


| -| **Field** | **Description** | -| `@timestamp` | Time when the event was generated.
Example: `2016-05-23T08:05:34.853Z` | -| `message` | Human readable description of the event. | -| #### Event Fields [_event_fields]


| -| **Field** | **Description** | -| $$$field-event-action$$$ `event.action` | The action captured by the event.
Refer to [Audit events](enabling-kibana-audit-logs.md#xpack-security-ecs-audit-logging) for a table of possible actions. | -| $$$field-event-category$$$ `event.category` | High level category associated with the event.
This field is closely related to `event.type`, which is used as a subcategory.
Possible values:`database`,`web`,`authentication` | -| $$$field-event-type$$$ `event.type` | Subcategory associated with the event.
This field can be used along with the `event.category` field to enable filtering events down to a level appropriate for single visualization.
Possible values:`creation`,`access`,`change`,`deletion` | -| $$$field-event-outcome$$$ `event.outcome` | Denotes whether the event represents a success or failure:

* Any actions that the user is not authorized to perform are logged with outcome: `failure`
* Authorized read operations are only logged after successfully fetching the data from {{es}} with outcome: `success`
* Authorized create, update, or delete operations are logged before attempting the operation in {{es}} with outcome: `unknown`

Possible values: `success`, `failure`, `unknown`
| -| #### User Fields [_user_fields]


| -| **Field** | **Description** | -| `user.id` | Unique identifier of the user across sessions (See [user profiles](../../users-roles/cluster-or-deployment-auth/user-profiles.md)). | -| `user.name` | Login name of the user.
Example: `jdoe` | -| `user.roles[]` | Set of user roles at the time of the event.
Example: `[kibana_admin, reporting_user]` | -| #### Kibana Fields [_kibana_fields]


| -| **Field** | **Description** | -| `kibana.space_id` | ID of the space associated with the event.
Example: `default` | -| `kibana.session_id` | ID of the user session associated with the event.
Each login attempt results in a unique session id. | -| `kibana.saved_object.type` | Type of saved object associated with the event.
Example: `dashboard` | -| `kibana.saved_object.id` | ID of the saved object associated with the event. | -| `kibana.authentication_provider` | Name of the authentication provider associated with the event.
Example: `my-saml-provider` | -| `kibana.authentication_type` | Type of the authentication provider associated with the event.
Example: `saml` | -| `kibana.authentication_realm` | Name of the Elasticsearch realm that has authenticated the user.
Example: `native` | -| `kibana.lookup_realm` | Name of the Elasticsearch realm where the user details were retrieved from.
Example: `native` | -| `kibana.add_to_spaces[]` | Set of space IDs that a saved object is being shared to as part of the event.
Example: `[default, marketing]` | -| `kibana.delete_from_spaces[]` | Set of space IDs that a saved object is being removed from as part of the event.
Example: `[marketing]` | -| #### Error Fields [_error_fields]


| -| **Field** | **Description** | -| `error.code` | Error code describing the error. | -| `error.message` | Error message. | -| #### HTTP and URL Fields [_http_and_url_fields]


| -| **Field** | **Description** | -| `client.ip` | Client IP address. | -| `http.request.method` | HTTP request method.
Example: `get`, `post`, `put`, `delete` | -| `http.request.headers.x-forwarded-for` | `X-Forwarded-For` request header used to identify the originating client IP address when connecting through proxy servers.
Example: `161.66.20.177, 236.198.214.101` | -| `url.domain` | Domain of the URL.
Example: `www.elastic.co` | -| `url.path` | Path of the request.
Example: `/search` | -| `url.port` | Port of the request.
Example: `443` | -| `url.query` | The query field describes the query string of the request.
Example: `q=elasticsearch` | -| `url.scheme` | Scheme of the request.
Example: `https` | -| #### Tracing Fields [_tracing_fields]


| -| **Field** | **Description** | -| $$$field-trace-id$$$ `trace.id` | Unique identifier allowing events of the same transaction from {{kib}} and {{es}} to be correlated. | +Refer to [{{kib}} audit events](https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html#xpack-security-ecs-audit-logging) for a complete description of {{kib}} auditing events. +## Examples -## Correlating audit events [xpack-security-ecs-audit-correlation] - -Audit events can be correlated in two ways: - -1. Multiple {{kib}} audit events that resulted from the same request can be correlated together. -2. If [{{es}} audit logging](enabling-elasticsearch-audit-logs.md) is enabled, {{kib}} audit events from one request can be correlated with backend calls that create {{es}} audit events. +This section shows practical examples of correlating audit logs. ::::{note} -The examples below are simplified, many fields have been omitted and values have been shortened for clarity. +The examples below are simplified. Many fields have been omitted and values have been shortened for clarity. :::: - ### Example 1: correlating multiple {{kib}} audit events [_example_1_correlating_multiple_kib_audit_events] When "thom" creates a new alerting rule, five audit events are written: diff --git a/deploy-manage/monitor/logging-configuration/elasticsearch-audit-events.md b/deploy-manage/monitor/logging-configuration/elasticsearch-audit-events.md deleted file mode 100644 index a209e7406f..0000000000 --- a/deploy-manage/monitor/logging-configuration/elasticsearch-audit-events.md +++ /dev/null @@ -1,898 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/reference/current/audit-event-types.html -applies: - hosted: all - ece: all - eck: all - stack: all ---- - -# Elasticsearch audit events [audit-event-types] - -When you are [auditing security events](enabling-elasticsearch-audit-logs.md), a single client request might generate multiple audit events, across multiple cluster nodes. The common `request.id` attribute can be used to correlate the associated events. - -Use the [`xpack.security.audit.logfile.events.include`](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#xpack-sa-lf-events-include) setting in `elasticsearch.yml` to specify the kind of events you want to include in the auditing output. - -::::{note} -Certain audit events require the `security_config_change` event type to audit the related event action. The description of impacted audit events indicate whether that event type is required. -:::: - - -$$$event-access-denied$$$ - -`access_denied` -: Logged when an authenticated user attempts to execute an action they do not have the necessary [privilege](../../users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to perform. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:30:06,949+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"transport", "event.action": - "access_denied", "authentication.type":"REALM", "user.name":"user1", - "user.realm":"default_native", "user.roles":["test_role"], "origin.type": - "rest", "origin.address":"[::1]:52434", "request.id":"yKOgWn2CRQCKYgZRz3phJw", - "action":"indices:admin/auto_create", "request.name":"CreateIndexRequest", - "indices":[""]} - ``` - - :::: - - -$$$event-access-granted$$$ - -`access_granted` -: Logged when an authenticated user attempts to execute an action they have the necessary privilege to perform. These events will be logged only for non-system users. - - If you want to include `access_granted` events for all users (including internal users such as `_xpack`), add [`system_access_granted`](#event-system-granted) to the list of event types in addition to `access_granted`. The `system_access_granted` privilege is not included by default to avoid cluttering the logs. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:30:06,947+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"transport", "event.action": - "access_granted", "authentication.type":"REALM", "user.name":"user1", "user - realm":"default_native", "user.roles":["test_role"], "origin.type":"rest", - "origin.address":"[::1]:52434", "request.id":"yKOgWn2CRQCKYgZRz3phJw", - "action":"indices:data/write/bulk", "request.name":"BulkRequest"} - ``` - - :::: - - -$$$event-anonymous-access-denied$$$ - -`anonymous_access_denied` -: Logged when a request is denied due to missing authentication credentials. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T21:56:43,608+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"rest", "event.action": - "anonymous_access_denied", "origin.type":"rest", "origin.address": - "[::1]:50543", "url.path":"/twitter/_async_search", "url.query":"pretty", - "request.method":"POST", "request.id":"TqA9OisyQ8WTl1ivJUV1AA"} - ``` - - :::: - - -$$$event-authentication-failed$$$ - -`authentication_failed` -: Logged when the authentication credentials cannot be matched to a known user. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:10:15,510+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"rest", "event.action": - "authentication_failed", "user.name":"elastic", "origin.type":"rest", - "origin.address":"[::1]:51504", "url.path":"/_security/user/user1", - "url.query":"pretty", "request.method":"POST", - "request.id":"POv8p_qeTl2tb5xoFl0HIg"} - ``` - - :::: - - -$$$event-authentication-success$$$ - -`authentication_success` -: Logged when a user successfully authenticates. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:03:35,018+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"rest", "event.action": - "authentication_success", "authentication.type":"REALM", "user.name": - "elastic", "user.realm":"reserved", "origin.type":"rest", "origin.address": - "[::1]:51014", "realm":"reserved", "url.path":"/twitter/_search", - "url.query":"pretty", "request.method":"POST", - "request.id":"nHV3UMOoSiu-TaSPWCfxGg"} - ``` - - :::: - - -$$$event-change-disable-user$$$ - -`change_disable_user` -: Logged when the [enable user API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user) is invoked to disable a native or a built-in user. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T23:17:28,308+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", "event. - action":"change_disable_user", "request.id":"qvLIgw_eTvyK3cgV-GaLVg", - "change":{"disable":{"user":{"name":"user1"}}}} - ``` - - :::: - - -$$$event-change-enable-user$$$ - -`change_enable_user` -: Logged when the [enable user API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user) is invoked to enable a native or a built-in user. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T23:17:34,843+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", "event. - action":"change_enable_user", "request.id":"BO3QU3qeTb-Ei0G0rUOalQ", - "change":{"enable":{"user":{"name":"user1"}}}} - ``` - - :::: - - -$$$event-change-password$$$ - -`change_password` -: Logged when the [change password API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-change-password) is invoked to change the password of a native or built-in user. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2019-12-30T22:19:41,345+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", "event. - action":"change_password", "request.id":"bz5a1Cc3RrebDMitMGGNCw", - "change":{"password":{"user":{"name":"user1"}}}} - ``` - - :::: - - -$$$event-create-service-token$$$ - -`create_service_token` -: Logged when the [create service account token API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-service-token) is invoked to create a new index-based token for a service account. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2021-04-30T23:17:42,952+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", "event. - action":"create_service_token", "request.id":"az9a1Db5QrebDMacQ8yGKc", - "create":{"service_token":{"namespace":"elastic","service":"fleet-server","name":"token1"}}}` - ``` - - :::: - - -$$$event-connection-denied$$$ - -`connection_denied` -: Logged when an incoming TCP connection does not pass the [IP filter](../../security/ip-traffic-filtering.md) for a specific profile. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T21:47:31,526+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"ip_filter", "event.action": - "connection_denied", "origin.type":"rest", "origin.address":"10.10.0.20:52314", - "transport.profile":".http", "rule":"deny 10.10.0.0/16"} - ``` - - :::: - - -$$$event-connection-granted$$$ - -`connection_granted` -: Logged when an incoming TCP connection passes the [IP filter](../../security/ip-traffic-filtering.md) for a specific profile. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T21:47:31,526+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"ip_filter", "event.action": - "connection_granted", "origin.type":"rest", "origin.address":"[::1]:52314", - "transport.profile":".http", "rule":"allow ::1,127.0.0.1"} - ``` - - :::: - - -$$$event-create-apikey$$$ - -`create_apikey` -: Logged when the [create API key](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) or the [grant API key](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-grant-api-key) APIs are invoked to create a new API key. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-31T00:33:52,521+0200", "node.id": - "9clhpgjJRR-iKzOw20xBNQ", "event.type":"security_config_change", "event.action": - "create_apikey", "request.id":"9FteCmovTzWHVI-9Gpa_vQ", "create":{"apikey": - {"name":"test-api-key-1","expiration":"10d","role_descriptors":[{"cluster": - ["monitor","manage_ilm"],"indices":[{"names":["index-a*"],"privileges": - ["read","maintenance"]},{"names":["in*","alias*"],"privileges":["read"], - "field_security":{"grant":["field1*","@timestamp"],"except":["field11"]}}], - "applications":[],"run_as":[]},{"cluster":["all"],"indices":[{"names": - ["index-b*"],"privileges":["all"]}],"applications":[],"run_as":[]}], - "metadata":{"application":"my-application","environment":{"level": 1, - "tags":["dev","staging"]}}}}} - ``` - - :::: - - -$$$event-change-apikey$$$ - -`change_apikey` -: Logged when the [update API key](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-api-key) API is invoked to update the attributes of an existing API key. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-31T00:33:52,521+0200", "node.id": - "9clhpgjJRR-iKzOw20xBNQ", "event.type":"security_config_change", "event.action": - "change_apikey", "request.id":"9FteCmovTzWHVI-9Gpa_vQ", "change":{"apikey": - {"id":"zcwN3YEBBmnjw-K-hW5_","role_descriptors":[{"cluster": - ["monitor","manage_ilm"],"indices":[{"names":["index-a*"],"privileges": - ["read","maintenance"]},{"names":["in*","alias*"],"privileges":["read"], - "field_security":{"grant":["field1*","@timestamp"],"except":["field11"]}}], - "applications":[],"run_as":[]},{"cluster":["all"],"indices":[{"names": - ["index-b*"],"privileges":["all"]}],"applications":[],"run_as":[]}], - "metadata":{"application":"my-application","environment":{"level": 1, - "tags":["dev","staging"]}},"expiration":"10d"}}} - ``` - - :::: - - -$$$event-change-apikeys$$$ - -`change_apikeys` -: Logged when the [bulk update API keys](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-update-api-keys) API is invoked to update the attributes of multiple existing API keys. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit","timestamp":"2020-12-31T00:33:52,521+0200","node.id": - "9clhpgjJRR-iKzOw20xBNQ","event.type":"security_config_change", - "event.action":"change_apikeys","request.id":"9FteCmovTzWHVI-9Gpa_vQ", - "change":{"apikeys": - {"ids":["zcwN3YEBBmnjw-K-hW5_","j7c0WYIBqecB5CbVR6Oq"],"role_descriptors": - [{"cluster":["monitor","manage_ilm"],"indices":[{"names":["index-a*"],"privileges": - ["read","maintenance"]},{"names":["in*","alias*"],"privileges":["read"], - "field_security":{"grant":["field1*","@timestamp"],"except":["field11"]}}], - "applications":[],"run_as":[]},{"cluster":["all"],"indices":[{"names": - ["index-b*"],"privileges":["all"]}],"applications":[],"run_as":[]}], - "metadata":{"application":"my-application","environment":{"level":1, - "tags":["dev","staging"]}},"expiration":"10d"}}} - ``` - - :::: - - -$$$event-delete-privileges$$$ - -`delete_privileges` -: Logged when the [delete application privileges API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-privileges) is invoked to remove one or more application privileges. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-31T00:39:30,246+0200", "node.id": - "9clhpgjJRR-iKzOw20xBNQ", "event.type":"security_config_change", "event. - action":"delete_privileges", "request.id":"7wRWVxxqTzCKEspeSP7J8g", - "delete":{"privileges":{"application":"myapp","privileges":["read"]}}} - ``` - - :::: - - -$$$event-delete-role$$$ - -`delete_role` -: Logged when the [delete role API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role) is invoked to delete a role. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-31T00:08:11,678+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", "event.action": - "delete_role", "request.id":"155IKq3zQdWq-12dgKZRnw", - "delete":{"role":{"name":"my_admin_role"}}} - ``` - - :::: - - -$$$event-delete-role-mapping$$$ - -`delete_role_mapping` -: Logged when the [delete role mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role-mapping) is invoked to delete a role mapping. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-31T00:12:09,349+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", "event. - action":"delete_role_mapping", "request.id":"Stim-DuoSTCWom0S_xhf8g", - "delete":{"role_mapping":{"name":"mapping1"}}} - ``` - - :::: - - -$$$event-delete-service-token$$$ - -`delete_service_token` -: Logged when the [delete service account token API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-service-token) is invoked to delete an index-based token for a service account. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2021-04-30T23:17:42,952+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", "event. - action":"delete_service_token", "request.id":"az9a1Db5QrebDMacQ8yGKc", - "delete":{"service_token":{"namespace":"elastic","service":"fleet-server","name":"token1"}}} - ``` - - :::: - - -$$$event-delete-user$$$ - -`delete_user` -: Logged when the [delete user API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-user) is invoked to delete a specific native user. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:19:41,345+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", - "event.action":"delete_user", "request.id":"au5a1Cc3RrebDMitMGGNCw", - "delete":{"user":{"name":"jacknich"}}} - ``` - - :::: - - -$$$event-invalidate-apikeys$$$ - -`invalidate_apikeys` -: Logged when the [invalidate API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-api-key) is invoked to invalidate one or more API keys. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-31T00:36:30,247+0200", "node.id": - "9clhpgjJRR-iKzOw20xBNQ", "event.type":"security_config_change", "event. - action":"invalidate_apikeys", "request.id":"7lyIQU9QTFqSrTxD0CqnTQ", - "invalidate":{"apikeys":{"owned_by_authenticated_user":false, - "user":{"name":"myuser","realm":"native1"}}}} - ``` - - :::: - - -$$$event-put-privileges$$$ - -`put_privileges` -: Logged when the [create or update privileges API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-privileges) is invoked to add or update one or more application privileges. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-31T00:39:07,779+0200", "node.id": - "9clhpgjJRR-iKzOw20xBNQ", "event.type":"security_config_change", - "event.action":"put_privileges", "request.id":"1X2VVtNgRYO7FmE0nR_BGA", - "put":{"privileges":[{"application":"myapp","name":"read","actions": - ["data:read/*","action:login"],"metadata":{"description":"Read access to myapp"}}]}} - ``` - - :::: - - -$$$event-put-role$$$ - -`put_role` -: Logged when the [create or update role API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role) is invoked to create or update a role. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:27:01,978+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", - "event.action":"put_role", "request.id":"tDYQhv5CRMWM4Sc5Zkk2cQ", - "put":{"role":{"name":"test_role","role_descriptor":{"cluster":["all"], - "indices":[{"names":["apm*"],"privileges":["all"],"field_security": - {"grant":["granted"]},"query":"{\"term\": {\"service.name\": \"bar\"}}"}, - {"names":["apm-all*"],"privileges":["all"],"query":"{\"term\": - {\"service.name\": \"bar2\"}}"}],"applications":[],"run_as":[]}}}} - ``` - - :::: - - -$$$event-put-role-mapping$$$ - -`put_role_mapping` -: Logged when the [create or update role mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping) is invoked to create or update a role mapping. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-31T00:11:13,932+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", "event. - action":"put_role_mapping", "request.id":"kg4h1l_kTDegnLC-0A-XxA", - "put":{"role_mapping":{"name":"mapping1","roles":["user"],"rules": - {"field":{"username":"*"}},"enabled":true,"metadata":{"version":1}}}} - ``` - - :::: - - -$$$event-put-user$$$ - -`put_user` -: Logged when the [create or update user API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-user) is invoked to create or update a native user. Note that user updates can also change the user’s password. - - You must include the `security_config_change` event type to audit the related event action. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:10:09,749+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"security_config_change", - "event.action":"put_user", "request.id":"VIiSvhp4Riim_tpkQCVSQA", - "put":{"user":{"name":"user1","enabled":false,"roles":["admin","other_role1"], - "full_name":"Jack Sparrow","email":"jack@blackpearl.com", - "has_password":true,"metadata":{"cunning":10}}}} - ``` - - :::: - - -$$$event-realm-auth-failed$$$ - -`realm_authentication_failed` -: Logged for every realm that fails to present a valid authentication token. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:10:15,510+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"rest", "event.action": - "realm_authentication_failed", "user.name":"elastic", "origin.type":"rest", - "origin.address":"[::1]:51504", "realm":"myTestRealm1", "url.path": - "/_security/user/user1", "url.query":"pretty", "request.method":"POST", - "request.id":"POv8p_qeTl2tb5xoFl0HIg"} - ``` - - :::: - - -$$$event-runas-denied$$$ - -`run_as_denied` -: Logged when an authenticated user attempts to [run as](../../users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users.md) another user that they do not have the necessary [privileges](../../users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to do so. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:49:34,859+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"transport", "event.action": - "run_as_denied", "user.name":"user1", "user.run_as.name":"user1", - "user.realm":"default_native", "user.run_as.realm":"default_native", - "user.roles":["test_role"], "origin.type":"rest", "origin.address": - "[::1]:52662", "request.id":"RcaSt872RG-R_WJBEGfYXA", - "action":"indices:data/read/search", "request.name":"SearchRequest", "indices":["alias1"]} - ``` - - :::: - - -$$$event-runas-granted$$$ - -`run_as_granted` -: Logged when an authenticated user attempts to [run as](../../users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users.md) another user that they have the necessary privileges to do so. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2020-12-30T22:44:42,068+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type":"transport", "event.action": - "run_as_granted", "user.name":"elastic", "user.run_as.name":"user1", - "user.realm":"reserved", "user.run_as.realm":"default_native", - "user.roles":["superuser"], "origin.type":"rest", "origin.address": - "[::1]:52623", "request.id":"dGqPTdEQSX2TAPS3cvc1qA", "action": - "indices:data/read/search", "request.name":"SearchRequest", "indices":["alias1"]} - ``` - - :::: - - -$$$event-system-granted$$$ - -`system_access_granted` -: Logs [`access_granted`](#event-access-granted) events only for [internal users](../../users-roles/cluster-or-deployment-auth/internal-users.md), such as `_xpack`. If you include this setting in addition to `access_granted`, then `access_granted` events are logged for *all* users. - - ::::{note} - This event type is disabled by default to avoid cluttering the logs. - :::: - - -$$$event-tampered-request$$$ - -`tampered_request` -: Logged when the {{security-features}} detect that the request has been tampered with. Typically relates to `search/scroll` requests when the scroll ID is believed to have been tampered with. - - ::::{dropdown} Example - ```js - {"type":"audit", "timestamp":"2019-11-27T22:00:00,947+0200", "node.id": - "0RMNyghkQYCc_gVd1G6tZQ", "event.type": "rest", "event.action": - "tampered_request", "origin.address":"[::1]:50543", "url.path": - "/twitter/_async_search", "url.query":"pretty", "request.method":"POST", - "request.id":"TqA9OisyQ8WTl1ivJUV1AA"} - ``` - - :::: - - - -## Audit event attributes [audit-event-attributes] - -The audit events are formatted as JSON documents, and each event is printed on a separate line in the audit log. The entries themselves do not contain an end-of-line delimiter. For more details, see [Log entry format](logfile-audit-output.md#audit-log-entry-format). - -The following list shows attributes that are common to all audit event types: - -`@timestamp` -: The time, in ISO9601 format, when the event occurred. - -`node.name` -: The name of the node. This can be changed in the `elasticsearch.yml` config file. - -`node.id` -: The node id. This is automatically generated and is persistent across full cluster restarts. - -`host.ip` -: The bound IP address of the node, with which the node can be communicated with. - -`host.name` -: The unresolved node’s hostname. - -`event.type` -: The internal processing layer that generated the event: `rest`, `transport`, `ip_filter` or `security_config_change`. This is different from `origin.type` because a request originating from the REST API is translated to a number of transport messages, generating audit events with `origin.type: rest` and `event.type: transport`. - -`event.action` -: The type of event that occurred: `anonymous_access_denied`, `authentication_failed`, `authentication_success`, `realm_authentication_failed`, `access_denied`, `access_granted`, `connection_denied`, `connection_granted`, `tampered_request`, `run_as_denied`, or `run_as_granted`. - - In addition, if `event.type` equals [`security_config_change`](#security-config-change), the `event.action` attribute takes one of the following values: `put_user`, `change_password`, `put_role`, `put_role_mapping`, `change_enable_user`, `change_disable_user`, `put_privileges`, `create_apikey`, `delete_user`, `delete_role`, `delete_role_mapping`, `invalidate_apikeys`, `delete_privileges`, `change_apikey`, or `change_apikeys`. - - -`request.id` -: A synthetic identifier that can be used to correlate the events associated with a particular REST request. - -In addition, all the events of types `rest`, `transport` and `ip_filter` (but not `security_config_change`) have the following extra attributes, which show more details about the requesting client: - -`origin.address` -: The source IP address of the request associated with this event. This could be the address of the remote client, the address of another cluster node, or the local node’s bound address, if the request originated locally. Unless the remote client connects directly to the cluster, the *client address* will actually be the address of the first OSI layer 3 proxy in front of the cluster. - -`origin.type` -: The origin type of the request associated with this event: `rest` (request originated from a REST API request), `transport` (request was received on the transport channel), or `local_node` (the local node issued the request). - -`opaque_id` -: The value of the `X-Opaque-Id` HTTP header (if present) of the request associated with this event. See more: [`X-Opaque-Id` HTTP header - API conventions](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#x-opaque-id) - -`trace_id` -: The identifier extracted from the `traceparent` HTTP header (if present) of the request associated with this event. It allows to surface audit logs into the Trace Logs feature of Elastic APM. - -`x_forwarded_for` -: The verbatim value of the `X-Forwarded-For` HTTP request header (if present) of the request associated with the audit event. This header is commonly added by proxies when they forward requests and the value is the address of the proxied client. When a request crosses multiple proxies the header is a comma delimited list with the last value being the address of the second to last proxy server (the address of the last proxy server is designated by the `origin.address` field). - -## Audit event attributes of the `rest` event type [_audit_event_attributes_of_the_rest_event_type] - -The events with `event.type` equal to `rest` have one of the following `event.action` attribute values: `authentication_success`, `anonymous_access_denied`, `authentication_failed`, `realm_authentication_failed`, `tampered_request` or `run_as_denied`. These events also have the following extra attributes (in addition to the common ones): - -`url.path` -: The path part of the URL (between the port and the query string) of the REST request associated with this event. This is URL encoded. - -`url.query` -: The query part of the URL (after "?", if present) of the REST request associated with this event. This is URL encoded. - -`request.method` -: The HTTP method of the REST request associated with this event. It is one of GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH, TRACE and CONNECT. - -`request.body` -: The full content of the REST request associated with this event, if enabled. This contains the HTTP request body. The body is escaped as a string value according to the JSON RFC 4627. - - -## Audit event attributes of the `transport` event type [_audit_event_attributes_of_the_transport_event_type] - -The events with `event.type` equal to `transport` have one of the following `event.action` attribute values: `authentication_success`, `anonymous_access_denied`, `authentication_failed`, `realm_authentication_failed`, `access_granted`, `access_denied`, `run_as_granted`, `run_as_denied`, or `tampered_request`. These events also have the following extra attributes (in addition to the common ones): - -`action` -: The name of the transport action that was executed. This is like the URL for a REST request. - -`indices` -: The indices names array that the request associated with this event pertains to (when applicable). - -`request.name` -: The name of the request handler that was executed. - - -## Audit event attributes of the `ip_filter` event type [_audit_event_attributes_of_the_ip_filter_event_type] - -The events with `event.type` equal to `ip_filter` have one of the following `event.action` attribute values: `connection_granted` or `connection_denied`. These events also have the following extra attributes (in addition to the common ones): - -`transport_profile` -: The transport profile the request targeted. - -`rule` -: The [IP filtering](../../security/ip-traffic-filtering.md) rule that denied the request. - - -## Audit event attributes of the `security_config_change` event type [security-config-change] - -The events with the `event.type` attribute equal to `security_config_change` have one of the following `event.action` attribute values: `put_user`, `change_password`, `put_role`, `put_role_mapping`, `change_enable_user`, `change_disable_user`, `put_privileges`, `create_apikey`, `delete_user`, `delete_role`, `delete_role_mapping`, `invalidate_apikeys`, `delete_privileges`, `change_apikey`, or `change_apikeys`. - -These events also have **one** of the following extra attributes (in addition to the common ones), which is specific to the `event.type` attribute. The attribute’s value is a nested JSON object: - -`put` -: The object representation of the security config that is being created, or the overwrite of an existing config. It contains the config for a `user`, `role`, `role_mapping`, or for application `privileges`. - -`delete` -: The object representation of the security config that is being deleted. It can be the config for a `user`, `role`, `role_mapping` or for application `privileges`. - -`change` -: The object representation of the security config that is being changed. It can be the `password`, `enable` or `disable`, config object for native or built-in users. If an API key is updated, the config object will be an `apikey`. - -`create` -: The object representation of the new security config that is being created. This is currently only used for API keys auditing. If the API key is created using the [create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) it only contains an `apikey` config object. If the API key is created using the [grant API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-grant-api-key) it also contains a `grant` config object. - -`invalidate` -: The object representation of the security configuration that is being invalidated. The only config that currently supports invalidation is `apikeys`, through the [invalidate API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-api-key). - -The schemas of the security config objects mentioned above are as follows. They are very similar to the request bodies of the corresponding security APIs. - -`user` -: An object like: - - ```js - `{"name": , "enabled": , "roles": , - "full_name": , "email": , "has_password": , - "metadata": }`. - ``` - - The `full_name`, `email` and `metadata` fields are omitted if empty. - - -`role` -: An object like: - - ```js - `{"name": , "role_descriptor": {"cluster": , "global": - {"application":{"manage":{:}}}, "indices": [ {"names": , "privileges": , "field_security": - {"grant": , "except": }, "query": , - "allow_restricted_indices": }], "applications":[{"application": , - "privileges": , "resources": }], "run_as": , - "metadata": }}`. - ``` - - The `global`, `field_security`, `except`, `query`, `allow_restricted_indices` and `metadata` fields are omitted if empty. - - -`role_mapping` -: An object like: - - ```js - `{"name": , "roles": , "role_templates": [{"template": , - "format": }], "rules": , "enabled": , "metadata": }`. - ``` - - The `roles` and `role_templates` fields are omitted if empty. The `rules` object has a recursively nested schema, identical to what is passed in the [API request for mapping roles](../../users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles.md). - - -`privileges` -: An array of objects like: - - ```js - `{"application": , "name": , "actions": , - "metadata": }`. - ``` - - -`password` -: A simple object like: - - ```js - `{"user":{"name": }}` - ``` - - -`enable` -: A simple object like: - - ```js - `{"user":{"name": }}` - ``` - - -`disable` -: A simple object like: - - ```js - `{"user":{"name": }}` - ``` - - -`apikey` -: An object like: - - ```js - `{"id": , "name": , "expiration": , "role_descriptors": [], - "metadata": []}` - ``` - - The `role_descriptors` objects have the same schema as the `role_descriptor` object that is part of the above `role` config object. - - -The object for an API key update will differ in that it will not include a `name`. - -`grant` -: An object like: - - ```js - `{"type": , "user": {"name": , "has_password": }, - "has_access_token": }` - ``` - - -`apikeys` -: An object like: - - ```js - `{"ids": , "name": , "owned_by_authenticated_user": - , "user":{"name": , "realm": }}` - ``` - - The object for a bulk API key update will differ in that it will not include `name`, `owned_by_authenticated_user`, or `user`. Instead, it may include `metadata` and `role_descriptors`, which have the same schemas as the fields in the `apikey` config object above. - - -`service_token` -: An object like: - - ```js - `{"namespace":,"service":,"name":}` - ``` - - - -## Extra audit event attributes for specific events [_extra_audit_event_attributes_for_specific_events] - -There are a few events that have some more attributes in addition to those that have been previously described: - -* `authentication_success`: - - `realm` - : The name of the realm that successfully authenticated the user. If authenticated using an API key, this is the special value of `_es_api_key`. This is a shorthand attribute for the same information that is described by the `user.realm`, `user.run_by.realm` and `authentication.type` attributes. - - `user.name` - : The name of the *effective* user. This is usually the same as the *authenticated* user, but if using the [run as authorization functionality](../../users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users.md) this instead denotes the name of the *impersonated* user. If authenticated using an API key, this is the name of the API key owner. If authenticated using a service account token, this is the service account principal, i.e. `namespace/service_name`. - - `user.realm` - : Name of the realm to which the *effective* user belongs. If authenticated using an API key, this is the name of the realm to which the API key owner belongs. - - `user.run_by.name` - : This attribute is present only if the request is using the [run as authorization functionality](../../users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users.md) and denotes the name of the *authenticated* user, which is also known as the *impersonator*. - - `user.run_by.realm` - : Name of the realm to which the *authenticated* (*impersonator*) user belongs. This attribute is provided only if the request uses the [run as authorization functionality](../../users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users.md). - - `authentication.type` - : Method used to authenticate the user. Possible values are `REALM`, `API_KEY`, `TOKEN`, `ANONYMOUS` or `INTERNAL`. - - `apikey.id` - : API key ID returned by the [create API key](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) request. This attribute is only provided for authentication using an API key. - - `apikey.name` - : API key name provided in the [create API key](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) request. This attribute is only provided for authentication using an API key. - - `authentication.token.name` - : Name of the [service account](../../users-roles/cluster-or-deployment-auth/service-accounts.md) token. This attribute is only provided for authentication using a service account token. - - `authentication.token.type` - : Type of the [service account](../../users-roles/cluster-or-deployment-auth/service-accounts.md) token. This attribute is only provided for authentication using a service account token. - -* `authentication_failed`: - - `user.name` - : The name of the user that failed authentication. If the request authentication token is invalid or unparsable, this information might be missing. - - `authentication.token.name` - : Name of the [service account](../../users-roles/cluster-or-deployment-auth/service-accounts.md) token. This attribute is only provided for authentication using a service account token. If the request authentication token is invalid or unparsable, this information might be missing. - - `authentication.token.type` - : Type of the [service account](../../users-roles/cluster-or-deployment-auth/service-accounts.md) token. This attribute is only provided for authentication using a service account token. If the request authentication token is invalid or unparsable, this information might be missing. - -* `realm_authentication_failed`: - - `user.name` - : The name of the user that failed authentication. - - `realm` - : The name of the realm that rejected this authentication. **This event is generated for each consulted realm in the chain.** - -* `run_as_denied` and `run_as_granted`: - - `user.roles` - : The role names as an array of the *authenticated* user which is being granted or denied the *impersonation* action. If authenticated as a [service account](../../users-roles/cluster-or-deployment-auth/service-accounts.md), this is always an empty array. - - `user.name` - : The name of the *authenticated* user which is being granted or denied the *impersonation* action. - - `user.realm` - : The realm name that the *authenticated* user belongs to. - - `user.run_as.name` - : The name of the user as which the *impersonation* action is granted or denied. - - `user.run_as.realm` - : The realm name of that the *impersonated* user belongs to. - -* `access_granted` and `access_denied`: - - `user.roles` - : The role names of the user as an array. If authenticated using an API key, this contains the role names of the API key owner. If authenticated as a [service account](../../users-roles/cluster-or-deployment-auth/service-accounts.md), this is always an empty array. - - `user.name` - : The name of the *effective* user. This is usually the same as the *authenticated* user, but if using the [run as authorization functionality](../../users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users.md) this instead denotes the name of the *impersonated* user. If authenticated using an API key, this is the name of the API key owner. - - `user.realm` - : Name of the realm to which the *effective* user belongs. If authenticated using an API key, this is the name of the realm to which the API key owner belongs. - - `user.run_by.name` - : This attribute is present only if the request is using the [run as authorization functionality](../../users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users.md) and denoted the name of the *authenticated* user, which is also known as the *impersonator*. - - `user.run_by.realm` - : This attribute is present only if the request is using the [run as authorization functionality](../../users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users.md) and denotes the name of the realm that the *authenticated* (*impersonator*) user belongs to. - - `authentication.type` - : Method used to authenticate the user. Possible values are `REALM`, `API_KEY`, `TOKEN`, `ANONYMOUS` or `INTERNAL`. - - `apikey.id` - : API key ID returned by the [create API key](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) request. This attribute is only provided for authentication using an API key. - - `apikey.name` - : API key name provided in the [create API key](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) request. This attribute is only provided for authentication using an API key. - - `authentication.token.name` - : Name of the [service account](../../users-roles/cluster-or-deployment-auth/service-accounts.md) token. This attribute is only provided for authentication using a service account token. - - `authentication.token.type` - : Type of the [service account](../../users-roles/cluster-or-deployment-auth/service-accounts.md) token. This attribute is only provided for authentication using a service account token. diff --git a/deploy-manage/monitor/logging-configuration/enabling-audit-logs-in-orchestrated-deployments.md b/deploy-manage/monitor/logging-configuration/enabling-audit-logs-in-orchestrated-deployments.md deleted file mode 100644 index f2eac00a28..0000000000 --- a/deploy-manage/monitor/logging-configuration/enabling-audit-logs-in-orchestrated-deployments.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -mapped_urls: - - https://www.elastic.co/guide/en/cloud-enterprise/current/ece-enable-auditing.html - - https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s_audit_logging.html - - https://www.elastic.co/guide/en/cloud/current/ec-enable-logging-and-monitoring.html#ec-enable-audit-logs -applies: - hosted: all - ece: all - eck: all ---- - -# Enabling audit logs in orchestrated deployments - -% What needs to be done: Refine - -% GitHub issue: https://github.com/elastic/docs-projects/issues/350 - -% Scope notes: Merge the content and even consider putting everything under a global section that also covers Elasticsearch self-managed - -% Use migrated content from existing pages that map to this page: - -% - [ ] ./raw-migrated-files/cloud/cloud-enterprise/ece-enable-auditing.md -% - [ ] ./raw-migrated-files/cloud-on-k8s/cloud-on-k8s/k8s_audit_logging.md -% - [ ] ./raw-migrated-files/cloud/cloud/ec-enable-logging-and-monitoring.md - -⚠️ **This page is a work in progress.** ⚠️ - -The documentation team is working to combine content pulled from the following pages: - -* [/raw-migrated-files/cloud/cloud-enterprise/ece-enable-auditing.md](/raw-migrated-files/cloud/cloud-enterprise/ece-enable-auditing.md) -* [/raw-migrated-files/cloud-on-k8s/cloud-on-k8s/k8s_audit_logging.md](/raw-migrated-files/cloud-on-k8s/cloud-on-k8s/k8s_audit_logging.md) -* [/raw-migrated-files/cloud/cloud/ec-enable-logging-and-monitoring.md](/raw-migrated-files/cloud/cloud/ec-enable-logging-and-monitoring.md) \ No newline at end of file diff --git a/deploy-manage/monitor/logging-configuration/enabling-audit-logs.md b/deploy-manage/monitor/logging-configuration/enabling-audit-logs.md new file mode 100644 index 0000000000..5ae085e5fe --- /dev/null +++ b/deploy-manage/monitor/logging-configuration/enabling-audit-logs.md @@ -0,0 +1,156 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/reference/current/enable-audit-logging.html + - https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html + - https://www.elastic.co/guide/en/cloud-enterprise/current/ece-enable-auditing.html + - https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s_audit_logging.html + - https://www.elastic.co/guide/en/cloud/current/ec-enable-logging-and-monitoring.html#ec-enable-audit-logs +applies: + hosted: all + ece: all + eck: all + stack: all + serverless: unavailable +--- + +# Enable audit logging [enable-audit-logging] + +::::{important} +Audit logs are only available on certain [subscription levels](https://www.elastic.co/subscriptions). +:::: + +You can log security-related events such as authentication failures and refused connections to monitor your cluster for suspicious activity (including data access authorization and user security configuration changes). Audit logging can be enabled independently for {{es}} and {{kib}}. + +This section describes how to enable and configure audit logging in both {{es}} and {{kib}} for all supported deployment types, including self-managed clusters, {{ech}}, {{ece}} (ECE), and {{eck}} (ECK). + +::::{important} +In orchestrated deployments, audit logs must be shipped to a monitoring deployment; otherwise, they remain at container level and won't be accessible to users. For details on configuring log forwarding in orchestrated environments, refer to [logging configuration](../logging-configuration.md). +:::: + +When audit logging is enabled, security events are persisted to a dedicated `_audit.json` file on the host’s file system, on every cluster node. For more information, refer to [{{es}} logfile audit output](logfile-audit-output.md). + +## Enable audit logging [enable-audit-logging-procedure] + +To enable {{es}} or {{kib}} audit logs, configure `xpack.security.audit.enabled` to `true` in **all {{es}} or {{kib}} nodes**, then restart the nodes to apply the changes. For detailed instructions, select your deployment type: + +::::{note} +Audit logs are disabled by default and must be explicitly enabled. +:::: + + +::::::{tab-set} + +:::::{tab-item} Self-managed + +**To enable audit logging in {{es}}**: + +1. In all nodes, set `xpack.security.audit.enabled` to `true` in `elasticsearch.yml`. +2. Restart the cluster by following the [rolling restart](/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md) procedure. + +**To enable audit logging in {{kib}}**: + +1. Set `xpack.security.audit.enabled` to `true` in `kibana.yml`. +2. Restart {{kib}}. + +::::: + +:::::{tab-item} Elastic Cloud Hosted + + +To enable audit logging in an {{ech}} deployment: + +1. Log in to the [{{ecloud}} Console](https://cloud.elastic.co?page=docs&placement=docs-body). + +2. Find your deployment on the home page in the **Hosted deployments** card and select **Manage** to access it directly. Or, select **Hosted deployments** to go to the deployments page to view all of your deployments. + +3. From your deployment menu, go to the **Edit** page. + +4. To enable auditing for Elasticsearch: + * In the **Elasticsearch** section, select **Manage user settings and extensions**. For deployments with existing user settings, you may have to expand the **Edit elasticsearch.yml** caret for each node instead. + * Add the setting `xpack.security.audit.enabled: true`. + +5. To enable auditing for Kibana: + * In the **Kibana** section, select **Edit user settings**. For deployments with existing user settings, you may have to expand the **Edit kibana.yml** caret instead. + * Add the setting `xpack.security.audit.enabled: true`. + +6. Select **Save changes**. + +A plan change will run on your deployment. When it finishes, audit logs will be delivered to your monitoring deployment. +::::: + +:::::{tab-item} ECE + + +To enable audit logging in an ECE deployment: + +1. [Log in to the Cloud UI](../../deploy/cloud-enterprise/log-into-cloud-ui.md). + +2. On the **Deployments** page, select your deployment. + +3. From your deployment menu, go to the **Edit** page. + +4. To enable auditing for {{es}}: + * In the **Elasticsearch** section, select **Edit user settings and plugins**. For deployments with existing user settings, you may have to expand the **Edit elasticsearch.yml** caret for the first node instead. + * Add the setting `xpack.security.audit.enabled: true`. + +5. To enable auditing for {{kib}}: + * In the **Kibana** section, select **Edit user settings**. For deployments with existing user settings, you may have to expand the **Edit kibana.yml** caret instead. + * Add the setting `xpack.security.audit.enabled: true`. + * If your Elastic Stack version is below 7.6.0, add the setting `logging.quiet: false`. + +6. Select **Save**. + +A plan change will run on your deployment. When it finishes, audit logs will be delivered to your monitoring deployment. +::::: + +:::::{tab-item} ECK + + +To enable audit logging in an ECK-managed cluster, add `xpack.security.audit.enabled: true` to the `config` section of each {{es}} `nodeSet` and to the `config` section of the {{kib}} object's specification. + +The following example shows this configuration, along with together with logs and metrics delivery towards a remote cluster: + +```yaml +apiVersion: elasticsearch.k8s.elastic.co/v1 +kind: Elasticsearch +spec: + monitoring: + metrics: + elasticsearchRefs: + - name: monitoring + namespace: observability + logs: + elasticsearchRefs: + - name: monitoring + namespace: observability + nodeSets: + - name: default + config: + # https://www.elastic.co/guide/en/elasticsearch/reference/current/enable-audit-logging.html + xpack.security.audit.enabled: true +--- +apiVersion: kibana.k8s.elastic.co/v1 +kind: Kibana +spec: + monitoring: + metrics: + elasticsearchRefs: + - name: monitoring + namespace: observability + logs: + elasticsearchRefs: + - name: monitoring + namespace: observability + config: + # https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html + xpack.security.audit.enabled: true +``` + +When enabled, audit logs are collected and shipped to the monitoring cluster referenced in the `monitoring.logs` section. If monitoring is not enabled, audit logs will only be visible at container level. +::::: + +:::::: + +## Next steps + +You can configure additional options to control what events are logged and what information is included in the audit log. For more information, refer to [](./configuring-audit-logs.md). diff --git a/deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md b/deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md deleted file mode 100644 index 462a6ef470..0000000000 --- a/deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/reference/current/enable-audit-logging.html -applies: - hosted: all - ece: all - eck: all - stack: all ---- - -# Enabling elasticsearch audit logs [enable-audit-logging] - -You can log security-related events such as authentication failures and refused connections to monitor your cluster for suspicious activity (including data access authorization and user security configuration changes). - -Audit logging also provides forensic evidence in the event of an attack. - -::::{important} -Audit logs are **disabled** by default. You must explicitly enable audit logging. - -:::: - - -::::{tip} -Audit logs are only available on certain subscription levels. For more information, see {{subscriptions}}. -:::: - - -To enable audit logging: - -1. Set `xpack.security.audit.enabled` to `true` in `elasticsearch.yml`. -2. Restart {{es}}. - -When audit logging is enabled, [security events](elasticsearch-audit-events.md) are persisted to a dedicated `_audit.json` file on the host’s file system, on every cluster node. For more information, see [Logfile audit output](logfile-audit-output.md). - -You can configure additional options to control what events are logged and what information is included in the audit log. For more information, see [Auditing settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html). diff --git a/deploy-manage/monitor/logging-configuration/enabling-kibana-audit-logs.md b/deploy-manage/monitor/logging-configuration/enabling-kibana-audit-logs.md deleted file mode 100644 index f886dfc1fa..0000000000 --- a/deploy-manage/monitor/logging-configuration/enabling-kibana-audit-logs.md +++ /dev/null @@ -1,409 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html -applies: - hosted: all - ece: all - eck: all - stack: all ---- - -# Enabling Kibana audit logs [xpack-security-audit-logging] - -Audit logging is a [subscription feature](https://www.elastic.co/subscriptions) that you can enable to keep track of security-related events, such as authorization success and failures. Logging these events enables you to monitor {{kib}} for suspicious activity and provides evidence in the event of an attack. - -Use the {{kib}} audit logs in conjunction with [{{es}} audit logging](enabling-elasticsearch-audit-logs.md) to get a holistic view of all security related events. {{kib}} defers to the {{es}} security model for authentication, data index authorization, and features that are driven by cluster-wide privileges. For more information on enabling audit logging in {{es}}, refer to [Auditing security events](https://www.elastic.co/guide/en/elasticsearch/reference/current/enable-audit-logging.html). - -::::{note} -Audit logs are **disabled** by default. To enable this functionality, you must set `xpack.security.audit.enabled` to `true` in `kibana.yml`. - -You can optionally configure audit logs location, file/rolling file appenders and ignore filters using [Audit logging settings](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#audit-logging-settings). - -:::: - - -## Audit events [xpack-security-ecs-audit-logging] - -Refer to the table of events that can be logged for auditing purposes. - -Each event is broken down into [category](#field-event-category), [type](#field-event-type), [action](#field-event-action) and [outcome](#field-event-outcome) fields to make it easy to filter, query and aggregate the resulting logs. The [trace.id](#field-trace-id) field can be used to correlate multiple events that originate from the same request. - -Refer to [Audit schema](#xpack-security-ecs-audit-schema) for a table of fields that get logged with audit event. - -::::{note} -To ensure that a record of every operation is persisted even in case of an unexpected error, asynchronous write operations are logged immediately after all authorization checks have passed, but before the response from {{es}} is received. Refer to the corresponding {{es}} logs for potential write errors. - -:::: - - -| | -| --- | -| #### Category: authentication [_category_authentication]


| -| **Action** | **Outcome** | **Description** | -| `user_login` | `success` | User has logged in successfully. | -| `failure` | Failed login attempt (e.g. due to invalid credentials). | -| `user_logout` | `unknown` | User is logging out. | -| `session_cleanup` | `unknown` | Removing invalid or expired session. | -| `access_agreement_acknowledged` | n/a | User has acknowledged the access agreement. | -| #### Category: database [_category_database]

##### Type: creation [_type_creation]



| -| **Action** | **Outcome** | **Description** | -| `saved_object_create` | `unknown` | User is creating a saved object. | -| `failure` | User is not authorized to create a saved object. | -| `saved_object_open_point_in_time` | `unknown` | User is creating a Point In Time to use when querying saved objects. | -| `failure` | User is not authorized to create a Point In Time for the provided saved object types. | -| `connector_create` | `unknown` | User is creating a connector. | -| `failure` | User is not authorized to create a connector. | -| `rule_create` | `unknown` | User is creating a rule. | -| `failure` | User is not authorized to create a rule. | -| `ad_hoc_run_create` | `unknown` | User is creating an ad hoc run. | -| `failure` | User is not authorized to create an ad hoc run. | -| `space_create` | `unknown` | User is creating a space. | -| `failure` | User is not authorized to create a space. | -| `case_create` | `unknown` | User is creating a case. | -| `failure` | User is not authorized to create a case. | -| `case_configuration_create` | `unknown` | User is creating a case configuration. | -| `failure` | User is not authorized to create a case configuration. | -| `case_comment_create` | `unknown` | User is creating a case comment. | -| `failure` | User is not authorized to create a case comment. | -| `case_comment_bulk_create` | `unknown` | User is creating multiple case comments. | -| `failure` | User is not authorized to create multiple case comments. | -| `case_user_action_create_comment` | `success` | User has created a case comment. | -| `case_user_action_create_case` | `success` | User has created a case. | -| `ml_put_ad_job` | `success` | Creating anomaly detection job. | -| `failure` | Failed to create anomaly detection job. | -| `ml_put_ad_datafeed` | `success` | Creating anomaly detection datafeed. | -| `failure` | Failed to create anomaly detection datafeed. | -| `ml_put_calendar` | `success` | Creating calendar. | -| `failure` | Failed to create calendar. | -| `ml_post_calendar_events` | `success` | Adding events to calendar. | -| `failure` | Failed to add events to calendar. | -| `ml_forecast` | `success` | Creating anomaly detection forecast. | -| `failure` | Failed to create anomaly detection forecast. | -| `ml_put_filter` | `success` | Creating filter. | -| `failure` | Failed to create filter. | -| `ml_put_dfa_job` | `success` | Creating data frame analytics job. | -| `failure` | Failed to create data frame analytics job. | -| `ml_put_trained_model` | `success` | Creating trained model. | -| `failure` | Failed to create trained model. | -| `product_documentation_create` | `unknown` | User requested to install the product documentation for use in AI Assistants. | -| `knowledge_base_entry_create` | `success` | User has created knowledge base entry [id=x] | -| `failure` | Failed attempt to create a knowledge base entry | -| `knowledge_base_entry_update` | `success` | User has updated knowledge base entry [id=x] | -| `failure` | Failed attempt to update a knowledge base entry | -| `knowledge_base_entry_delete` | `success` | User has deleted knowledge base entry [id=x] | -| `failure` | Failed attempt to delete a knowledge base entry | -| ##### Type: change [_type_change]


| -| **Action** | **Outcome** | **Description** | -| `saved_object_update` | `unknown` | User is updating a saved object. | -| `failure` | User is not authorized to update a saved object. | -| `saved_object_update_objects_spaces` | `unknown` | User is adding and/or removing a saved object to/from other spaces. | -| `failure` | User is not authorized to add or remove a saved object to or from other spaces. | -| `saved_object_remove_references` | `unknown` | User is removing references to a saved object. | -| `failure` | User is not authorized to remove references to a saved object. | -| `saved_object_collect_multinamespace_references` | `success` | User has accessed references to a multi-space saved object. | -| `failure` | User is not authorized to access references to a multi-space saved object. | -| `connector_update` | `unknown` | User is updating a connector. | -| `failure` | User is not authorized to update a connector. | -| `rule_update` | `unknown` | User is updating a rule. | -| `failure` | User is not authorized to update a rule. | -| `rule_update_api_key` | `unknown` | User is updating the API key of a rule. | -| `failure` | User is not authorized to update the API key of a rule. | -| `rule_enable` | `unknown` | User is enabling a rule. | -| `failure` | User is not authorized to enable a rule. | -| `rule_disable` | `unknown` | User is disabling a rule. | -| `failure` | User is not authorized to disable a rule. | -| `rule_mute` | `unknown` | User is muting a rule. | -| `failure` | User is not authorized to mute a rule. | -| `rule_unmute` | `unknown` | User is unmuting a rule. | -| `failure` | User is not authorized to unmute a rule. | -| `rule_alert_mute` | `unknown` | User is muting an alert. | -| `failure` | User is not authorized to mute an alert. | -| `rule_alert_unmute` | `unknown` | User is unmuting an alert. | -| `failure` | User is not authorized to unmute an alert. | -| `space_update` | `unknown` | User is updating a space. | -| `failure` | User is not authorized to update a space. | -| `alert_update` | `unknown` | User is updating an alert. | -| `failure` | User is not authorized to update an alert. | -| `rule_snooze` | `unknown` | User is snoozing a rule. | -| `failure` | User is not authorized to snooze a rule. | -| `rule_unsnooze` | `unknown` | User is unsnoozing a rule. | -| `failure` | User is not authorized to unsnooze a rule. | -| `case_update` | `unknown` | User is updating a case. | -| `failure` | User is not authorized to update a case. | -| `case_push` | `unknown` | User is pushing a case to an external service. | -| `failure` | User is not authorized to push a case to an external service. | -| `case_configuration_update` | `unknown` | User is updating a case configuration. | -| `failure` | User is not authorized to update a case configuration. | -| `case_comment_update` | `unknown` | User is updating a case comment. | -| `failure` | User is not authorized to update a case comment. | -| `case_user_action_add_case_assignees` | `success` | User has added a case assignee. | -| `case_user_action_update_case_connector` | `success` | User has updated a case connector. | -| `case_user_action_update_case_description` | `success` | User has updated a case description. | -| `case_user_action_update_case_settings` | `success` | User has updated the case settings. | -| `case_user_action_update_case_severity` | `success` | User has updated the case severity. | -| `case_user_action_update_case_status` | `success` | User has updated the case status. | -| `case_user_action_pushed_case` | `success` | User has pushed a case to an external service. | -| `case_user_action_add_case_tags` | `success` | User has added tags to a case. | -| `case_user_action_update_case_title` | `success` | User has updated the case title. | -| `ml_open_ad_job` | `success` | Opening anomaly detection job. | -| `failure` | Failed to open anomaly detection job. | -| `ml_close_ad_job` | `success` | Closing anomaly detection job. | -| `failure` | Failed to close anomaly detection job. | -| `ml_start_ad_datafeed` | `success` | Starting anomaly detection datafeed. | -| `failure` | Failed to start anomaly detection datafeed. | -| `ml_stop_ad_datafeed` | `success` | Stopping anomaly detection datafeed. | -| `failure` | Failed to stop anomaly detection datafeed. | -| `ml_update_ad_job` | `success` | Updating anomaly detection job. | -| `failure` | Failed to update anomaly detection job. | -| `ml_reset_ad_job` | `success` | Resetting anomaly detection job. | -| `failure` | Failed to reset anomaly detection job. | -| `ml_revert_ad_snapshot` | `success` | Reverting anomaly detection snapshot. | -| `failure` | Failed to revert anomaly detection snapshot. | -| `ml_update_ad_datafeed` | `success` | Updating anomaly detection datafeed. | -| `failure` | Failed to update anomaly detection datafeed. | -| `ml_put_calendar_job` | `success` | Adding job to calendar. | -| `failure` | Failed to add job to calendar. | -| `ml_delete_calendar_job` | `success` | Removing job from calendar. | -| `failure` | Failed to remove job from calendar. | -| `ml_update_filter` | `success` | Updating filter. | -| `failure` | Failed to update filter. | -| `ml_start_dfa_job` | `success` | Starting data frame analytics job. | -| `failure` | Failed to start data frame analytics job. | -| `ml_stop_dfa_job` | `success` | Stopping data frame analytics job. | -| `failure` | Failed to stop data frame analytics job. | -| `ml_update_dfa_job` | `success` | Updating data frame analytics job. | -| `failure` | Failed to update data frame analytics job. | -| `ml_start_trained_model_deployment` | `success` | Starting trained model deployment. | -| `failure` | Failed to start trained model deployment. | -| `ml_stop_trained_model_deployment` | `success` | Stopping trained model deployment. | -| `failure` | Failed to stop trained model deployment. | -| `ml_update_trained_model_deployment` | `success` | Updating trained model deployment. | -| `failure` | Failed to update trained model deployment. | -| `product_documentation_update` | `unknown` | User requested to update the product documentation for use in AI Assistants. | -| ##### Type: deletion [_type_deletion]


| -| **Action** | **Outcome** | **Description** | -| `saved_object_delete` | `unknown` | User is deleting a saved object. | -| `failure` | User is not authorized to delete a saved object. | -| `saved_object_close_point_in_time` | `unknown` | User is deleting a Point In Time that was used to query saved objects. | -| `failure` | User is not authorized to delete a Point In Time. | -| `connector_delete` | `unknown` | User is deleting a connector. | -| `failure` | User is not authorized to delete a connector. | -| `rule_delete` | `unknown` | User is deleting a rule. | -| `failure` | User is not authorized to delete a rule. | -| `ad_hoc_run_delete` | `unknown` | User is deleting an ad hoc run. | -| `failure` | User is not authorized to delete an ad hoc run. | -| `space_delete` | `unknown` | User is deleting a space. | -| `failure` | User is not authorized to delete a space. | -| `case_delete` | `unknown` | User is deleting a case. | -| `failure` | User is not authorized to delete a case. | -| `case_comment_delete_all` | `unknown` | User is deleting all comments associated with a case. | -| `failure` | User is not authorized to delete all comments associated with a case. | -| `case_comment_delete` | `unknown` | User is deleting a case comment. | -| `failure` | User is not authorized to delete a case comment. | -| `case_user_action_delete_case_assignees` | `success` | User has removed a case assignee. | -| `case_user_action_delete_comment` | `success` | User has deleted a case comment. | -| `case_user_action_delete_case` | `success` | User has deleted a case. | -| `case_user_action_delete_case_tags` | `success` | User has removed tags from a case. | -| `ml_delete_ad_job` | `success` | Deleting anomaly detection job. | -| `failure` | Failed to delete anomaly detection job. | -| `ml_delete_model_snapshot` | `success` | Deleting model snapshot. | -| `failure` | Failed to delete model snapshot. | -| `ml_delete_ad_datafeed` | `success` | Deleting anomaly detection datafeed. | -| `failure` | Failed to delete anomaly detection datafeed. | -| `ml_delete_calendar` | `success` | Deleting calendar. | -| `failure` | Failed to delete calendar. | -| `ml_delete_calendar_event` | `success` | Deleting calendar event. | -| `failure` | Failed to delete calendar event. | -| `ml_delete_filter` | `success` | Deleting filter. | -| `failure` | Failed to delete filter. | -| `ml_delete_forecast` | `success` | Deleting forecast. | -| `failure` | Failed to delete forecast. | -| `ml_delete_dfa_job` | `success` | Deleting data frame analytics job. | -| `failure` | Failed to delete data frame analytics job. | -| `ml_delete_trained_model` | `success` | Deleting trained model. | -| `failure` | Failed to delete trained model. | -| `product_documentation_delete` | `unknown` | User requested to delete the product documentation for use in AI Assistants. | -| ##### Type: access [_type_access]


| -| **Action** | **Outcome** | **Description** | -| `saved_object_get` | `success` | User has accessed a saved object. | -| `failure` | User is not authorized to access a saved object. | -| `saved_object_resolve` | `success` | User has accessed a saved object. | -| `failure` | User is not authorized to access a saved object. | -| `saved_object_find` | `success` | User has accessed a saved object as part of a search operation. | -| `failure` | User is not authorized to search for saved objects. | -| `connector_get` | `success` | User has accessed a connector. | -| `failure` | User is not authorized to access a connector. | -| `connector_find` | `success` | User has accessed a connector as part of a search operation. | -| `failure` | User is not authorized to search for connectors. | -| `rule_get` | `success` | User has accessed a rule. | -| `failure` | User is not authorized to access a rule. | -| `rule_get_execution_log` | `success` | User has accessed execution log for a rule. | -| `failure` | User is not authorized to access execution log for a rule. | -| `rule_find` | `success` | User has accessed a rule as part of a search operation. | -| `failure` | User is not authorized to search for rules. | -| `rule_schedule_backfill` | `success` | User has accessed a rule as part of a backfill schedule operation. | -| `failure` | User is not authorized to access rule for backfill scheduling. | -| `ad_hoc_run_get` | `success` | User has accessed an ad hoc run. | -| `failure` | User is not authorized to access ad hoc run. | -| `ad_hoc_run_find` | `success` | User has accessed an ad hoc run as part of a search operation. | -| `failure` | User is not authorized to search for ad hoc runs. | -| `space_get` | `success` | User has accessed a space. | -| `failure` | User is not authorized to access a space. | -| `space_find` | `success` | User has accessed a space as part of a search operation. | -| `failure` | User is not authorized to search for spaces. | -| `alert_get` | `success` | User has accessed an alert. | -| `failure` | User is not authorized to access an alert. | -| `alert_find` | `success` | User has accessed an alert as part of a search operation. | -| `failure` | User is not authorized to access alerts. | -| `case_get` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_bulk_get` | `success` | User has accessed multiple cases. | -| `failure` | User is not authorized to access multiple cases. | -| `case_resolve` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_find` | `success` | User has accessed a case as part of a search operation. | -| `failure` | User is not authorized to search for cases. | -| `case_ids_by_alert_id_get` | `success` | User has accessed cases. | -| `failure` | User is not authorized to access cases. | -| `case_get_metrics` | `success` | User has accessed metrics for a case. | -| `failure` | User is not authorized to access metrics for a case. | -| `cases_get_metrics` | `success` | User has accessed metrics for cases. | -| `failure` | User is not authorized to access metrics for cases. | -| `case_configuration_find` | `success` | User has accessed a case configuration as part of a search operation. | -| `failure` | User is not authorized to search for case configurations. | -| `case_comment_get_metrics` | `success` | User has accessed metrics for case comments. | -| `failure` | User is not authorized to access metrics for case comments. | -| `case_comment_alerts_attach_to_case` | `success` | User has accessed case alerts. | -| `failure` | User is not authorized to access case alerts. | -| `case_comment_get` | `success` | User has accessed a case comment. | -| `failure` | User is not authorized to access a case comment. | -| `case_comment_bulk_get` | `success` | User has accessed multiple case comments. | -| `failure` | User is not authorized to access multiple case comments. | -| `case_comment_get_all` | `success` | User has accessed case comments. | -| `failure` | User is not authorized to access case comments. | -| `case_comment_find` | `success` | User has accessed a case comment as part of a search operation. | -| `failure` | User is not authorized to search for case comments. | -| `case_categories_get` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_tags_get` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_reporters_get` | `success` | User has accessed a case. | -| `failure` | User is not authorized to access a case. | -| `case_find_statuses` | `success` | User has accessed a case as part of a search operation. | -| `failure` | User is not authorized to search for cases. | -| `case_user_actions_get` | `success` | User has accessed the user activity of a case. | -| `failure` | User is not authorized to access the user activity of a case. | -| `case_user_actions_find` | `success` | User has accessed the user activity of a case as part of a search operation. | -| `failure` | User is not authorized to access the user activity of a case. | -| `case_user_action_get_metrics` | `success` | User has accessed metrics for the user activity of a case. | -| `failure` | User is not authorized to access metrics for the user activity of a case. | -| `case_user_action_get_users` | `success` | User has accessed the users associated with a case. | -| `failure` | User is not authorized to access the users associated with a case. | -| `case_connectors_get` | `success` | User has accessed the connectors of a case. | -| `failure` | User is not authorized to access the connectors of a case. | -| `ml_infer_trained_model` | `success` | Inferring using trained model. | -| `failure` | Failed to infer using trained model. | -| #### Category: web [_category_web]


| -| **Action** | **Outcome** | **Description** | -| `http_request` | `unknown` | User is making an HTTP request. | - - -## Audit schema [xpack-security-ecs-audit-schema] - -Audit logs are written in JSON using [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs/1.6/index.html) specification. - -| | -| --- | -| #### Base Fields [_base_fields]


| -| **Field** | **Description** | -| `@timestamp` | Time when the event was generated.
Example: `2016-05-23T08:05:34.853Z` | -| `message` | Human readable description of the event. | -| #### Event Fields [_event_fields]


| -| **Field** | **Description** | -| $$$field-event-action$$$ `event.action` | The action captured by the event.
Refer to [Audit events](#xpack-security-ecs-audit-logging) for a table of possible actions. | -| $$$field-event-category$$$ `event.category` | High level category associated with the event.
This field is closely related to `event.type`, which is used as a subcategory.
Possible values:`database`,`web`,`authentication` | -| $$$field-event-type$$$ `event.type` | Subcategory associated with the event.
This field can be used along with the `event.category` field to enable filtering events down to a level appropriate for single visualization.
Possible values:`creation`,`access`,`change`,`deletion` | -| $$$field-event-outcome$$$ `event.outcome` | Denotes whether the event represents a success or failure:

* Any actions that the user is not authorized to perform are logged with outcome: `failure`
* Authorized read operations are only logged after successfully fetching the data from {{es}} with outcome: `success`
* Authorized create, update, or delete operations are logged before attempting the operation in {{es}} with outcome: `unknown`

Possible values: `success`, `failure`, `unknown`
| -| #### User Fields [_user_fields]


| -| **Field** | **Description** | -| `user.id` | Unique identifier of the user across sessions (See [user profiles](../../users-roles/cluster-or-deployment-auth/user-profiles.md)). | -| `user.name` | Login name of the user.
Example: `jdoe` | -| `user.roles[]` | Set of user roles at the time of the event.
Example: `[kibana_admin, reporting_user]` | -| #### Kibana Fields [_kibana_fields]


| -| **Field** | **Description** | -| `kibana.space_id` | ID of the space associated with the event.
Example: `default` | -| `kibana.session_id` | ID of the user session associated with the event.
Each login attempt results in a unique session id. | -| `kibana.saved_object.type` | Type of saved object associated with the event.
Example: `dashboard` | -| `kibana.saved_object.id` | ID of the saved object associated with the event. | -| `kibana.authentication_provider` | Name of the authentication provider associated with the event.
Example: `my-saml-provider` | -| `kibana.authentication_type` | Type of the authentication provider associated with the event.
Example: `saml` | -| `kibana.authentication_realm` | Name of the Elasticsearch realm that has authenticated the user.
Example: `native` | -| `kibana.lookup_realm` | Name of the Elasticsearch realm where the user details were retrieved from.
Example: `native` | -| `kibana.add_to_spaces[]` | Set of space IDs that a saved object is being shared to as part of the event.
Example: `[default, marketing]` | -| `kibana.delete_from_spaces[]` | Set of space IDs that a saved object is being removed from as part of the event.
Example: `[marketing]` | -| #### Error Fields [_error_fields]


| -| **Field** | **Description** | -| `error.code` | Error code describing the error. | -| `error.message` | Error message. | -| #### HTTP and URL Fields [_http_and_url_fields]


| -| **Field** | **Description** | -| `client.ip` | Client IP address. | -| `http.request.method` | HTTP request method.
Example: `get`, `post`, `put`, `delete` | -| `http.request.headers.x-forwarded-for` | `X-Forwarded-For` request header used to identify the originating client IP address when connecting through proxy servers.
Example: `161.66.20.177, 236.198.214.101` | -| `url.domain` | Domain of the URL.
Example: `www.elastic.co` | -| `url.path` | Path of the request.
Example: `/search` | -| `url.port` | Port of the request.
Example: `443` | -| `url.query` | The query field describes the query string of the request.
Example: `q=elasticsearch` | -| `url.scheme` | Scheme of the request.
Example: `https` | -| #### Tracing Fields [_tracing_fields]


| -| **Field** | **Description** | -| $$$field-trace-id$$$ `trace.id` | Unique identifier allowing events of the same transaction from {{kib}} and {{es}} to be correlated. | - - -## Correlating audit events [xpack-security-ecs-audit-correlation] - -Audit events can be correlated in two ways: - -1. Multiple {{kib}} audit events that resulted from the same request can be correlated together. -2. If [{{es}} audit logging](enabling-elasticsearch-audit-logs.md) is enabled, {{kib}} audit events from one request can be correlated with backend calls that create {{es}} audit events. - -::::{note} -The examples below are simplified, many fields have been omitted and values have been shortened for clarity. -:::: - - -### Example 1: correlating multiple {{kib}} audit events [_example_1_correlating_multiple_kib_audit_events] - -When "thom" creates a new alerting rule, five audit events are written: - -```json -{"event":{"action":"http_request","category":["web"],"outcome":"unknown"},"http":{"request":{"method":"post"}},"url":{"domain":"localhost","path":"/api/alerting/rule","port":5601,"scheme":"https"},"user":{"name":"thom","roles":["superuser"]},"kibana":{"space_id":"default","session_id":"3dHCZRB..."},"@timestamp":"2022-01-25T13:05:34.449-05:00","message":"User is requesting [/api/alerting/rule] endpoint","trace":{"id":"e300e06..."}} -{"event":{"action":"space_get","category":["database"],"type":["access"],"outcome":"success"},"kibana":{"space_id":"default","session_id":"3dHCZRB...","saved_object":{"type":"space","id":"default"}},"user":{"name":"thom","roles":["superuser"]},"@timestamp":"2022-01-25T13:05:34.454-05:00","message":"User has accessed space [id=default]","trace":{"id":"e300e06..."}} -{"event":{"action":"connector_get","category":["database"],"type":["access"],"outcome":"success"},"kibana":{"space_id":"default","session_id":"3dHCZRB...","saved_object":{"type":"action","id":"5e3b1ae..."}},"user":{"name":"thom","roles":["superuser"]},"@timestamp":"2022-01-25T13:05:34.948-05:00","message":"User has accessed connector [id=5e3b1ae...]","trace":{"id":"e300e06..."}} -{"event":{"action":"connector_get","category":["database"],"type":["access"],"outcome":"success"},"kibana":{"space_id":"default","session_id":"3dHCZRB...","saved_object":{"type":"action","id":"5e3b1ae..."}},"user":{"name":"thom","roles":["superuser"]},"@timestamp":"2022-01-25T13:05:34.956-05:00","message":"User has accessed connector [id=5e3b1ae...]","trace":{"id":"e300e06..."}} -{"event":{"action":"rule_create","category":["database"],"type":["creation"],"outcome":"unknown"},"kibana":{"space_id":"default","session_id":"3dHCZRB...","saved_object":{"type":"alert","id":"64517c3..."}},"user":{"name":"thom","roles":["superuser"]},"@timestamp":"2022-01-25T13:05:34.956-05:00","message":"User is creating rule [id=64517c3...]","trace":{"id":"e300e06..."}} -``` - -All of these audit events can be correlated together by the same `trace.id` value `"e300e06..."`. The first event is the HTTP API call, the next audit events are checks to validate the space and the connectors, and the last audit event is the actual rule creation. - - -### Example 2: correlating a {{kib}} audit event with {{es}} audit events [_example_2_correlating_a_kib_audit_event_with_es_audit_events] - -When "thom" logs in, a "user_login" {{kib}} audit event is written: - -```json -{"event":{"action":"user_login","category":["authentication"],"outcome":"success"},"kibana":{"session_id":"ab93zdA..."},"user":{"name":"thom","roles":["superuser"]},"@timestamp":"2022-01-25T09:40:39.267-05:00","message":"User [thom] has logged in using basic provider [name=basic]","trace":{"id":"818cbf3..."}} -``` - -The `trace.id` value `"818cbf3..."` in the {{kib}} audit event can be correlated with the `opaque_id` value in these six {{es}} audit events: - -```json -{"type":"audit", "timestamp":"2022-01-25T09:40:38,604-0500", "event.action":"access_granted", "user.name":"thom", "user.roles":["superuser"], "request.id":"YCx8wxs...", "action":"cluster:admin/xpack/security/user/authenticate", "request.name":"AuthenticateRequest", "opaque_id":"818cbf3..."} -{"type":"audit", "timestamp":"2022-01-25T09:40:38,613-0500", "event.action":"access_granted", "user.name":"kibana_system", "user.roles":["kibana_system"], "request.id":"Ksx73Ad...", "action":"indices:data/write/index", "request.name":"IndexRequest", "indices":[".kibana_security_session_1"], "opaque_id":"818cbf3..."} -{"type":"audit", "timestamp":"2022-01-25T09:40:38,613-0500", "event.action":"access_granted", "user.name":"kibana_system", "user.roles":["kibana_system"], "request.id":"Ksx73Ad...", "action":"indices:data/write/bulk", "request.name":"BulkRequest", "opaque_id":"818cbf3..."} -{"type":"audit", "timestamp":"2022-01-25T09:40:38,613-0500", "event.action":"access_granted", "user.name":"kibana_system", "user.roles":["kibana_system"], "request.id":"Ksx73Ad...", "action":"indices:data/write/bulk[s]", "request.name":"BulkShardRequest", "indices":[".kibana_security_session_1"], "opaque_id":"818cbf3..."} -{"type":"audit", "timestamp":"2022-01-25T09:40:38,613-0500", "event.action":"access_granted", "user.name":"kibana_system", "user.roles":["kibana_system"], "request.id":"Ksx73Ad...", "action":"indices:data/write/index:op_type/create", "request.name":"BulkItemRequest", "indices":[".kibana_security_session_1"], "opaque_id":"818cbf3..."} -{"type":"audit", "timestamp":"2022-01-25T09:40:38,613-0500", "event.action":"access_granted", "user.name":"kibana_system", "user.roles":["kibana_system"], "request.id":"Ksx73Ad...", "action":"indices:data/write/bulk[s][p]", "request.name":"BulkShardRequest", "indices":[".kibana_security_session_1"], "opaque_id":"818cbf3..."} -``` - -The {{es}} audit events show that "thom" authenticated, then subsequently "kibana_system" created a session for that user. diff --git a/deploy-manage/monitor/logging-configuration/logfile-audit-events-ignore-policies.md b/deploy-manage/monitor/logging-configuration/logfile-audit-events-ignore-policies.md index f7a164d4e4..61a41f98ba 100644 --- a/deploy-manage/monitor/logging-configuration/logfile-audit-events-ignore-policies.md +++ b/deploy-manage/monitor/logging-configuration/logfile-audit-events-ignore-policies.md @@ -1,4 +1,5 @@ --- +navigation_title: Elasticsearch audit events ignore policies mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/audit-log-ignore-policy.html applies: @@ -6,13 +7,14 @@ applies: ece: all eck: all stack: all + serverless: unavailable --- -# Logfile audit events ignore policies [audit-log-ignore-policy] +# Elasticsearch audit events ignore policies [audit-log-ignore-policy] The comprehensive audit trail is necessary to ensure accountability. It offers tremendous value during incident response and can even be required for demonstrating compliance. -The drawback of an audited system is represented by the inevitable performance penalty incurred. In all truth, the audit trail spends *I/O ops* that are not available anymore for the user’s queries. Sometimes the verbosity of the audit trail may become a problem that the event type restrictions, [defined by `include` and `exclude`](logfile-audit-output.md#audit-log-settings), will not alleviate. +The drawback of an audited system is represented by the inevitable performance penalty incurred. In all truth, the audit trail spends *I/O ops* that are not available anymore for the user’s queries. Sometimes the verbosity of the audit trail may become a problem that the event type restrictions, [defined by `include` and `exclude`](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#event-audit-settings), will not alleviate. **Audit events ignore policies** are a finer way to tune the verbosity of the audit trail. These policies define rules that match audit events which will be *ignored* (read as: not printed). Rules match on the values of attributes of audit events and complement the `include` or `exclude` method. Imagine the corpus of audit events and the policies chopping off unwanted events. With a sole exception, all audit events are subject to the ignore policies. The exception are events of type `security_config_change`, which cannot be filtered out, unless excluded altogether. @@ -20,7 +22,6 @@ The drawback of an audited system is represented by the inevitable performance p When utilizing audit events ignore policies you are acknowledging potential accountability gaps that could render illegitimate actions undetectable. Please take time to review these policies whenever your system architecture changes. :::: - A policy is a named set of filter rules. Each filter rule applies to a single event attribute, one of the `users`, `realms`, `actions`, `roles` or `indices` attributes. The filter rule defines a list of [Lucene regexp](https://www.elastic.co/guide/en/elasticsearch/reference/current/regexp-syntax.html), **any** of which has to match the value of the audit event attribute for the rule to match. A policy matches an event if **all** the rules comprising it match the event. An audit event is ignored, therefore not printed, if it matches **any** policy. All other non-matching events are printed as usual. All policies are defined under the `xpack.security.audit.logfile.events.ignore_filters` settings namespace. For example, the following policy named *example1* matches events from the *kibana_system* or *admin_user* principals that operate over indices of the wildcard form *app-logs**: @@ -34,7 +35,7 @@ xpack.security.audit.logfile.events.ignore_filters: An audit event generated by the *kibana_system* user and operating over multiple indices , some of which do not match the indices wildcard, will not match. As expected, operations generated by all other users (even operating only on indices that match the *indices* filter) will not match this policy either. -Audit events of different types may have [different attributes](elasticsearch-audit-events.md#audit-event-attributes). If an event does not contain an attribute for which some policy defines filters, the event will not match the policy. For example, the following policy will never match `authentication_success` or `authentication_failed` events, irrespective of the user’s roles, because these event schemas do not contain the `role` attribute: +Audit events of different types may have [different attributes]() asciidocalypse://elasticsearch/docs/reference/elasticsearch/elasticsearch-audit-events/#audit-event-attributes. If an event does not contain an attribute for which some policy defines filters, the event will not match the policy. For example, the following policy will never match `authentication_success` or `authentication_failed` events, irrespective of the user’s roles, because these event schemas do not contain the `role` attribute: ```yaml xpack.security.audit.logfile.events.ignore_filters: diff --git a/deploy-manage/monitor/logging-configuration/logfile-audit-output.md b/deploy-manage/monitor/logging-configuration/logfile-audit-output.md index 6ee7bbf238..dee12a2559 100644 --- a/deploy-manage/monitor/logging-configuration/logfile-audit-output.md +++ b/deploy-manage/monitor/logging-configuration/logfile-audit-output.md @@ -1,4 +1,5 @@ --- +navigation_title: Elasticsearch logfile output mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/audit-log-output.html applies: @@ -6,21 +7,24 @@ applies: ece: all eck: all stack: all + serverless: unavailable --- -% evaluate the applies section +# Elasticsearch logfile audit output [audit-log-output] -# Logfile audit output [audit-log-output] +The `logfile` audit output is the only output for auditing. By default, it writes data to the `_audit.json` file in the logs directory. The file is also rotated and archived daily or upon reaching the 1GB file size limit. -The `logfile` audit output is the only output for auditing. It writes data to the `_audit.json` file in the logs directory. +In self-managed clusters, you can configure how the `logfile` is written in the `log4j2.properties` file located in `ES_PATH_CONF` (or check out the relevant portion of the [log4j2.properties in the sources](https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/config/log4j2.properties)). However, **Elastic strongly recommends using the default Log4j2 configuration**. + +Orchestrated deployments (ECH, ECE, and ECK) do not support changes in `log4j2.properties` files of the {{es}} instances. ::::{note} If you overwrite the `log4j2.properties` and do not specify appenders for any of the audit trails, audit events are forwarded to the root appender, which by default points to the `elasticsearch.log` file. :::: +For {{es}} configuration options that control event filtering in audit logs, refer to [](./configuring-audit-logs.md). - -## Log entry format [audit-log-entry-format] +## Log entry format [audit-log-entry-format] The audit events are formatted as JSON documents, and each event is printed on a separate line in the `_audit.json` file. The entries themselves do not contain the end-of-line delimiter. The audit event JSON format is somewhat particular, as **most** fields follow a dotted name syntax, are ordered, and contain non-null string values. This format creates a structured columnar aspect, similar to a CSV, that can be more easily inspected visually (compared to an equivalent nested JSON document). @@ -28,17 +32,4 @@ There are however a few attributes that are exceptions to the above format. The When the `request.body` attribute is present (see [Auditing search queries](auditing-search-queries.md)), it contains a string value containing the full HTTP request body, escaped as per the JSON RFC 4677. -There is a list of [audit event types](elasticsearch-audit-events.md) specifying the set of fields, as well as examples, for each entry type. - - -## Logfile output settings [audit-log-settings] - -The events and some other information about what gets logged can be controlled using settings in the `elasticsearch.yml` file. See [Audited Event Settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#event-audit-settings) and [Local Node Info Settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html#node-audit-settings). - -::::{important} -Be advised that **sensitive data may be audited in plain text** when including the request body in audit events, even though all the security APIs, such as those that change the user’s password, have the credentials filtered out when audited. -:::: - - -You can also configure how the logfile is written in the `log4j2.properties` file located in `ES_PATH_CONF` (or check out the relevant portion of the [log4j2.properties in the sources](https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/config/log4j2.properties)). By default, audit information is appended to the `_audit.json` file located in the standard Elasticsearch `logs` directory (typically located at `$ES_HOME/logs`). The file is also rotated and archived daily or upon reaching the 1GB file size limit. - +Refer to [audit event types]() (asciidocalypse://elasticsearch/docs/reference/elasticsearch/elasticsearch-audit-events) for a complete list of fields, as well as examples, for each entry type. \ No newline at end of file diff --git a/deploy-manage/monitor/logging-configuration/security-event-audit-logging.md b/deploy-manage/monitor/logging-configuration/security-event-audit-logging.md index 71f489ef9b..ab8a988786 100644 --- a/deploy-manage/monitor/logging-configuration/security-event-audit-logging.md +++ b/deploy-manage/monitor/logging-configuration/security-event-audit-logging.md @@ -4,13 +4,33 @@ applies: ece: all eck: all stack: all + serverless: unavailable --- # Security event audit logging -% What needs to be done: Write from scratch +::::{important} +Audit logs are only available on certain [subscription levels](https://www.elastic.co/subscriptions). +:::: -% GitHub issue: https://github.com/elastic/docs-projects/issues/350 +Audit logging is a powerful feature that helps you monitor and track security-related events within the {{stack}}. By enabling audit logs, you can gain visibility into authentication attempts, authorization decisions, and other system activity. -% Scope notes: Landing page about audit logs in Kibana and Elasticsearch, explaining how they can be enabled and configured, and also linking to the page about correlating information. We can create a doc to explain how to enable audit logging in both Elasticsearch and Kibana, and considering also ECE and orchestrated deployments. Kibana audit events list should be moved to reference content. +Audit logging also provides forensic evidence in the event of an attack, and can be enabled independently for {{es}} and {{kib}}. -⚠️ **This page is a work in progress.** ⚠️ \ No newline at end of file +Use the {{kib}} audit logs in conjunction with {{es}} audit logging to get a holistic view of all security related events. {{kib}} defers to the {{es}} security model for authentication, data index authorization, and features that are driven by cluster-wide privileges. + +In this section, you'll learn how to: + +* [](./enabling-audit-logs.md): Activate {{es}} or {{kib}} audit logs for all supported deployment types. + +* [](./configuring-audit-logs.md): Filter and control what security events get logged in the audit log output. + +* [Audit {{es}} search queries](./auditing-search-queries.md): Audit and log search request bodies. + +* [Correlate audit events](./correlating-kibana-elasticsearch-audit-logs.md): Explore audit logs and understand how events from the same request are correlated. + +By following these guidelines, you can effectively audit system activity, enhance security monitoring, and meet compliance requirements. + +For a complete description of audit event details and format, refer to: + +* [Elasticsearch audit events]() asciidocalypse://elasticsearch/docs/reference/elasticsearch/elasticsearch-audit-events +* [Kibana audit events]() asciidocalypse://kibana/docs/reference/kibana-audit-events diff --git a/deploy-manage/monitor/stack-monitoring/ece-stack-monitoring.md b/deploy-manage/monitor/stack-monitoring/ece-stack-monitoring.md index 9c5d7ce9ac..4f1be782c0 100644 --- a/deploy-manage/monitor/stack-monitoring/ece-stack-monitoring.md +++ b/deploy-manage/monitor/stack-monitoring/ece-stack-monitoring.md @@ -180,7 +180,7 @@ When shipping logs to a monitoring deployment there are more logging features av #### For {{es}}: [ece-extra-logging-features-elasticsearch] -* [Audit logging](../logging-configuration/enabling-elasticsearch-audit-logs.md) - logs security-related events on your deployment +* [Audit logging](../logging-configuration/enabling-audit-logs.md) - logs security-related events on your deployment * [Slow query and index logging](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-slowlog.html) - helps find and debug slow queries and indexing * Verbose logging - helps debug stack issues by increasing component logs @@ -189,7 +189,7 @@ After you’ve enabled log delivery on your deployment, you can [add the Elastic #### For Kibana: [ece-extra-logging-features-kibana] -* [Audit logging](../logging-configuration/enabling-kibana-audit-logs.md) - logs security-related events on your deployment +* [Audit logging](../logging-configuration/enabling-audit-logs.md) - logs security-related events on your deployment After you’ve enabled log delivery on your deployment, you can [add the Kibana user settings](../../deploy/cloud-enterprise/edit-stack-settings.md) to enable this feature. diff --git a/deploy-manage/toc.yml b/deploy-manage/toc.yml index 15ef9b9e0e..d54232ee1c 100644 --- a/deploy-manage/toc.yml +++ b/deploy-manage/toc.yml @@ -766,14 +766,12 @@ toc: - file: monitor/logging-configuration/kibana-logging-cli-configuration.md - file: monitor/logging-configuration/security-event-audit-logging.md children: - - file: monitor/logging-configuration/enabling-elasticsearch-audit-logs.md + - file: monitor/logging-configuration/enabling-audit-logs.md + - file: monitor/logging-configuration/configuring-audit-logs.md children: - - file: monitor/logging-configuration/elasticsearch-audit-events.md - - file: monitor/logging-configuration/logfile-audit-output.md - file: monitor/logging-configuration/logfile-audit-events-ignore-policies.md - - file: monitor/logging-configuration/auditing-search-queries.md - - file: monitor/logging-configuration/enabling-kibana-audit-logs.md - - file: monitor/logging-configuration/enabling-audit-logs-in-orchestrated-deployments.md + - file: monitor/logging-configuration/logfile-audit-output.md + - file: monitor/logging-configuration/auditing-search-queries.md - file: monitor/logging-configuration/correlating-kibana-elasticsearch-audit-logs.md - file: cloud-organization.md children: diff --git a/deploy-manage/users-roles/cluster-or-deployment-auth/internal-users.md b/deploy-manage/users-roles/cluster-or-deployment-auth/internal-users.md index 41c9fe1bb1..42f2a3785a 100644 --- a/deploy-manage/users-roles/cluster-or-deployment-auth/internal-users.md +++ b/deploy-manage/users-roles/cluster-or-deployment-auth/internal-users.md @@ -14,5 +14,5 @@ The {{stack-security-features}} use eight *internal* users (`_system`, `_xpack`, These users are only used by requests that originate from within the cluster. For this reason, they cannot be used to authenticate against the API and there is no password to manage or reset. -From time-to-time you may find a reference to one of these users inside your logs, including [audit logs](../../monitor/logging-configuration/enabling-elasticsearch-audit-logs.md). +From time-to-time you may find a reference to one of these users inside your logs, including [audit logs](../../monitor/logging-configuration/enabling-audit-logs.md). diff --git a/get-started/introduction.md b/get-started/introduction.md index e0af00a993..b39e5479c2 100644 --- a/get-started/introduction.md +++ b/get-started/introduction.md @@ -129,7 +129,7 @@ The {{kib}} role management interface allows you to describe these various acces ### Audit access [_audit_access] -Once you have your users and roles configured, you might want to maintain a record of who did what, when. The {{kib}} audit log will record this information for you, which can then be correlated with {{es}} audit logs to gain more insights into your users’ behavior. For more information, refer to [{{kib}} audit logging](../deploy-manage/monitor/logging-configuration/enabling-kibana-audit-logs.md). +Once you have your users and roles configured, you might want to maintain a record of who did what, when. The {{kib}} audit log will record this information for you, which can then be correlated with {{es}} audit logs to gain more insights into your users’ behavior. For more information, refer to [{{kib}} audit logging](/deploy-manage/monitor/logging-configuration/enabling-audit-logs.md). ## Find apps and objects [kibana-navigation-search] diff --git a/manage-data/ingest/ingesting-data-from-applications/ingest-data-with-nodejs-on-elasticsearch-service.md b/manage-data/ingest/ingesting-data-from-applications/ingest-data-with-nodejs-on-elasticsearch-service.md index eec6274cfd..81f0643e4e 100644 --- a/manage-data/ingest/ingesting-data-from-applications/ingest-data-with-nodejs-on-elasticsearch-service.md +++ b/manage-data/ingest/ingesting-data-from-applications/ingest-data-with-nodejs-on-elasticsearch-service.md @@ -290,7 +290,7 @@ const client = new Client({ }) ``` -Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on {{ech}} or {{ece}}, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). +Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on {{ech}} or {{ece}}, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). ### Best practices [ec_best_practices] diff --git a/manage-data/ingest/ingesting-data-from-applications/ingest-data-with-python-on-elasticsearch-service.md b/manage-data/ingest/ingesting-data-from-applications/ingest-data-with-python-on-elasticsearch-service.md index 1895bd3e0a..0349583259 100644 --- a/manage-data/ingest/ingesting-data-from-applications/ingest-data-with-python-on-elasticsearch-service.md +++ b/manage-data/ingest/ingesting-data-from-applications/ingest-data-with-python-on-elasticsearch-service.md @@ -351,7 +351,7 @@ es = Elasticsearch( ) ``` -Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on {{ech}} or {{ece}}, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). +Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on {{ech}} or {{ece}}, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). For more information on refreshing an index, searching, updating, and deleting, check the [elasticsearch-py examples](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/examples.html). diff --git a/raw-migrated-files/cloud-on-k8s/cloud-on-k8s/k8s_audit_logging.md b/raw-migrated-files/cloud-on-k8s/cloud-on-k8s/k8s_audit_logging.md deleted file mode 100644 index 59dcab17b6..0000000000 --- a/raw-migrated-files/cloud-on-k8s/cloud-on-k8s/k8s_audit_logging.md +++ /dev/null @@ -1,40 +0,0 @@ -# Audit logging [k8s_audit_logging] - -Audit logs are collected and shipped to the monitoring cluster referenced in the `monitoring.logs` section when audit logging is enabled (it is disabled by default). - -```yaml -apiVersion: elasticsearch.k8s.elastic.co/v1 -kind: Elasticsearch -spec: - monitoring: - metrics: - elasticsearchRefs: - - name: monitoring - namespace: observability - logs: - elasticsearchRefs: - - name: monitoring - namespace: observability - nodeSets: - - name: default - config: - # https://www.elastic.co/guide/en/elasticsearch/reference/current/enable-audit-logging.html - xpack.security.audit.enabled: true ---- -apiVersion: kibana.k8s.elastic.co/v1 -kind: Kibana -spec: - monitoring: - metrics: - elasticsearchRefs: - - name: monitoring - namespace: observability - logs: - elasticsearchRefs: - - name: monitoring - namespace: observability - config: - # https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html - xpack.security.audit.enabled: true -``` - diff --git a/raw-migrated-files/cloud/cloud-enterprise/ece-enable-auditing.md b/raw-migrated-files/cloud/cloud-enterprise/ece-enable-auditing.md deleted file mode 100644 index 7d5fda5314..0000000000 --- a/raw-migrated-files/cloud/cloud-enterprise/ece-enable-auditing.md +++ /dev/null @@ -1,33 +0,0 @@ -# Enable auditing [ece-enable-auditing] - -With auditing enabled you can keep track of security-related events, such as successful and unsuccessful authorization attempts on the cluster. In Elastic Cloud Enterprise, to get audit events for both Elasticsearch and Kibana, you need to enable auditing for each component separately. - -To enable auditing for Elasticsearch: - -1. [Log into the Cloud UI](../../../deploy-manage/deploy/cloud-enterprise/log-into-cloud-ui.md). -2. On the **Deployments** page, select your deployment. - - Narrow the list by name, ID, or choose from several other filters. To further define the list, use a combination of filters. - -3. From your deployment menu, go to the **Edit** page. -4. In the **Elasticsearch** section, select **Edit user settings and plugins**. For deployments with existing user settings, you may have to expand the **Edit elasticsearch.yml** caret for the first node instead. -5. Add the setting `xpack.security.audit.enabled: true`. -6. Select **Save**. - -For more information and other available auditing settings in Elasticsearch, check [Auditing security settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-settings.html). Audit logs can be viewed within Elasticsearch logs. - -To enable auditing for Kibana: - -1. [Log into the Cloud UI](../../../deploy-manage/deploy/cloud-enterprise/log-into-cloud-ui.md). -2. On the **Deployments** page, select your deployment. - - Narrow the list by name, ID, or choose from several other filters. To further define the list, use a combination of filters. - -3. From your deployment menu, go to the **Edit** page. -4. In the **Kibana** section, select **Edit user settings**. For deployments with existing user settings, you may have to expand the **Edit kibana.yml** caret instead. -5. Add the setting `xpack.security.audit.enabled: true`. -6. If your Elastic Stack version is below 7.6.0, add the setting `logging.quiet: false`. -7. Select **Save**. - -For more information about audit logging in Kibana, check [Audit Logging](https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html). - diff --git a/raw-migrated-files/cloud/cloud-enterprise/ece-getting-started-node-js.md b/raw-migrated-files/cloud/cloud-enterprise/ece-getting-started-node-js.md index fa1faee689..8a9b99e67a 100644 --- a/raw-migrated-files/cloud/cloud-enterprise/ece-getting-started-node-js.md +++ b/raw-migrated-files/cloud/cloud-enterprise/ece-getting-started-node-js.md @@ -280,8 +280,7 @@ const client = new Client({ }) ``` -Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on Elastic Cloud Enterprise, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). - +Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on {{ece}}, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). ### Best practices [ece_best_practices] diff --git a/raw-migrated-files/cloud/cloud-enterprise/ece-getting-started-python.md b/raw-migrated-files/cloud/cloud-enterprise/ece-getting-started-python.md index bcae4285df..3f0efc5a95 100644 --- a/raw-migrated-files/cloud/cloud-enterprise/ece-getting-started-python.md +++ b/raw-migrated-files/cloud/cloud-enterprise/ece-getting-started-python.md @@ -340,7 +340,7 @@ es = Elasticsearch( ) ``` -Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on Elastic Cloud Enterprise, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). +Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on {{ece}}, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). For more information on refreshing an index, searching, updating, and deleting, check the [elasticsearch-py examples](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/examples.html). diff --git a/raw-migrated-files/cloud/cloud-heroku/ech-enable-logging-and-monitoring.md b/raw-migrated-files/cloud/cloud-heroku/ech-enable-logging-and-monitoring.md index df7ee6c623..2fdc3f58f2 100644 --- a/raw-migrated-files/cloud/cloud-heroku/ech-enable-logging-and-monitoring.md +++ b/raw-migrated-files/cloud/cloud-heroku/ech-enable-logging-and-monitoring.md @@ -172,7 +172,7 @@ When shipping logs to a monitoring deployment there are more logging features av #### For {{es}}: [ech-extra-logging-features-elasticsearch] -* [Audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) - logs security-related events on your deployment +* [Audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) - logs security-related events on your deployment * [Slow query and index logging](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-slowlog.html) - helps find and debug slow queries and indexing * Verbose logging - helps debug stack issues by increasing component logs @@ -181,7 +181,7 @@ After you’ve enabled log delivery on your deployment, you can [add the Elastic #### For Kibana: [ech-extra-logging-features-kibana] -* [Audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-kibana-audit-logs.md) - logs security-related events on your deployment +* [Audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) - logs security-related events on your deployment After you’ve enabled log delivery on your deployment, you can [add the Kibana user settings](../../../deploy-manage/deploy/elastic-cloud/edit-stack-settings.md) to enable this feature. diff --git a/raw-migrated-files/cloud/cloud/ec-enable-logging-and-monitoring.md b/raw-migrated-files/cloud/cloud/ec-enable-logging-and-monitoring.md index 1b8f272e5a..8ce1480bfc 100644 --- a/raw-migrated-files/cloud/cloud/ec-enable-logging-and-monitoring.md +++ b/raw-migrated-files/cloud/cloud/ec-enable-logging-and-monitoring.md @@ -172,7 +172,7 @@ When shipping logs to a monitoring deployment there are more logging features av #### For {{es}}: [ec-extra-logging-features-elasticsearch] -* [Audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) - logs security-related events on your deployment +* [Audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) - logs security-related events on your deployment * [Slow query and index logging](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-slowlog.html) - helps find and debug slow queries and indexing * Verbose logging - helps debug stack issues by increasing component logs @@ -181,7 +181,7 @@ After you’ve enabled log delivery on your deployment, you can [add the Elastic #### For Kibana: [ec-extra-logging-features-kibana] -* [Audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-kibana-audit-logs.md) - logs security-related events on your deployment +* [Audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) - logs security-related events on your deployment After you’ve enabled log delivery on your deployment, you can [add the Kibana user settings](../../../deploy-manage/deploy/elastic-cloud/edit-stack-settings.md) to enable this feature. @@ -210,6 +210,7 @@ With logging and monitoring enabled for a deployment, metrics are collected for #### Enabling Elasticsearch/Kibana audit logs on your deployment [ec-enable-audit-logs] +% Added by eedugon to audit logging in deploy and manage -> monitoring -> logging section Audit logs are useful for tracking security events on your {{es}} and/or {{kib}} clusters. To enable {{es}} audit logs on your deployment: diff --git a/raw-migrated-files/cloud/cloud/ec-getting-started-node-js.md b/raw-migrated-files/cloud/cloud/ec-getting-started-node-js.md index a3f3ac7cb2..7f0d0eb304 100644 --- a/raw-migrated-files/cloud/cloud/ec-getting-started-node-js.md +++ b/raw-migrated-files/cloud/cloud/ec-getting-started-node-js.md @@ -272,7 +272,7 @@ const client = new Client({ }) ``` -Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on Elasticsearch Service, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). +Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on {{ech}}, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). ### Best practices [ec_best_practices] diff --git a/raw-migrated-files/cloud/cloud/ec-getting-started-python.md b/raw-migrated-files/cloud/cloud/ec-getting-started-python.md index 210c7e2edc..616f2830ce 100644 --- a/raw-migrated-files/cloud/cloud/ec-getting-started-python.md +++ b/raw-migrated-files/cloud/cloud/ec-getting-started-python.md @@ -333,7 +333,7 @@ es = Elasticsearch( ) ``` -Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on Elasticsearch Service, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). +Check [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) to learn more about API Keys and [Security privileges](../../../deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md) to understand which privileges are needed. If you are not sure what the right combination of privileges for your custom application is, you can enable [audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) on {{es}} to find out what privileges are being used. To learn more about how logging works on Elasticsearch Service, check [Monitoring Elastic Cloud deployment logs and metrics](https://www.elastic.co/blog/monitoring-elastic-cloud-deployment-logs-and-metrics). For more information on refreshing an index, searching, updating, and deleting, check the [elasticsearch-py examples](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/examples.html). diff --git a/raw-migrated-files/elasticsearch/elasticsearch-reference/secure-cluster.md b/raw-migrated-files/elasticsearch/elasticsearch-reference/secure-cluster.md index be6cdb49ca..fd450af95e 100644 --- a/raw-migrated-files/elasticsearch/elasticsearch-reference/secure-cluster.md +++ b/raw-migrated-files/elasticsearch/elasticsearch-reference/secure-cluster.md @@ -42,5 +42,5 @@ See [Configure security for the {{stack}}](../../../deploy-manage/security/secur Keeping a system secure takes vigilance. By using {{stack-security-features}} to maintain an audit trail, you can easily see who is accessing your cluster and what they’re doing. You can configure the audit level, which accounts for the type of events that are logged. These events include failed authentication attempts, user access denied, node connection denied, and more. By analyzing access patterns and failed attempts to access your cluster, you can gain insights into attempted attacks and data breaches. Keeping an auditable log of the activity in your cluster can also help diagnose operational issues. -See [Enable audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md). +See [Enable audit logging](../../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md). diff --git a/raw-migrated-files/toc.yml b/raw-migrated-files/toc.yml index 2939e81a8e..32ed11807f 100644 --- a/raw-migrated-files/toc.yml +++ b/raw-migrated-files/toc.yml @@ -13,7 +13,6 @@ toc: - file: apm-agent-ruby/apm-agent-ruby/release-notes-4.x.md - file: cloud-on-k8s/cloud-on-k8s/index.md children: - - file: cloud-on-k8s/cloud-on-k8s/k8s_audit_logging.md - file: cloud-on-k8s/cloud-on-k8s/k8s-custom-http-certificate.md - file: cloud-on-k8s/cloud-on-k8s/k8s-es-secure-settings.md - file: cloud-on-k8s/cloud-on-k8s/k8s-installing-eck.md @@ -40,7 +39,6 @@ toc: - file: cloud/cloud-enterprise/ece-configuring-keystore.md - file: cloud/cloud-enterprise/ece-create-deployment.md - file: cloud/cloud-enterprise/ece-delete-deployment.md - - file: cloud/cloud-enterprise/ece-enable-auditing.md - file: cloud/cloud-enterprise/ece-find.md - file: cloud/cloud-enterprise/ece-generate-roles-token.md - file: cloud/cloud-enterprise/ece-getting-started-node-js.md diff --git a/troubleshoot/elasticsearch/hotspotting.md b/troubleshoot/elasticsearch/hotspotting.md index bedbd4a002..c1205e59aa 100644 --- a/troubleshoot/elasticsearch/hotspotting.md +++ b/troubleshoot/elasticsearch/hotspotting.md @@ -175,5 +175,5 @@ Its response contains a `description` that reports this query: indices[winlogbeat-*,logs-window*], sequence by winlog.computer_name with maxspan=1m\n\n[authentication where host.os.type == "windows" and event.action:"logged-in" and\n event.outcome == "success" and process.name == "svchost.exe" ] by winlog.event_data.TargetLogonId ``` -This lets you know which indices to check (`winlogbeat-*,logs-window*`), as well as the [EQL search](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search) request body. Most likely this is [SIEM related](https://www.elastic.co/guide/en/security/current/es-overview.html). You can combine this with [audit logging](../../deploy-manage/monitor/logging-configuration/enabling-elasticsearch-audit-logs.md) as needed to trace the request source. +This lets you know which indices to check (`winlogbeat-*,logs-window*`), as well as the [EQL search](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search) request body. Most likely this is [SIEM related](https://www.elastic.co/guide/en/security/current/es-overview.html). You can combine this with [audit logging](../../deploy-manage/monitor/logging-configuration/enabling-audit-logs.md) as needed to trace the request source.