You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
24
24
25
25
::::{important}
26
-
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.
26
+
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.
27
27
::::
28
28
29
29
The request body is printed as an escaped JSON string value (RFC 4627) to the `request.body` event attribute.
30
30
31
-
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).
31
+
Not all events contain the `request.body` attribute, even when the above setting is toggled. The ones that do are:
32
+
33
+
* `authentication_success`
34
+
* `authentication_failed`
35
+
* `realm_authentication_failed`
36
+
* `tampered_request`
37
+
* `run_as_denied`
38
+
* `anonymous_access_denied`
39
+
40
+
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).
32
41
33
42
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.
Copy file name to clipboardExpand all lines: deploy-manage/monitor/logging-configuration/configuring-audit-logs.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,28 +20,22 @@ When auditing security events, a single client request might generate multiple a
20
20
*[{{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.
21
21
22
22
::::{tip}
23
-
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`.
23
+
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`.
24
24
::::
25
25
26
-
Note that {{ech}} deployments provide its own subset of supported settings for auditing configuration:
27
-
*[Elasticsearch audit settings for Elastic Cloud Hosted deployments](https://www.elastic.co/guide/en/cloud/current/ec-add-user-settings.html#ec_audit_settings)
28
26
29
-
For a complete description of event details and format, refer to:
30
-
*[{{es}} audit events details and schema](/deploy-manage/monitor/logging-configuration/elasticsearch-audit-events.md).
*[{{kib}} ignore filters](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#audit-logging-ignore-filters): List of filters that determine which events should be excluded from the audit log.
33
+
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.
38
34
39
35
::::{tip}
40
36
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.
41
37
::::
42
38
43
-
Note that {{ech}} deployments provide its own subset of supported settings for auditing configuration:
44
-
*[Kibana audit settings on Elastic Cloud](https://www.elastic.co/guide/en/cloud/current/ec-manage-kibana-settings.html#ec_logging_and_audit_settings)
45
39
46
40
For a complete description of auditing event details, such as `category`, `type`, or `action`, refer to:
@@ -55,7 +49,7 @@ For a complete description of auditing event details, such as `category`, `type`
55
49
* Refer to [auditing search queries](./auditing-search-queries.md) for details on logging request bodies in the {{es}} audit logs.
56
50
57
51
::::{important}
58
-
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.
52
+
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.
59
53
::::
60
54
61
55
* Use {{kib}} [ignore filters](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#audit-logging-ignore-filters) if you want to filter out certain events from the {{kib}} audit log.
Copy file name to clipboardExpand all lines: deploy-manage/monitor/logging-configuration/enabling-audit-logs.md
+21-22Lines changed: 21 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,14 +24,18 @@ You can log security-related events such as authentication failures and refused
24
24
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.
25
25
26
26
::::{note}
27
-
Audit logs are **disabled** by default and must be explicitly enabled.
27
+
Audit logs are disabled by default and must be explicitly enabled.
28
28
::::
29
29
30
30
This section describes how to enable and configure audit logging in both {{es}} and {{kib}} for all supported deployment types, including self-managed clusters, Elastic Cloud Hosted, Elastic Cloud Enterprise (ECE), and Elastic Cloud on Kubernetes (ECK).
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).
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. The following provide detailed steps for all supported deployment types:
38
+
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:
35
39
36
40
% content discarded (for review)
37
41
% The process of enabling and configuring audit logging is consistent across all supported deployment types, whether self-managed, Elastic Cloud, Elastic Cloud Enterprise (ECE), or Elastic Cloud on Kubernetes (ECK). The same settings apply regardless of the deployment type, ensuring a unified approach to audit logging configuration.
@@ -56,48 +60,43 @@ You can configure additional options to control what events are logged and what
56
60
57
61
**To enable audit logging in {{kib}}**:
58
62
59
-
1. Set `xpack.security.audit.enabled` to `true` in `kibana.yml`
60
-
2. Restart {{kib}}
63
+
1. Set `xpack.security.audit.enabled` to `true` in `kibana.yml`.
64
+
2. Restart {{kib}}.
61
65
62
66
You can optionally configure audit logs location, file/rolling file appenders and ignore filters using [{{kib}} audit logging settings](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#audit-logging-settings).
63
67
64
68
:::::
65
69
66
70
:::::{tab-item} Elastic Cloud Hosted
67
71
68
-
::::{important}
69
-
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).
70
-
::::
71
72
72
73
To enable audit logging in an {{ech}} deployment:
73
74
74
-
1. Log in to the [Elasticsearch Service Console](https://cloud.elastic.co?page=docs&placement=docs-body).
75
+
1. Log in to the [{{ecloud}} Console](https://cloud.elastic.co?page=docs&placement=docs-body).
75
76
76
-
2. Find your deployment on the home page in the Elasticsearch Service card and select **Manage** to access it directly. Or, select **Hosted deployments** to go to the deployments page to view all of your deployments.
77
+
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.
77
78
78
79
3. From your deployment menu, go to the **Edit** page.
79
80
80
81
4. To enable auditing for Elasticsearch:
81
-
* 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.
82
+
* 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.
82
83
* Add the setting `xpack.security.audit.enabled: true`.
83
84
84
85
5. To enable auditing for Kibana:
85
86
* 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.
86
87
* Add the setting `xpack.security.audit.enabled: true`.
87
88
88
89
6. Select **Save changes**.
89
-
* A plan change will run on your deployment. When it finishes, **audit logs will be delivered to your monitoring deployment**.
90
+
91
+
A plan change will run on your deployment. When it finishes, audit logs will be delivered to your monitoring deployment.
90
92
:::::
91
93
92
94
:::::{tab-item} ECE
93
95
94
-
::::{important}
95
-
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).
96
-
::::
97
96
98
97
To enable audit logging in an ECE deployment:
99
98
100
-
1.[Log into the Cloud UI](../../deploy/cloud-enterprise/log-into-cloud-ui.md).
99
+
1.[Log in to the Cloud UI](../../deploy/cloud-enterprise/log-into-cloud-ui.md).
101
100
102
101
2. On the **Deployments** page, select your deployment.
103
102
@@ -113,16 +112,16 @@ To enable audit logging in an ECE deployment:
113
112
* If your Elastic Stack version is below 7.6.0, add the setting `logging.quiet: false`.
114
113
115
114
6. Select **Save**.
116
-
* A plan change will run on your deployment. When it finishes, **audit logs will be delivered to your monitoring deployment**.
115
+
116
+
A plan change will run on your deployment. When it finishes, audit logs will be delivered to your monitoring deployment.
117
117
:::::
118
118
119
119
:::::{tab-item} ECK
120
120
121
-
::::{important}
122
-
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).
123
-
::::
124
121
125
-
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 together with logs and metrics delivery towards a remote cluster:
122
+
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.
123
+
124
+
The following example shows this configuration, along with together with logs and metrics delivery towards a remote cluster:
126
125
127
126
```yaml
128
127
apiVersion: elasticsearch.k8s.elastic.co/v1
@@ -160,7 +159,7 @@ spec:
160
159
xpack.security.audit.enabled: true
161
160
```
162
161
163
-
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.
162
+
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.
Copy file name to clipboardExpand all lines: deploy-manage/monitor/logging-configuration/logfile-audit-output.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The `logfile` audit output is the only output for auditing. By default, it write
15
15
16
16
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**.
17
17
18
-
Orchestrated deployments (Elastic Cloud, Elastic Cloud Enterprise (ECE), and Elastic Cloud on Kubernetes (ECK)) do not support changes in `log4j2.properties` files of the {{es}} instances.
18
+
Orchestrated deployments (ECH, ECE, and ECK) do not support changes in `log4j2.properties` files of the {{es}} instances.
19
19
20
20
::::{note}
21
21
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.
Copy file name to clipboardExpand all lines: deploy-manage/monitor/logging-configuration/security-event-audit-logging.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,12 @@ Audit logging also provides forensic evidence in the event of an attack, and can
18
18
19
19
In this section, you'll learn how to:
20
20
21
-
1.[](./enabling-audit-logs.md): Activate {{es}} or {{kib}} audit logs for all supported deployment types, including self-managed clusters, {{ech}}, {{ece}} (ECE), and {{eck}} (ECK).
21
+
*[](./enabling-audit-logs.md): Activate {{es}} or {{kib}} audit logs for all supported deployment types.
22
22
23
-
2.[](./configuring-audit-logs.md): Filter and control what security events get logged in the audit log output.
23
+
*[](./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.
26
26
27
-
4.[Correlate audit events](./correlating-kibana-elasticsearch-audit-logs.md): Explore audit logs and understand how events from the same request are correlated.
27
+
*[Correlate audit events](./correlating-kibana-elasticsearch-audit-logs.md): Explore audit logs and understand how events from the same request are correlated.
28
28
29
29
By following these guidelines, you can effectively audit system activity, enhance security monitoring, and meet compliance requirements.
Copy file name to clipboardExpand all lines: manage-data/ingest/ingesting-data-from-applications/ingest-data-with-nodejs-on-elasticsearch-service.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -290,7 +290,7 @@ const client = new Client({
290
290
})
291
291
```
292
292
293
-
Check [Create API key API](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html) 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).
293
+
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).
Copy file name to clipboardExpand all lines: manage-data/ingest/ingesting-data-from-applications/ingest-data-with-python-on-elasticsearch-service.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -351,7 +351,7 @@ es = Elasticsearch(
351
351
)
352
352
```
353
353
354
-
Check [Create API key API](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html) 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).
354
+
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).
355
355
356
356
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).
0 commit comments