# Hide elasticsearch superuser name and password in logstash conf

**URL:** <https://discuss.elastic.co/t/hide-elasticsearch-superuser-name-and-password-in-logstash-conf/271124>\
**Category:** Logstash\
**Created:** [April 23, 2021, 8:17pm UTC](https://discuss.elastic.co/t/hide-elasticsearch-superuser-name-and-password-in-logstash-conf/271124 "2021-04-23T20:17:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaeemmasood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaeemmasood/32/102383_2.png) [@zaeemmasood](https://discuss.elastic.co/u/zaeemmasood)\
**Post date:** [April 23, 2021, 8:17pm UTC](https://discuss.elastic.co/t/hide-elasticsearch-superuser-name-and-password-in-logstash-conf/271124/1 "2021-04-23T20:17:29Z")

</div>

Hello all,

The logstash (7.x) in the environment resides on the same server as filebeat. I am reluctant to mention superuser name and password info for elasticsearch in logstash.conf.

Can I create a new user in Kibana and assign it a role which is not as powerful as superuser but allows logstash to push messages to elasticsearch? What role would that be?

Thanks

---

<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:** [April 23, 2021, 8:39pm UTC](https://discuss.elastic.co/t/hide-elasticsearch-superuser-name-and-password-in-logstash-conf/271124/2 "2021-04-23T20:39:05Z")

</div>

Use the secrets keystore [here](https://www.elastic.co/guide/en/logstash/current/keystore.html) it is exactly for this use case.

In addition you can create a `logstash_writer`role that has access to the indices you want to write to [here](https://www.elastic.co/guide/en/logstash/current/ls-security.html#ls-http-auth-basic) is some documentation on that.

---

<div class="post-metadata">

**Author:** ![zaeemmasood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaeemmasood/32/102383_2.png) [@zaeemmasood](https://discuss.elastic.co/u/zaeemmasood)\
**Post date:** [April 26, 2021, 3:17pm UTC](https://discuss.elastic.co/t/hide-elasticsearch-superuser-name-and-password-in-logstash-conf/271124/3 "2021-04-26T15:17:11Z")

</div>

Thank you!

---

<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:** [May 24, 2021, 3:17pm UTC](https://discuss.elastic.co/t/hide-elasticsearch-superuser-name-and-password-in-logstash-conf/271124/4 "2021-05-24T15:17:31Z")

</div>

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