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
Expose more authentication info to ingest pipeline (elastic#51305)
The changes add more granularity for identiying the data ingestion user.
The ingest pipeline can now be configure to record authentication realm and
type. It can also record API key name and ID when one is in use.
This improves traceability when data are being ingested from multiple agents
and will become more relevant with the incoming support of required
pipelines (elastic#46847)
Resolves: elastic#49106
Copy file name to clipboardExpand all lines: docs/reference/ingest/processors/set-security-user.asciidoc
+12-5
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,25 @@
1
1
[[ingest-node-set-security-user-processor]]
2
2
=== Set Security User Processor
3
-
Sets user-related details (such as `username`, `roles`, `email`, `full_name`
4
-
and `metadata`) from the current
3
+
Sets user-related details (such as `username`, `roles`, `email`, `full_name`,
4
+
`metadata`, `api_key`, `realm` and `authentication_type`) from the current
5
5
authenticated user to the current document by pre-processing the ingest.
6
+
The `api_key` property exists only if the user authenticates with an
7
+
API key. It is an object containing the `id` and `name` fields of the API key.
8
+
The `realm` property is also an object with two fields, `name` and `type`.
9
+
When using API key authentication, the `realm` property refers to the realm
10
+
from which the API key is created.
11
+
The `authentication_type` property is a string that can take value from
12
+
`REALM`, `API_KEY`, `TOKEN` and `ANONYMOUS`.
6
13
7
14
IMPORTANT: Requires an authenticated user for the index request.
8
15
9
16
[[set-security-user-options]]
10
17
.Set Security User Options
11
18
[options="header"]
12
19
|======
13
-
| Name | Required | Default | Description
14
-
| `field` | yes | - | The field to store the user information into.
15
-
| `properties` | no | [`username`, `roles`, `email`, `full_name`, `metadata`] | Controls what user related properties are added to the `field`.
20
+
| Name | Required | Default | Description
21
+
| `field` | yes | - | The field to store the user information into.
22
+
| `properties` | no | [`username`, `roles`, `email`, `full_name`, `metadata`, `api_key`, `realm`, `authentication_type`] | Controls what user related properties are added to the `field`.
Copy file name to clipboardExpand all lines: x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/ingest/SetSecurityUserProcessor.java
0 commit comments