privileges.asciidoc 11 KB

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