update-settings.asciidoc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. [role="xpack"]
  2. [[security-api-update-settings]]
  3. === Update Security index settings
  4. ++++
  5. <titleabbrev>Update Security settings</titleabbrev>
  6. ++++
  7. [[security-api-update-settings-prereqs]]
  8. ==== {api-prereq-title}
  9. * To use this API, you must have at least the `manage_security` cluster privilege.
  10. [[security-api-update-settings-desc]]
  11. ==== {api-description-title}
  12. This API allows a user to modify the settings for the Security internal indices
  13. (`.security` and associated indices). Only a subset of settings are allowed to
  14. be modified. This includes:
  15. - `index.auto_expand_replicas`
  16. - `index.number_of_replicas`
  17. An example of modifying the Security settings:
  18. [source,console]
  19. -----------------------------------------------------------
  20. PUT /_security/settings
  21. {
  22. "security": {
  23. "index.auto_expand_replicas": "0-all"
  24. },
  25. "security-tokens": {
  26. "index.auto_expand_replicas": "0-all"
  27. },
  28. "security-profile": {
  29. "index.auto_expand_replicas": "0-all"
  30. }
  31. }
  32. -----------------------------------------------------------
  33. // TEST[skip:making sure all the indices have been created reliably is difficult]
  34. The configured settings can be retrieved using the
  35. <<security-api-get-settings,Get Security index settings>> API. If a given index
  36. is not in use on the system, but settings are provided for it, the request will
  37. be rejected - this API does not yet support configuring the settings for these
  38. indices before they are in use.
  39. ==== {api-request-body-title}
  40. `security`::
  41. (Optional, object) Settings to be used for the index used for most security
  42. configuration, including Native realm users and roles configured via the API.
  43. `security-tokens`::
  44. (Optional, object) Settings to be used for the index used to store
  45. <<security-api-get-token,tokens>>.
  46. `security`::
  47. (Optional, object) Settings to be used for the index used to store
  48. <<security-api-activate-user-profile, profile>> information.