# How to deal with password in watcher

**URL:** https://discuss.elastic.co/t/how-to-deal-with-password-in-watcher/218497
**Category:** Elasticsearch
**Created:** [February 10, 2020, 1:46am UTC](https://discuss.elastic.co/t/how-to-deal-with-password-in-watcher/218497 "2020-02-10T01:46:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![janice](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@janice](https://discuss.elastic.co/u/janice)
#### Post date: [February 10, 2020, 1:46am UTC](https://discuss.elastic.co/t/how-to-deal-with-password-in-watcher/218497/1 "2020-02-10T01:46:09Z")

</div>

I am using watcher with webhook to login an IM tool which can only put username and password in payload as a SOAP message.  
Thus, I cannot benefit from password field encryption in HTTP basic authentication block.  
May I know if there is any solution to avoid storing the plain password in watcher? e.g. any hash functions/ put the password in keystore

Thanks a lot.

---

<div class="post-metadata">

### Author: ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)
#### Post date: [February 10, 2020, 2:23am UTC](https://discuss.elastic.co/t/how-to-deal-with-password-in-watcher/218497/2 "2020-02-10T02:23:37Z")

</div>

Hi @janice - Welcome to our communiy forums!

You may want to check our documentation about [Encrypting sensitive data in Watcher](https://www.elastic.co/guide/en/elasticsearch/reference/current/encrypting-data.html).

I hope that helps.

---

<div class="post-metadata">

### Author: ![janice](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@janice](https://discuss.elastic.co/u/janice)
#### Post date: [February 10, 2020, 3:24am UTC](https://discuss.elastic.co/t/how-to-deal-with-password-in-watcher/218497/3 "2020-02-10T03:24:55Z")

</div>

Hello, thanks for your reply. Is it only applicable to "password" field? Thanks.

---

<div class="post-metadata">

### Author: ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)
#### Post date: [February 10, 2020, 4:39am UTC](https://discuss.elastic.co/t/how-to-deal-with-password-in-watcher/218497/4 "2020-02-10T04:39:34Z")

</div>

@janice - Yes it is only applicable for the `password` (as mentioned in [our documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/encrypting-data.html)). For your reference, this is the encryption [code](https://github.com/elastic/elasticsearch/blob/e1206a6272d1ce2269efa97119071584cc35f44c/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/BasicAuth.java#L85).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 9, 2020, 4:39am UTC](https://discuss.elastic.co/t/how-to-deal-with-password-in-watcher/218497/5 "2020-03-09T04:39:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
