# Authenticated webhook watcher integrations

**URL:** https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [August 8, 2018, 6:42pm UTC](https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578 "2018-08-08T18:42:38Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kcphysics](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@kcphysics](https://discuss.elastic.co/u/kcphysics)
#### Post date: [August 8, 2018, 6:42pm UTC](https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578/1 "2018-08-08T18:42:39Z")

</div>

I am trying to figure out a way to get a watcher webhook to authenticate with a Bearer Token style authentication, where a request with credentials is sent, a bearer token is received, and that bearer token can be used in a standard webhook post.

Is there a way to chain webhooks together such that I can use Watcher's webhook action to authenticate then post data?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [August 8, 2018, 10:35pm UTC](https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578/2 "2018-08-08T22:35:52Z")

</div>

you could use the chain input to do this. first retrieve the token, then use it in the action.

---

<div class="post-metadata">

### Author: ![kcphysics](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@kcphysics](https://discuss.elastic.co/u/kcphysics)
#### Post date: [August 9, 2018, 12:26pm UTC](https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578/3 "2018-08-09T12:26:59Z")

</div>

Where could/would I be able to store credential information? Would that have to be as plain text in the watch definition?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [August 9, 2018, 12:39pm UTC](https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578/4 "2018-08-09T12:39:34Z")

</div>

watcher has the possibility to store basic auth password information in an encrypted fashion (of the http input or a webhook action), when the watch is stored, but one cannot apply this to arbitrary fields.

See [https://www.elastic.co/guide/en/elastic-stack-overview/6.3/encrypting-data.html](https://www.elastic.co/guide/en/elastic-stack-overview/6.3/encrypting-data.html)

---

<div class="post-metadata">

### Author: ![kcphysics](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@kcphysics](https://discuss.elastic.co/u/kcphysics)
#### Post date: [August 9, 2018, 7:10pm UTC](https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578/5 "2018-08-09T19:10:01Z")

</div>

To understand your reply fully, the idea would be to generate and install the encryption key then embed the credentials directly into watcher configuration.

Is that correct?

[EDIT]

Actually, I think I understand now, using the keystores provided. I will investigate this.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [August 10, 2018, 7:09am UTC](https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578/6 "2018-08-10T07:09:28Z")

</div>

the credentials would be part of the watch creation via the put watch API, but would be replaced before being stored.

---

<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: [September 7, 2018, 7:09am UTC](https://discuss.elastic.co/t/authenticated-webhook-watcher-integrations/143578/7 "2018-09-07T07:09:34Z")

</div>

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