privileges.asciidoc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. [role="xpack"]
  2. [[security-privileges]]
  3. === Security privileges
  4. This section lists the privileges that you can assign to a role.
  5. [[privileges-list-cluster]]
  6. ==== Cluster privileges
  7. [horizontal]
  8. `all`::
  9. All cluster administration operations, like snapshotting, node shutdown/restart,
  10. settings update, rerouting, or managing users and roles.
  11. `cancel_task`::
  12. Privileges to cancel tasks and delete async searches.
  13. See <<delete-async-search,delete async search>> API for more informations.
  14. `create_snapshot`::
  15. Privileges to create snapshots for existing repositories. Can also list and view
  16. details on existing repositories and snapshots.
  17. `cross_cluster_replication`::
  18. beta:[] Privileges to connect to <<remote-clusters-api-key,remote clusters configured with the API key based model>>
  19. for cross-cluster replication.
  20. +
  21. --
  22. NOTE: This privilege should _not_ be directly granted. It is used internally by
  23. <<security-api-create-cross-cluster-api-key>> and <<security-api-update-cross-cluster-api-key>>
  24. to manage cross-cluster API keys.
  25. --
  26. `cross_cluster_search`::
  27. beta:[] Privileges to connect to <<remote-clusters-api-key,remote clusters configured with the API key based model>>
  28. for cross-cluster search.
  29. +
  30. --
  31. NOTE: This privilege should _not_ be directly granted. It is used internally by
  32. <<security-api-create-cross-cluster-api-key>> and <<security-api-update-cross-cluster-api-key>>
  33. to manage cross-cluster API keys.
  34. --
  35. `grant_api_key`::
  36. Privileges to create {es} API keys on behalf of other users.
  37. `manage`::
  38. Builds on `monitor` and adds cluster operations that change values in the cluster.
  39. This includes snapshotting, updating settings, and rerouting. It also includes
  40. obtaining snapshot and restore status. This privilege does not include the
  41. ability to manage security.
  42. `manage_api_key`::
  43. All security-related operations on {es} REST API keys including
  44. <<security-api-create-api-key,creating new API keys>>,
  45. <<security-api-get-api-key,retrieving information about API keys>>,
  46. <<security-api-query-api-key,querying API keys>>,
  47. <<security-api-update-api-key,updating API key>>,
  48. <<security-api-bulk-update-api-keys,bulk updating API keys>>, and
  49. <<security-api-invalidate-api-key,invalidating API keys>>.
  50. +
  51. --
  52. [NOTE]
  53. ======
  54. * When you create new API keys, they will always be owned by the authenticated
  55. user.
  56. * When you have this privilege, you can invalidate your own API keys and those
  57. owned by other users.
  58. ======
  59. --
  60. `manage_ccr`::
  61. All {ccr} operations related to managing follower indices and auto-follow
  62. patterns. It also includes the authority to grant the privileges necessary to
  63. manage follower indices and auto-follow patterns. This privilege is necessary
  64. only on clusters that contain follower indices.
  65. `manage_ilm`::
  66. All {Ilm} operations related to managing policies.
  67. `manage_index_templates`::
  68. All operations on index templates.
  69. `manage_ingest_pipelines`::
  70. All operations on ingest pipelines.
  71. `manage_logstash_pipelines`::
  72. All operations on logstash pipelines.
  73. `manage_ml`::
  74. All {ml} operations, such as creating and deleting {dfeeds}, jobs, and model
  75. snapshots.
  76. +
  77. --
  78. NOTE: {dfeeds-cap} that were created prior to version 6.2 or created when
  79. {security-features} were disabled run as a system user with elevated privileges,
  80. including permission to read all indices. Newer {dfeeds} run with the security
  81. roles of the user who created or updated them.
  82. --
  83. `manage_oidc`::
  84. Enables the use of {es} APIs
  85. (<<security-api-oidc-prepare-authentication,OpenID connect prepare authentication>>,
  86. <<security-api-oidc-authenticate,OpenID connect authenticate>>, and
  87. <<security-api-oidc-logout,OpenID connect logout>>)
  88. to initiate and manage OpenID Connect authentication on behalf of other users.
  89. `manage_own_api_key`::
  90. All security-related operations on {es} API keys that are owned by the current
  91. authenticated user. The operations include
  92. <<security-api-create-api-key,creating new API keys>>,
  93. <<security-api-get-api-key,retrieving information about API keys>>,
  94. <<security-api-query-api-key,querying API keys>>,
  95. <<security-api-update-api-key,updating API key>>,
  96. <<security-api-bulk-update-api-keys,bulk updating API keys>>, and
  97. <<security-api-invalidate-api-key,invalidating API keys>>.
  98. `manage_pipeline`::
  99. All operations on ingest pipelines.
  100. `manage_rollup`::
  101. All rollup operations, including creating, starting, stopping and deleting
  102. rollup jobs.
  103. `manage_saml`::
  104. Enables the use of internal {es} APIs to initiate and manage SAML authentication
  105. on behalf of other users.
  106. `manage_search_application`::
  107. All CRUD operations on <<search-application-apis, search applications>>.
  108. `manage_search_query_rules`::
  109. All CRUD operations on <<query-rules-apis, query rules>>.
  110. `manage_search_synonyms`::
  111. All synonyms management operations on <<synonyms-apis>>.
  112. `manage_security`::
  113. All security-related operations such as CRUD operations on users and roles and
  114. cache clearing.
  115. `manage_service_account`::
  116. All security-related operations on {es} service accounts including
  117. <<security-api-get-service-accounts>>,
  118. <<security-api-create-service-token>>, <<security-api-delete-service-token>>,
  119. and <<security-api-get-service-credentials>>.
  120. `manage_slm`::
  121. All {slm} ({slm-init}) actions, including creating and updating policies and
  122. starting and stopping {slm-init}.
  123. `manage_token`::
  124. All security-related operations on tokens that are generated by the {es} Token
  125. Service.
  126. `manage_transform`::
  127. All operations related to managing {transforms}.
  128. `manage_autoscaling`::
  129. All operations related to managing autoscaling policies.
  130. `manage_data_frame_transforms`::
  131. All operations related to managing {transforms}.
  132. deprecated[7.5] Use `manage_transform` instead.
  133. `manage_enrich`::
  134. All operations related to managing and executing enrich policies.
  135. `manage_data_stream_global_retention`::
  136. All operations related to managing the data stream global retention settings.
  137. `manage_watcher`::
  138. All watcher operations, such as putting watches, executing, activate or acknowledging.
  139. +
  140. --
  141. NOTE: Watches that were created prior to version 6.1 or created when the
  142. {security-features} were disabled run as a system user with elevated privileges,
  143. including permission to read and write all indices. Newer watches run with the
  144. security roles of the user who created or updated them.
  145. --
  146. `monitor`::
  147. All cluster read-only operations, like cluster health and state, hot threads,
  148. node info, node and cluster stats, and pending cluster tasks.
  149. `monitor_enrich`::
  150. All read-only operations related to managing and executing enrich policies.
  151. `monitor_ml`::
  152. All read-only {ml} operations, such as getting information about {dfeeds}, jobs,
  153. model snapshots, or results.
  154. `monitor_rollup`::
  155. All read-only rollup operations, such as viewing the list of historical and
  156. currently running rollup jobs and their capabilities.
  157. `monitor_snapshot`::
  158. Privileges to list and view details on existing repositories and snapshots.
  159. `monitor_text_structure`::
  160. All read-only operations related to the <<find-structure,find structure API>>.
  161. `monitor_transform`::
  162. All read-only operations related to {transforms}.
  163. `monitor_data_stream_global_retention`::
  164. Allows the retrieval of the data stream global retention settings.
  165. `monitor_watcher`::
  166. All read-only watcher operations, such as getting a watch and watcher stats.
  167. `read_ccr`::
  168. All read-only {ccr} operations, such as getting information about indices and
  169. metadata for leader indices in the cluster. It also includes the authority to
  170. check whether users have the appropriate privileges to follow leader indices.
  171. This privilege is necessary only on clusters that contain leader indices.
  172. `read_ilm`::
  173. All read-only {Ilm} operations, such as getting policies and checking the
  174. status of {Ilm}
  175. `read_pipeline`::
  176. Read-only access to ingest pipline (get, simulate).
  177. `read_slm`::
  178. All read-only {slm-init} actions, such as getting policies and checking the
  179. {slm-init} status.
  180. `read_security`::
  181. All read-only security-related operations, such as getting users, user profiles,
  182. {es} API keys, {es} service accounts, roles and role mappings.
  183. Allows <<security-api-query-api-key,querying>> and <<security-api-get-api-key,retrieving information>>
  184. on all {es} API keys.
  185. `transport_client`::
  186. All privileges necessary for a transport client to connect. Required by the remote
  187. cluster to enable <<remote-clusters,{ccs}>>.
  188. [[privileges-list-indices]]
  189. ==== Indices privileges
  190. [horizontal]
  191. `all`::
  192. Any action on an index or data stream.
  193. `auto_configure`::
  194. Permits auto-creation of indices and data streams. An auto-create action is the
  195. result of an <<docs-index_,index>> or <<docs-bulk,bulk>> request that targets a
  196. non-existent index or data stream rather than an explicit
  197. <<indices-create-index,create index>> or
  198. <<indices-create-data-stream,create data stream>> request. Also permits
  199. auto-update of mappings on indices and data streams if they do not contradict
  200. existing mappings. An auto-update mapping action is the result of an index or
  201. bulk request on an index or data stream that contains new fields that may
  202. be mapped rather than an explicit <<indices-put-mapping,update mapping>> request.
  203. `create`::
  204. Privilege to index documents.
  205. +
  206. deprecated:[8.0] Also grants the permission to update the index mapping (but
  207. not the data streams mapping), using
  208. the {ref}/indices-put-mapping.html[updating mapping API] or by relying on
  209. {ref}/dynamic-mapping.html[dynamic field mapping]. In a future major release,
  210. this privilege will not grant any mapping update permissions.
  211. +
  212. --
  213. NOTE: This privilege does not restrict the index operation to the creation
  214. of documents but instead restricts API use to the index API. The index API
  215. allows a user to overwrite a previously indexed document. See the `create_doc`
  216. privilege for an alternative.
  217. --
  218. `create_doc`::
  219. Privilege to index documents.
  220. It does not grant the permission to update or overwrite existing documents.
  221. +
  222. deprecated:[8.0] Also grants the permission to update the index mapping (but
  223. not the data streams mapping), using
  224. the {ref}/indices-put-mapping.html[updating mapping API] or by relying on
  225. {ref}/dynamic-mapping.html[dynamic field mapping]. In a future major release,
  226. this privilege will not grant any mapping update permissions.
  227. +
  228. --
  229. [NOTE]
  230. ====
  231. This privilege relies on the `op_type` of indexing requests (<<docs-index_>> and
  232. <<docs-bulk>>). When ingesting documents as a user who has the `create_doc`
  233. privilege (and no higher privilege such as `index` or `write`), you must ensure that
  234. 'op_type' is set to 'create' through one of the following:
  235. * Explicitly setting the `op_type` in the index or bulk APIs
  236. * Using the `_create` endpoint for the index API
  237. * Creating a document with an auto-generated `_id`
  238. ====
  239. --
  240. `create_index`::
  241. Privilege to create an index or data stream. A create index request may contain
  242. aliases to be added to the index once created. In that case the request
  243. requires the `manage` privilege as well, on both the index and the aliases
  244. names.
  245. `cross_cluster_replication`::
  246. beta:[] Privileges to perform cross-cluster replication for indices located on
  247. <<remote-clusters-api-key,remote clusters configured with the API key based model>>.
  248. This privilege should only be used for
  249. the `privileges` field of <<roles-remote-indices-priv,remote indices privileges>>.
  250. `cross_cluster_replication_internal`::
  251. beta:[] Privileges to perform supporting actions for cross-cluster replication from
  252. <<remote-clusters-api-key,remote clusters configured with the API key based model>>.
  253. +
  254. --
  255. NOTE: This privilege should _not_ be directly granted. It is used internally by
  256. <<security-api-create-cross-cluster-api-key>> and <<security-api-update-cross-cluster-api-key>>
  257. to manage cross-cluster API keys.
  258. --
  259. `delete`::
  260. Privilege to delete documents.
  261. `delete_index`::
  262. Privilege to delete an index or data stream.
  263. `index`::
  264. Privilege to index and update documents.
  265. +
  266. deprecated:[8.0] Also grants the permission to update the index mapping (but
  267. not the data streams mapping), using
  268. the {ref}/indices-put-mapping.html[updating mapping API] or by relying on
  269. {ref}/dynamic-mapping.html[dynamic field mapping]. In a future major release,
  270. this privilege will not grant any mapping update permissions.
  271. `maintenance`::
  272. Permits refresh, flush, synced flush and force merge index administration operations.
  273. No privilege to read or write index data or otherwise manage the index.
  274. `manage`::
  275. All `monitor` privileges plus index and data stream administration (aliases,
  276. analyze, cache clear, close, delete, exists, flush, mapping, open, field capabilities,
  277. force merge, refresh, settings, search shards, validate query).
  278. `manage_follow_index`::
  279. All actions that are required to manage the lifecycle of a follower index, which
  280. includes creating a follower index, closing it, and converting it to a regular
  281. index. This privilege is necessary only on clusters that contain follower indices.
  282. `manage_ilm`::
  283. All {Ilm} operations relating to managing the execution of policies of an index
  284. or data stream. This includes operations such as retrying policies and removing
  285. a policy from an index or data stream.
  286. ifeval::["{release-state}"!="released"]
  287. `manage_data_stream_lifecycle`::
  288. All data stream lifecycle operations relating to reading and managing the built-in lifecycle of a data stream.
  289. This includes operations such as adding and removing a lifecycle from a data stream.
  290. endif::[]
  291. `manage_leader_index`::
  292. All actions that are required to manage the lifecycle of a leader index, which
  293. includes <<ccr-post-forget-follower,forgetting a follower>>. This
  294. privilege is necessary only on clusters that contain leader indices.
  295. `monitor`::
  296. All actions that are required for monitoring (recovery, segments info, index
  297. stats and status).
  298. `read`::
  299. Read-only access to actions (count, explain, get, mget, get indexed scripts,
  300. more like this, multi percolate/search/termvector, percolate, scroll,
  301. clear_scroll, search, suggest, tv).
  302. `read_cross_cluster`::
  303. Read-only access to the search action from a <<remote-clusters,remote cluster>>.
  304. `view_index_metadata`::
  305. Read-only access to index and data stream metadata (aliases, exists,
  306. field capabilities, field mappings, get index, get data stream, ilm explain,
  307. mappings, search shards, settings, validate query).
  308. This privilege is available for use primarily by {kib} users.
  309. `write`::
  310. Privilege to perform all write operations to documents, which includes the
  311. permission to index, update, and delete documents as well as performing bulk
  312. operations, while also allowing to dynamically update the index mapping.
  313. +
  314. deprecated:[8.0] It also grants the permission to update the index mapping (but
  315. not the data streams mapping), using the {ref}/indices-put-mapping.html[updating mapping API].
  316. This will be retracted in a future major release.
  317. ==== Run as privilege
  318. The `run_as` permission enables an authenticated user to submit requests on
  319. behalf of another user. The value can be a user name or a comma-separated list
  320. of user names. (You can also specify users as an array of strings or a YAML
  321. sequence.) For more information, see
  322. <<run-as-privilege>>.
  323. [[application-privileges]]
  324. ==== Application privileges
  325. Application privileges are managed within {es} and can be retrieved with the
  326. <<security-api-has-privileges,has privileges API>> and the
  327. <<security-api-get-privileges,get application privileges API>>. They do
  328. not, however, grant access to any actions or resources within {es}. Their
  329. purpose is to enable applications to represent and store their own privilege
  330. models within {es} roles.
  331. To create application privileges, use the
  332. <<security-api-put-privileges,add application privileges API>>. You can
  333. then associate these application privileges with roles, as described in
  334. <<defining-roles>>.