Skip to content

Commit c2766b6

Browse files
authored
ingest: raise visibility of ingest plugin documentation (#35048)
* move the set security user processor to the main documentation * link to plugin processors part of #33188
1 parent a95f057 commit c2766b6

File tree

2 files changed

+47
-39
lines changed

2 files changed

+47
-39
lines changed

docs/reference/ingest/ingest-node.asciidoc

+43
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,12 @@ A node will not start if either of these plugins are not available.
764764
The <<ingest-stats,node stats API>> can be used to fetch ingest usage statistics, globally and on a per
765765
pipeline basis. Useful to find out which pipelines are used the most or spent the most time on preprocessing.
766766

767+
[float]
768+
=== Ingest Processor Plugins
769+
770+
Additional ingest processors can be implemented and installed as Elasticsearch {plugins}/intro.html[plugins].
771+
See {plugins}/ingest.html[Ingest plugins] for information about the available ingest plugins.
772+
767773
[[append-processor]]
768774
=== Append Processor
769775
Appends one or more values to an existing array if the field already exists and it is an array.
@@ -2440,6 +2446,43 @@ include::ingest-node-common-processor.asciidoc[]
24402446
--------------------------------------------------
24412447
// NOTCONSOLE
24422448

2449+
2450+
[[ingest-node-set-security-user-processor]]
2451+
=== Set Security User Processor
2452+
Sets user-related details (such as `username`, `roles`, `email`, `full_name`
2453+
and `metadata` ) from the current
2454+
authenticated user to the current document by pre-processing the ingest.
2455+
2456+
IMPORTANT: Requires an authenticated user for the index request.
2457+
2458+
[[set-security-user-options]]
2459+
.Set Security User Options
2460+
[options="header"]
2461+
|======
2462+
| Name | Required | Default | Description
2463+
| `field` | yes | - | The field to store the user information into.
2464+
| `properties` | no | [`username`, `roles`, `email`, `full_name`, `metadata`] | Controls what user related properties are added to the `field`.
2465+
include::ingest-node-common-processor.asciidoc[]
2466+
|======
2467+
2468+
The following example adds all user details for the current authenticated user
2469+
to the `user` field for all documents that are processed by this pipeline:
2470+
2471+
[source,js]
2472+
--------------------------------------------------
2473+
{
2474+
"processors" : [
2475+
{
2476+
"set_security_user": {
2477+
"field": "user"
2478+
}
2479+
}
2480+
]
2481+
}
2482+
--------------------------------------------------
2483+
// NOTCONSOLE
2484+
2485+
24432486
[[split-processor]]
24442487
=== Split Processor
24452488
Splits a field into an array using a separator character. Only works on string fields.

x-pack/docs/en/security/authorization/set-security-user.asciidoc

+4-39
Original file line numberDiff line numberDiff line change
@@ -9,53 +9,18 @@ To guarantee that a user reads only their own documents, it makes sense to set u
99
document level security. In this scenario, each document must have the username
1010
or role name associated with it, so that this information can be used by the
1111
role query for document level security. This is a situation where the
12-
`set_security_user` ingest processor can help.
12+
{ref}/ingest-node-set-security-user-processor.html[Set Security User Processor] ingest processor can help.
1313

1414
NOTE: Document level security doesn't apply to write APIs. You must use unique
1515
ids for each user that uses the same index, otherwise they might overwrite other
1616
users' documents. The ingest processor just adds properties for the current
1717
authenticated user to the documents that are being indexed.
1818

19-
The `set_security_user` processor attaches user-related details (such as
19+
The {ref}/ingest-node-set-security-user-processor.html[set security user processor] attaches user-related details (such as
2020
`username`, `roles`, `email`, `full_name` and `metadata` ) from the current
2121
authenticated user to the current document by pre-processing the ingest. When
2222
you index data with an ingest pipeline, user details are automatically attached
23-
to the document. For example:
23+
to the document.
2424

25-
[source,js]
26-
--------------------------------------------------
27-
PUT shared-logs/log/1?pipeline=my_pipeline_id
28-
{
29-
...
30-
}
31-
--------------------------------------------------
32-
// NOTCONSOLE
25+
For more information see {ref}/ingest.html[Ingest node] and {ref}/ingest-node-set-security-user-processor.html[Set security user processor].
3326

34-
For more information about setting up a pipeline and other processors, see
35-
{ref}/ingest.html[ingest node].
36-
37-
[[set-security-user-options]]
38-
.Set Security User Options
39-
[options="header"]
40-
|======
41-
| Name | Required | Default | Description
42-
| `field` | yes | - | The field to store the user information into.
43-
| `properties` | no | [`username`, `roles`, `email`, `full_name`, `metadata`] | Controls what user related properties are added to the `field`.
44-
|======
45-
46-
The following example adds all user details for the current authenticated user
47-
to the `user` field for all documents that are processed by this pipeline:
48-
49-
[source,js]
50-
--------------------------------------------------
51-
{
52-
"processors" : [
53-
{
54-
"set_security_user": {
55-
"field": "user"
56-
}
57-
}
58-
]
59-
}
60-
--------------------------------------------------
61-
// NOTCONSOLE

0 commit comments

Comments
 (0)