privileges.asciidoc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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. `create_snapshot`::
  12. Privileges to create snapshots for existing repositories. Can also list and view
  13. details on existing repositories and snapshots.
  14. `monitor_snapshot`::
  15. Privileges to list and view details on existing repositories and snapshots.
  16. `manage`::
  17. Builds on `monitor` and adds cluster operations that change values in the cluster.
  18. This includes snapshotting, updating settings, and rerouting. It also includes
  19. obtaining snapshot and restore status. This privilege does not include the
  20. ability to manage security.
  21. `manage_api_key`::
  22. All security-related operations on {es} API keys including
  23. <<security-api-create-api-key,creating new API keys>>,
  24. <<security-api-get-api-key,retrieving information about API keys>>, and
  25. <<security-api-invalidate-api-key,invalidating API keys>>.
  26. +
  27. --
  28. [NOTE]
  29. ======
  30. * When you create new API keys, they will always be owned by the authenticated
  31. user.
  32. * When you have this privilege, you can invalidate your own API keys and those
  33. owned by other users.
  34. ======
  35. --
  36. `manage_ccr`::
  37. All {ccr} operations related to managing follower indices and auto-follow
  38. patterns. It also includes the authority to grant the privileges necessary to
  39. manage follower indices and auto-follow patterns. This privilege is necessary
  40. only on clusters that contain follower indices.
  41. `manage_ilm`::
  42. All {Ilm} operations related to managing policies.
  43. `manage_index_templates`::
  44. All operations on index templates.
  45. `manage_ingest_pipelines`::
  46. All operations on ingest node pipelines.
  47. `manage_ml`::
  48. All {ml} operations, such as creating and deleting {dfeeds}, jobs, and model
  49. snapshots.
  50. +
  51. --
  52. NOTE: {dfeeds-cap} that were created prior to version 6.2 or created when
  53. {security-features} were disabled run as a system user with elevated privileges,
  54. including permission to read all indices. Newer {dfeeds} run with the security
  55. roles of the user who created or updated them.
  56. --
  57. `manage_oidc`::
  58. Enables the use of {es} APIs
  59. (<<security-api-oidc-prepare-authentication,OpenID connect prepare authentication>>,
  60. <<security-api-oidc-authenticate,OpenID connect authenticate>>, and
  61. <<security-api-oidc-logout,OpenID connect logout>>)
  62. to initiate and manage OpenID Connect authentication on behalf of other users.
  63. `manage_own_api_key`::
  64. All security-related operations on {es} API keys that are owned by the current
  65. authenticated user. The operations include
  66. <<security-api-create-api-key,creating new API keys>>,
  67. <<security-api-get-api-key,retrieving information about API keys>>, and
  68. <<security-api-invalidate-api-key,invalidating API keys>>.
  69. `manage_pipeline`::
  70. All operations on ingest pipelines.
  71. `manage_rollup`::
  72. All rollup operations, including creating, starting, stopping and deleting
  73. rollup jobs.
  74. `manage_saml`::
  75. Enables the use of internal {es} APIs to initiate and manage SAML authentication
  76. on behalf of other users.
  77. `manage_security`::
  78. All security-related operations such as CRUD operations on users and roles and
  79. cache clearing.
  80. `manage_slm`::
  81. All {slm} ({slm-init}) actions, including creating and updating policies and
  82. starting and stopping {slm-init}.
  83. `manage_token`::
  84. All security-related operations on tokens that are generated by the {es} Token
  85. Service.
  86. `manage_transform`::
  87. All operations related to managing {transforms}.
  88. `manage_watcher`::
  89. All watcher operations, such as putting watches, executing, activate or acknowledging.
  90. +
  91. --
  92. NOTE: Watches that were created prior to version 6.1 or created when the
  93. {security-features} were disabled run as a system user with elevated privileges,
  94. including permission to read and write all indices. Newer watches run with the
  95. security roles of the user who created or updated them.
  96. --
  97. `monitor`::
  98. All cluster read-only operations, like cluster health and state, hot threads,
  99. node info, node and cluster stats, and pending cluster tasks.
  100. `monitor_transform`::
  101. All read-only operations related to {transforms}.
  102. `monitor_ml`::
  103. All read-only {ml} operations, such as getting information about {dfeeds}, jobs,
  104. model snapshots, or results.
  105. `monitor_rollup`::
  106. All read-only rollup operations, such as viewing the list of historical and
  107. currently running rollup jobs and their capabilities.
  108. `monitor_watcher`::
  109. All read-only watcher operations, such as getting a watch and watcher stats.
  110. `read_ccr`::
  111. All read-only {ccr} operations, such as getting information about indices and
  112. metadata for leader indices in the cluster. It also includes the authority to
  113. check whether users have the appropriate privileges to follow leader indices.
  114. This privilege is necessary only on clusters that contain leader indices.
  115. `read_ilm`::
  116. All read-only {Ilm} operations, such as getting policies and checking the
  117. status of {Ilm}
  118. read_slm::
  119. All read-only {slm-init} actions, such as getting policies and checking the
  120. {slm-init} status.
  121. `transport_client`::
  122. All privileges necessary for a transport client to connect. Required by the remote
  123. cluster to enable <<cross-cluster-configuring,{ccs}>>.
  124. [[privileges-list-indices]]
  125. ==== Indices privileges
  126. [horizontal]
  127. `all`::
  128. Any action on an index or data stream.
  129. `auto_configure`::
  130. Permits auto-creation of indices and data streams. An auto-create action is the
  131. result of an <<docs-index_,index>> or <<docs-bulk,bulk>> request that targets a
  132. non-existent index or data stream rather than an explicit
  133. <<indices-create-index,create index>> or
  134. <<indices-create-data-stream,create data stream>> request. Also permits
  135. auto-update of mappings on indices and data streams if they do not contradict
  136. existing mappings. An auto-update mapping action is the result of an index or
  137. bulk request on an index or data stream that contains new fields that may
  138. be mapped rather than an explicit <<indices-put-mapping,put mapping>> request.
  139. `create`::
  140. Privilege to index documents. Also grants access to the update mapping
  141. action.
  142. +
  143. --
  144. NOTE: This privilege does not restrict the index operation to the creation
  145. of documents but instead restricts API use to the index API. The index API
  146. allows a user to overwrite a previously indexed document. See the `create_doc`
  147. privilege for an alternative.
  148. --
  149. `create_doc`::
  150. Privilege to index documents. Also grants access to the update mapping action.
  151. However, it does not enable a user to update existing documents.
  152. +
  153. --
  154. [NOTE]
  155. ====
  156. This privilege relies on the `op_type` of indexing requests (<<docs-index_>> and
  157. <<docs-bulk>>). When ingesting documents as a user who has the `create_doc`
  158. privilege (and no higher privilege such as `index` or `write`), you must ensure that
  159. 'op_type' is set to 'create' through one of the following:
  160. * Explicitly setting the `op_type` in the index or bulk APIs
  161. * Using the `_create` endpoint for the index API
  162. * Creating a document with an auto-generated `_id`
  163. ====
  164. --
  165. `create_index`::
  166. Privilege to create an index or data stream. A create index request may contain
  167. aliases to be added to the index once created. In that case the request
  168. requires the `manage` privilege as well, on both the index and the aliases
  169. names.
  170. `delete`::
  171. Privilege to delete documents.
  172. `delete_index`::
  173. Privilege to delete an index or data stream.
  174. `index`::
  175. Privilege to index and update documents. Also grants access to the update
  176. mapping action.
  177. `maintenance`::
  178. Permits refresh, flush, synced flush and force merge index administration operations.
  179. No privilege to read or write index data or otherwise manage the index.
  180. `manage`::
  181. All `monitor` privileges plus index and data stream administration (aliases,
  182. analyze, cache clear, close, delete, exists, flush, mapping, open, force merge,
  183. refresh, settings, search shards, templates, validate).
  184. `manage_follow_index`::
  185. All actions that are required to manage the lifecycle of a follower index, which
  186. includes creating a follower index, closing it, and converting it to a regular
  187. index. This privilege is necessary only on clusters that contain follower indices.
  188. `manage_ilm`::
  189. All {Ilm} operations relating to managing the execution of policies of an index
  190. or data stream. This includes operations such as retrying policies and removing
  191. a policy from an index or data stream.
  192. `manage_leader_index`::
  193. All actions that are required to manage the lifecycle of a leader index, which
  194. includes <<ccr-post-forget-follower,forgetting a follower>>. This
  195. privilege is necessary only on clusters that contain leader indices.
  196. `monitor`::
  197. All actions that are required for monitoring (recovery, segments info, index
  198. stats and status).
  199. `read`::
  200. Read-only access to actions (count, explain, get, mget, get indexed scripts,
  201. more like this, multi percolate/search/termvector, percolate, scroll,
  202. clear_scroll, search, suggest, tv).
  203. `read_cross_cluster`::
  204. Read-only access to the search action from a <<cross-cluster-configuring,remote cluster>>.
  205. `view_index_metadata`::
  206. Read-only access to index and data stream metadata (aliases, aliases exists,
  207. get index, get data stream, exists, field mappings, mappings, search shards,
  208. type exists, validate, warmers, settings, ilm). This privilege is available
  209. for use primarily by {kib} users.
  210. `write`::
  211. Privilege to perform all write operations to documents, which includes the
  212. permission to index, update, and delete documents as well as performing bulk
  213. operations. Also grants access to the update mapping action.
  214. ==== Run as privilege
  215. The `run_as` permission enables an authenticated user to submit requests on
  216. behalf of another user. The value can be a user name or a comma-separated list
  217. of user names. (You can also specify users as an array of strings or a YAML
  218. sequence.) For more information, see
  219. <<run-as-privilege>>.
  220. [[application-privileges]]
  221. ==== Application privileges
  222. Application privileges are managed within {es} and can be retrieved with the
  223. <<security-api-has-privileges,has privileges API>> and the
  224. <<security-api-get-privileges,get application privileges API>>. They do
  225. not, however, grant access to any actions or resources within {es}. Their
  226. purpose is to enable applications to represent and store their own privilege
  227. models within {es} roles.
  228. To create application privileges, use the
  229. <<security-api-put-privileges,add application privileges API>>. You can
  230. then associate these application privileges with roles, as described in
  231. <<defining-roles>>.