108 lines
2.5 KiB
Plaintext
108 lines
2.5 KiB
Plaintext
[role="xpack"]
|
|
[[security-api-get-builtin-privileges]]
|
|
=== Get builtin privileges API
|
|
++++
|
|
<titleabbrev>Get builtin privileges</titleabbrev>
|
|
++++
|
|
|
|
Retrieves the list of
|
|
{stack-ov}/security-privileges.html#privileges-list-cluster[cluster privileges] and
|
|
{stack-ov}/security-privileges.html#privileges-list-indices[index privileges] that are
|
|
available in this version of {es}.
|
|
|
|
==== Request
|
|
|
|
`GET /_security/privilege/_builtin`
|
|
|
|
|
|
==== Description
|
|
|
|
This API retrieves the set of cluster and index privilege names that are available in the
|
|
version of {es} that is being queried.
|
|
|
|
To check whether a user has particular privileges, use the
|
|
<<security-api-has-privileges,has privileges API>>.
|
|
|
|
==== Results
|
|
|
|
The response is an object with two fields:
|
|
|
|
`cluster`:: (array of string) The list of
|
|
{stack-ov}/security-privileges.html#privileges-list-cluster[cluster privileges] that are
|
|
understood by this version of {es}
|
|
|
|
`index`:: (array of string) The list of
|
|
{stack-ov}/security-privileges.html#privileges-list-indices[index privileges] that are
|
|
understood by this version of {es}
|
|
|
|
==== Authorization
|
|
|
|
To use this API, you must have - the `manage_security` cluster privilege
|
|
(or a greater privilege such as `all`)
|
|
|
|
==== Examples
|
|
|
|
The following example retrieves the names of all builtin privileges:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
GET /_security/privilege/_builtin
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
// TEST
|
|
|
|
A successful call returns an object with "cluster" and "index" fields.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
{
|
|
"cluster" : [
|
|
"all",
|
|
"create_snapshot",
|
|
"manage",
|
|
"manage_api_key",
|
|
"manage_ccr",
|
|
"manage_data_frame_transforms",
|
|
"manage_ilm",
|
|
"manage_index_templates",
|
|
"manage_ingest_pipelines",
|
|
"manage_ml",
|
|
"manage_oidc",
|
|
"manage_pipeline",
|
|
"manage_rollup",
|
|
"manage_saml",
|
|
"manage_security",
|
|
"manage_token",
|
|
"manage_watcher",
|
|
"monitor",
|
|
"monitor_data_frame_transforms",
|
|
"monitor_ml",
|
|
"monitor_rollup",
|
|
"monitor_watcher",
|
|
"none",
|
|
"read_ccr",
|
|
"read_ilm",
|
|
"transport_client"
|
|
],
|
|
"index" : [
|
|
"all",
|
|
"create",
|
|
"create_index",
|
|
"delete",
|
|
"delete_index",
|
|
"index",
|
|
"manage",
|
|
"manage_follow_index",
|
|
"manage_ilm",
|
|
"manage_leader_index",
|
|
"monitor",
|
|
"none",
|
|
"read",
|
|
"read_cross_cluster",
|
|
"view_index_metadata",
|
|
"write"
|
|
]
|
|
}
|
|
--------------------------------------------------
|
|
// TESTRESPONSE
|