get-user-privileges.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --
  2. :api: get-user-privileges
  3. :request: GetUserPrivilegesRequest
  4. :response: GetUserPrivilegesResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Get User Privileges API
  9. Retrieves security privileges for the logged in user.
  10. include::../execution-no-req.asciidoc[]
  11. [id="{upid}-{api}-response"]
  12. ==== Get User Privileges Response
  13. The returned +{response}+ contains the following properties
  14. `clusterPrivileges`::
  15. A `Set` of all _cluster_ privileges that are held by the user.
  16. This will be the union of all the _cluster_ privileges from the user's roles.
  17. `globalPrivileges`::
  18. A `Set` of all _global_ privileges that are held by the user.
  19. This will be the union of all the _global_ privileges from the user's roles.
  20. Because this a union of multiple roles, it may contain multiple privileges for
  21. the same `category` and `operation` (which is why it is represented as a `Set`
  22. rather than a single object).
  23. `indicesPrivileges`::
  24. A `Set` of all _index_ privileges that are held by the user.
  25. This will be the union of all the _index_ privileges from the user's roles.
  26. Because this a union of multiple roles, it may contain multiple privileges for
  27. the same `index`, and those privileges may have independent field level security
  28. access grants and/or multiple document level security queries.
  29. `applicationPrivileges`::
  30. A `Set` of all _application_ privileges that are held by the user.
  31. This will be the union of all the _application_ privileges from the user's roles.
  32. `runAsPrivilege`::
  33. A `Set` representation of the _run-as_ privilege that is held by the user.
  34. This will be the union of the _run-as_ privilege from each of the user's roles.
  35. ["source","java",subs="attributes,callouts,macros"]
  36. --------------------------------------------------
  37. include-tagged::{doc-tests-file}[{api}-response]
  38. --------------------------------------------------