# Adding a basic user/pass authentication for ElasticSearch

**URL:** <https://discuss.elastic.co/t/adding-a-basic-user-pass-authentication-for-elasticsearch/256822>\
**Category:** Elasticsearch\
**Created:** [November 26, 2020, 8:17pm UTC](https://discuss.elastic.co/t/adding-a-basic-user-pass-authentication-for-elasticsearch/256822 "2020-11-26T20:17:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yattaes](https://avatars.discourse-cdn.com/v4/letter/y/b9e5f3/32.png) [@yattaes](https://discuss.elastic.co/u/yattaes)\
**Post date:** [November 26, 2020, 8:17pm UTC](https://discuss.elastic.co/t/adding-a-basic-user-pass-authentication-for-elasticsearch/256822/1 "2020-11-26T20:17:14Z")

</div>

Hi,  
I deployed Elasticsearch with the following the page below to my Azure Kubernetes environment.

> [Deploy an Elasticsearch cluster | Elastic Cloud on Kubernetes [master] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-deploy-elasticsearch.html)

It works fine.

But I want to add a basic user/password authentication for Elasticsearch page. I really don't get it why it's so complicated and needs to Google it.

Then I checked this page;

> `https://www.elastic.co/guide/en/elasticsearch/reference/current/get-started-enable-security.html`

I guess I need to add "xpack.security.enabled: true" to elasticsearch.yaml file, but to where? How can I do that? I c/p and put the yaml file and it didn't worked.

> `https://www.elastic.co/guide/en/elasticsearch/reference/current/get-started-enable-security.html`

Then the documentation below mentioned about the creating passwords for built-in users, but they mentioned only manual installations, not sure how to do with Kubernetes?

`

> [https://www.elastic.co/guide/en/elasticsearch/reference/current/get-started-built-in-users.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-started-built-in-users.html)

`

Is there any basic documentation available for creating authentication on Elasticsearch? How can I do that?

Ps: Elastic documentation is really bad, in my opinion. It needs to be revised.

Regards.

---

<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:** [December 24, 2020, 8:17pm UTC](https://discuss.elastic.co/t/adding-a-basic-user-pass-authentication-for-elasticsearch/256822/2 "2020-12-24T20:17:24Z")

</div>

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