# How to add Authentication Information into a Connection Request?

**URL:** <https://discuss.elastic.co/t/how-to-add-authentication-information-into-a-connection-request/101275>\
**Category:** Elasticsearch\
**Created:** [September 21, 2017, 6:56am UTC](https://discuss.elastic.co/t/how-to-add-authentication-information-into-a-connection-request/101275 "2017-09-21T06:56:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ong/32/40766_2.png) [@Ong](https://discuss.elastic.co/u/Ong)\
**Post date:** [September 21, 2017, 6:56am UTC](https://discuss.elastic.co/t/how-to-add-authentication-information-into-a-connection-request/101275/1 "2017-09-21T06:56:19Z")

</div>

I have a dockerised container of Elasticsearch and it comes by default with X-Pack security. The application will connect to the dockerised Elasticsearch container using a Elasticsearch-ReactJS library called Searchkit.

How do I add authentication information for connection requests and searches to Elasticsearch?

I am getting an error from the browser: Failed to load resource: the server responded with a status of 401 (Unauthorized)

When I tested the application connection on a local copy of Elasticsearch without X-pack, there were no errors.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 21, 2017, 7:40am UTC](https://discuss.elastic.co/t/how-to-add-authentication-information-into-a-connection-request/101275/2 "2017-09-21T07:40:33Z")

</div>

You'd probably need to consult the searchkit documentation.

What version of the Elastic Stack are you using?

---

<div class="post-metadata">

**Author:** ![Ong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ong/32/40766_2.png) [@Ong](https://discuss.elastic.co/u/Ong)\
**Post date:** [September 26, 2017, 2:06am UTC](https://discuss.elastic.co/t/how-to-add-authentication-information-into-a-connection-request/101275/3 "2017-09-26T02:06:06Z")

</div>

I am using version 5.5.0

---

<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:** [October 24, 2017, 2:06am UTC](https://discuss.elastic.co/t/how-to-add-authentication-information-into-a-connection-request/101275/4 "2017-10-24T02:06:09Z")

</div>

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