slm-security.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. [[slm-and-security]]
  2. === Security and {slm-init}
  3. The following cluster privileges control access to the {slm-init} actions when
  4. {es} {security-features} are enabled:
  5. `manage_slm`:: Allows a user to perform all {slm-init} actions, including creating and updating policies
  6. and starting and stopping {slm-init}.
  7. `read_slm`:: Allows a user to perform all read-only {slm-init} actions,
  8. such as getting policies and checking the {slm-init} status.
  9. `cluster:admin/snapshot/*`:: Allows a user to take and delete snapshots of any
  10. index, whether or not they have access to that index.
  11. You can create and manage roles to assign these privileges through {kib} Management.
  12. To grant the privileges necessary to create and manage {slm-init} policies and snapshots,
  13. you can set up a role with the `manage_slm` and `cluster:admin/snapshot/*` cluster privileges
  14. and full access to the {slm-init} history indices.
  15. For example, the following request creates an `slm-admin` role:
  16. [source,console]
  17. -----------------------------------
  18. POST /_security/role/slm-admin
  19. {
  20. "cluster": ["manage_slm", "cluster:admin/snapshot/*"],
  21. "indices": [
  22. {
  23. "names": [".slm-history-*"],
  24. "privileges": ["all"]
  25. }
  26. ]
  27. }
  28. -----------------------------------
  29. // TEST[skip:security is not enabled here]
  30. To grant read-only access to {slm-init} policies and the snapshot history,
  31. you can set up a role with the `read_slm` cluster privilege and read access
  32. to the {slm} history indices.
  33. For example, the following request creates a `slm-read-only` role:
  34. [source,console]
  35. -----------------------------------
  36. POST /_security/role/slm-read-only
  37. {
  38. "cluster": ["read_slm"],
  39. "indices": [
  40. {
  41. "names": [".slm-history-*"],
  42. "privileges": ["read"]
  43. }
  44. ]
  45. }
  46. -----------------------------------
  47. // TEST[skip:security is not enabled here]