Encrypting sensitive data in Watcher
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Stack
Generally available
Watches might have access to sensitive data such as HTTP basic authentication information or details about your SMTP email service. You can encrypt this data by generating a key and adding some secure settings on each node in your cluster.
Every password field that is used in your watch within an HTTP basic authentication block - for example within a webhook, an HTTP input or when using the reporting email attachment - will not be stored as plain text anymore. Also be aware, that there is no way to configure your own fields in a watch to be encrypted.
To encrypt sensitive data in Watcher:
Use the elasticsearch-syskeygen command to create a system key file.
Copy the
system_keyfile to all of the nodes in your cluster.ImportantThe system key is a symmetric key, so the same key must be used on every node in the cluster.
Set the
xpack.watcher.encrypt_sensitive_datasetting:Shell xpack.watcher.encrypt_sensitive_data: trueSet the
xpack.watcher.encryption_keysetting in the Elasticsearch keystore on each node in the cluster.For example, run the following command to import the
system_keyfile on each node:Shell bin/elasticsearch-keystore add-file xpack.watcher.encryption_key <filepath>/system_keyDelete the
system_keyfile on each node in the cluster.
Existing watches are not affected by these changes. Only watches that you create after following these steps have encryption enabled.