privileges.asciidoc 11 KB

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