# Is it possible to use encrypted elascticsearch instead of direct username, password in Output plugin of logstash?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-use-encrypted-elascticsearch-instead-of-direct-username-password-in-output-plugin-of-logstash/337647>\
**Category:** Logstash\
**Created:** [July 5, 2023, 10:02am UTC](https://discuss.elastic.co/t/is-it-possible-to-use-encrypted-elascticsearch-instead-of-direct-username-password-in-output-plugin-of-logstash/337647 "2023-07-05T10:02:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![merson](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@merson](https://discuss.elastic.co/u/merson)\
**Post date:** [July 5, 2023, 10:02am UTC](https://discuss.elastic.co/t/is-it-possible-to-use-encrypted-elascticsearch-instead-of-direct-username-password-in-output-plugin-of-logstash/337647/1 "2023-07-05T10:02:02Z")

</div>

I want to use encrypted elasticsearch, So I don't want to use directly username ,password of elasticsearch in logstash. Please provide the any answers.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [July 5, 2023, 1:24pm UTC](https://discuss.elastic.co/t/is-it-possible-to-use-encrypted-elascticsearch-instead-of-direct-username-password-in-output-plugin-of-logstash/337647/2 "2023-07-05T13:24:57Z")

</div>

It is not clear what exactly you want.

You want to hide the username and password for Elasticsearch from Logstash configuration so they do not appear as plain text?

If so you need to create them as variable and add to the Logstash Keystore, follow this [documentation](https://www.elastic.co/guide/en/logstash/current/keystore.html#keystore) to see how to do that.

---

<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:** [August 2, 2023, 1:25pm UTC](https://discuss.elastic.co/t/is-it-possible-to-use-encrypted-elascticsearch-instead-of-direct-username-password-in-output-plugin-of-logstash/337647/3 "2023-08-02T13:25:39Z")

</div>

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