# Using secrets in the heartbeat http monitor proxy url

**URL:** <https://discuss.elastic.co/t/using-secrets-in-the-heartbeat-http-monitor-proxy-url/252792>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [October 21, 2020, 7:46am UTC](https://discuss.elastic.co/t/using-secrets-in-the-heartbeat-http-monitor-proxy-url/252792 "2020-10-21T07:46:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![halltony](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@halltony](https://discuss.elastic.co/u/halltony)\
**Post date:** [October 21, 2020, 7:46am UTC](https://discuss.elastic.co/t/using-secrets-in-the-heartbeat-http-monitor-proxy-url/252792/1 "2020-10-21T07:46:39Z")

</div>

Our proxy server requires credentials. I don't want these in plain text in the heartbeat configuration and would there like to add them to a keystore and use syntax like:

```auto
proxy_url: "http://${USER}:${PASS}@myproxy:80"

```

This doesn't seem to work. The heartbeat logfile displays the following error:

2020-10-20T15:29:45.460+0100 ERROR [reload] cfgfile/list.go:96 Error creating runner from config: job err missing field accessing 'proxy\_url' (source:'xxxxxxxx.yml')

Should this work? If not is their an alternative? If it should, any idea what I am doing wrong?

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [October 21, 2020, 1:02pm UTC](https://discuss.elastic.co/t/using-secrets-in-the-heartbeat-http-monitor-proxy-url/252792/2 "2020-10-21T13:02:12Z")

</div>

Could you please share the full configuration of your Heartbeat instance? Also, the debug logs would be useful as well (`./heartbeat -e -d "*"`) and the list of keys defined in your keystore (`./heartbeat keystore list`).

---

<div class="post-metadata">

**Author:** ![halltony](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@halltony](https://discuss.elastic.co/u/halltony)\
**Post date:** [October 21, 2020, 1:17pm UTC](https://discuss.elastic.co/t/using-secrets-in-the-heartbeat-http-monitor-proxy-url/252792/3 "2020-10-21T13:17:44Z")

</div>

Thanks very much for respoding kvch.

I can do this yes but it will take time for me to remove some sensitive content.

Before I do this, would it be unreasonable to ask whether the syntax I have used should work? I can confirm that both keys are definitely available in the keystore.

---

<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:** [November 18, 2020, 3:17pm UTC](https://discuss.elastic.co/t/using-secrets-in-the-heartbeat-http-monitor-proxy-url/252792/4 "2020-11-18T15:17:50Z")

</div>

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