privileges.asciidoc 15 KB

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