privileges.asciidoc 19 KB

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