get-builtin-privileges.asciidoc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. [role="xpack"]
  2. [[security-api-get-builtin-privileges]]
  3. === Get builtin privileges API
  4. ++++
  5. <titleabbrev>Get builtin privileges</titleabbrev>
  6. ++++
  7. Retrieves the list of <<privileges-list-cluster,cluster privileges>> and
  8. <<privileges-list-indices,index privileges>> that are
  9. available in this version of {es}.
  10. [[security-api-get-builtin-privileges-request]]
  11. ==== {api-request-title}
  12. `GET /_security/privilege/_builtin`
  13. [[security-api-get-builtin-privileges-prereqs]]
  14. ==== {api-prereq-title}
  15. * To use this API, you must have the `read_security` cluster privilege
  16. (or a greater privilege such as `manage_security` or `all`).
  17. [[security-api-get-builtin-privileges-desc]]
  18. ==== {api-description-title}
  19. This API retrieves the set of cluster and index privilege names that are
  20. available in the version of {es} that is being queried.
  21. To check whether a user has particular privileges, use the
  22. <<security-api-has-privileges,has privileges API>>.
  23. [[security-api-get-builtin-privileges-response-body]]
  24. ==== {api-response-body-title}
  25. The response is an object with two fields:
  26. `cluster`:: (array of string) The list of
  27. <<privileges-list-cluster,cluster privileges>> that are understood by this
  28. version of {es}.
  29. `index`:: (array of string) The list of
  30. <<privileges-list-indices,index privileges>> that are understood by this version
  31. of {es}.
  32. `remote_cluster`:: (array of string) The list of
  33. <<roles-remote-cluster-priv, remote_cluster>> privileges that are understood by this version
  34. of {es}.
  35. [[security-api-get-builtin-privileges-example]]
  36. ==== {api-examples-title}
  37. The following example retrieves the names of all builtin privileges:
  38. [source,console]
  39. --------------------------------------------------
  40. GET /_security/privilege/_builtin
  41. --------------------------------------------------
  42. A successful call returns an object with "cluster", "index", and "remote_cluster" fields.
  43. [source,console-result]
  44. --------------------------------------------------
  45. {
  46. "cluster" : [
  47. "all",
  48. "cancel_task",
  49. "create_snapshot",
  50. "cross_cluster_replication",
  51. "cross_cluster_search",
  52. "delegate_pki",
  53. "grant_api_key",
  54. "manage",
  55. "manage_api_key",
  56. "manage_autoscaling",
  57. "manage_behavioral_analytics",
  58. "manage_ccr",
  59. "manage_data_frame_transforms",
  60. "manage_data_stream_global_retention",
  61. "manage_enrich",
  62. "manage_ilm",
  63. "manage_index_templates",
  64. "manage_inference",
  65. "manage_ingest_pipelines",
  66. "manage_logstash_pipelines",
  67. "manage_ml",
  68. "manage_oidc",
  69. "manage_own_api_key",
  70. "manage_pipeline",
  71. "manage_rollup",
  72. "manage_saml",
  73. "manage_search_application",
  74. "manage_search_query_rules",
  75. "manage_search_synonyms",
  76. "manage_security",
  77. "manage_service_account",
  78. "manage_slm",
  79. "manage_token",
  80. "manage_transform",
  81. "manage_user_profile",
  82. "manage_watcher",
  83. "monitor",
  84. "monitor_data_frame_transforms",
  85. "monitor_data_stream_global_retention",
  86. "monitor_enrich",
  87. "monitor_inference",
  88. "monitor_ml",
  89. "monitor_rollup",
  90. "monitor_snapshot",
  91. "monitor_text_structure",
  92. "monitor_transform",
  93. "monitor_watcher",
  94. "none",
  95. "post_behavioral_analytics_event",
  96. "read_ccr",
  97. "read_connector_secrets",
  98. "read_fleet_secrets",
  99. "read_ilm",
  100. "read_pipeline",
  101. "read_security",
  102. "read_slm",
  103. "transport_client",
  104. "write_connector_secrets",
  105. "write_fleet_secrets"
  106. ],
  107. "index" : [
  108. "all",
  109. "auto_configure",
  110. "create",
  111. "create_doc",
  112. "create_index",
  113. "cross_cluster_replication",
  114. "cross_cluster_replication_internal",
  115. "delete",
  116. "delete_index",
  117. "index",
  118. "maintenance",
  119. "manage",
  120. "manage_data_stream_lifecycle",
  121. "manage_follow_index",
  122. "manage_ilm",
  123. "manage_leader_index",
  124. "monitor",
  125. "none",
  126. "read",
  127. "read_cross_cluster",
  128. "view_index_metadata",
  129. "write"
  130. ],
  131. "remote_cluster" : [
  132. "monitor_enrich"
  133. ]
  134. }
  135. --------------------------------------------------