encrypting-data.asciidoc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [[encrypting-data]]
  2. == Encrypting Sensitive Data in {watcher}
  3. Watches might have access to sensitive data such as HTTP basic authentication
  4. information or details about your SMTP email service. You can encrypt this
  5. data by generating a key and adding some secure settings on each node in your
  6. cluster.
  7. Every `password` field that is used in your watch within an HTTP basic
  8. authentication block - for example within a webhook, an HTTP input or when using
  9. the reporting email attachment - will not be stored as plain text anymore. Also
  10. be aware, that there is no way to configure your own fields in a watch to be
  11. encrypted.
  12. To encrypt sensitive data in {watcher}:
  13. . Use the {ref}/syskeygen.html[elasticsearch-syskeygen] command to create a system key file.
  14. . Copy the `system_key` file to all of the nodes in your cluster.
  15. +
  16. --
  17. IMPORTANT: The system key is a symmetric key, so the same key must be used on
  18. every node in the cluster.
  19. --
  20. . Set the
  21. {ref}/notification-settings.html[`xpack.watcher.encrypt_sensitive_data` setting]:
  22. +
  23. --
  24. [source,sh]
  25. ----------------------------------------------------------------
  26. xpack.watcher.encrypt_sensitive_data: true
  27. ----------------------------------------------------------------
  28. --
  29. . Set the
  30. {ref}/notification-settings.html[`xpack.watcher.encryption_key` setting] in the
  31. {ref}/secure-settings.html[{es} keystore] on each node in the cluster.
  32. +
  33. --
  34. For example, run the following command to import the `system_key` file on
  35. each node:
  36. [source,sh]
  37. ----------------------------------------------------------------
  38. bin/elasticsearch-keystore add-file xpack.watcher.encryption_key <filepath>/system_key
  39. ----------------------------------------------------------------
  40. --
  41. . Delete the `system_key` file on each node in the cluster.
  42. NOTE: Existing watches are not affected by these changes. Only watches that you
  43. create after following these steps have encryption enabled.