Set Security User Processor
editSet Security User Processor
editSets user-related details (such as username
, roles
, email
, full_name
,
metadata
, api_key
, realm
and authentication_type
) from the current
authenticated user to the current document by pre-processing the ingest.
The api_key
property exists only if the user authenticates with an
API key. It is an object containing the id
and name
fields of the API key.
The realm
property is also an object with two fields, name
and type
.
When using API key authentication, the realm
property refers to the realm
from which the API key is created.
The authentication_type
property is a string that can take value from
REALM
, API_KEY
, TOKEN
and ANONYMOUS
.
Requires an authenticated user for the index request.
Table 62. Set Security User Options
Name | Required | Default | Description |
---|---|---|---|
|
yes |
- |
The field to store the user information into. |
|
no |
[ |
Controls what user related properties are added to the |
|
no |
- |
Conditionally execute this processor. |
|
no |
- |
Handle failures for this processor. See Handling Failures in Pipelines. |
|
no |
|
Ignore failures for this processor. See Handling Failures in Pipelines. |
|
no |
- |
An identifier for this processor. Useful for debugging and metrics. |
The following example adds all user details for the current authenticated user
to the user
field for all documents that are processed by this pipeline:
{ "processors" : [ { "set_security_user": { "field": "user" } } ] }