# Poretect plain text password in Kibana yml file

**URL:** <https://discuss.elastic.co/t/poretect-plain-text-password-in-kibana-yml-file/261999>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [January 23, 2021, 4:51pm UTC](https://discuss.elastic.co/t/poretect-plain-text-password-in-kibana-yml-file/261999 "2021-01-23T16:51:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![navin1093](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@navin1093](https://discuss.elastic.co/u/navin1093)\
**Post date:** [January 23, 2021, 4:51pm UTC](https://discuss.elastic.co/t/poretect-plain-text-password-in-kibana-yml-file/261999/1 "2021-01-23T16:51:40Z")

</div>

Hi experts,

Please share me way to protect hard coded sensitive data in kibana.yml

```auto
elasticsearch.username: "kibana"
elasticsearch.password: "PasswordAsPlainText"

```

For logstash i use keystore. so i just need use ${ES\_PWD}. However, in kibana i tried reference it in yml it was not working. The system halted

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [January 23, 2021, 5:09pm UTC](https://discuss.elastic.co/t/poretect-plain-text-password-in-kibana-yml-file/261999/2 "2021-01-23T17:09:01Z")

</div>

Are you trying to use the keystore generated from Logstash? If so keystores are different from Logstash to Kibana.

[Create a keystore](https://www.elastic.co/guide/en/kibana/current/secure-settings.html) using the Kibana commands.

---

<div class="post-metadata">

**Author:** ![navin1093](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@navin1093](https://discuss.elastic.co/u/navin1093)\
**Post date:** [January 24, 2021, 2:58am UTC](https://discuss.elastic.co/t/poretect-plain-text-password-in-kibana-yml-file/261999/3 "2021-01-24T02:58:28Z")

</div>

thanks. i tried bin/kibana-keystore create however, i am hitting below error

```auto
FATAL CLI ERROR Error: ENOENT: no such file or directory, open '/usr/share/kibana/config/kibana.keystore'

```

in logstash i use --path/settings. in kibana do you have any hint

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 24, 2021, 5:05pm UTC](https://discuss.elastic.co/t/poretect-plain-text-password-in-kibana-yml-file/261999/4 "2021-01-24T17:05:13Z")

</div>

How did you install kibana? tar.gz, rpm, deb ?

Per the docs [here](https://www.elastic.co/guide/en/kibana/current/secure-settings.html#creating-keystore) it should be putting it in [`path.data`](https://www.elastic.co/guide/en/kibana/current/settings.html#path-data)

Depending on how you installed you can check the directory layout it is in each of the [install sections](https://www.elastic.co/guide/en/kibana/current/install.html)

---

<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:** [February 21, 2021, 5:05pm UTC](https://discuss.elastic.co/t/poretect-plain-text-password-in-kibana-yml-file/261999/5 "2021-02-21T17:05:24Z")

</div>

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