##Option 2 - Kibana customHeaders
This solution is very similar to Option 1. Using the elasticsearch.customHeaders setting in the kibana.yml you can pass the same Basic Auth headers to Elasticsearch on every request. However, you'll have to disable X-Pack Security in Kibana for this option to work.
This solution doesn't require a reverse proxy; however, you will be forced to use Kibana as the same user, and disable X-Pack Security.
In such cases it is very useful to provide a link to the original discussion from where you have copied that text as the added context is necessary for a proper answer. In this case it was this one and it refers to version 5.4 of the Elastic Stack.
It's not very clear if your question is about using the setting itself or if it is about the solution described in Option 2 in that post.
It is not necessary to install X-Pack to use elasticsearch.customHeaders settings in Kibana. However , for Option 2 to work as descrived in the aforementioned post, you need to have security enabled in Elasticsearch which requires a Gold licencse.
If the above doesn't answer your question, please take the time to describe what you want to achieve and add a little more context to your question.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.