# Need help to setup basic HTTP authentication

**URL:** https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259
**Category:** Elasticsearch
**Created:** [June 29, 2012, 11:10am UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259 "2012-06-29T11:10:11Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![aps](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@aps](https://discuss.elastic.co/u/aps)
#### Post date: [June 29, 2012, 11:10am UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/1 "2012-06-29T11:10:11Z")

</div>

I m new in Elasticsearch, I want to implement Besic HTTP Authentication, I  
have downloaded the plugin but not able to implement. The readme files  
doesn't state how to implement it. Any help will be appreciated.

---

<div class="post-metadata">

### Author: ![aps](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@aps](https://discuss.elastic.co/u/aps)
#### Post date: [June 29, 2012, 3:03pm UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/2 "2012-06-29T15:03:38Z")

</div>

On Friday, 29 June 2012 13:10:11 UTC+2, aps wrote:

> I m new in Elasticsearch, I want to implement Besic HTTP Authentication, I  
> have downloaded the plugin but not able to implement. The readme files  
> doesn't state how to implement it. Any help will be appreciated.

---

<div class="post-metadata">

### Author: ![aps](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@aps](https://discuss.elastic.co/u/aps)
#### Post date: [June 29, 2012, 3:04pm UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/3 "2012-06-29T15:04:18Z")

</div>

I tried the read me file instruction... but it is not exactly guiding me to  
setup HTTP plugin.

On Friday, 29 June 2012 13:10:11 UTC+2, aps wrote:

> I m new in Elasticsearch, I want to implement Besic HTTP Authentication, I  
> have downloaded the plugin but not able to implement. The readme files  
> doesn't state how to implement it. Any help will be appreciated.

---

<div class="post-metadata">

### Author: ![Nick\_Dunn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nick_dunn/32/2315_2.png) [@Nick\_Dunn](https://discuss.elastic.co/u/Nick_Dunn)
#### Post date: [June 30, 2012, 12:17pm UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/4 "2012-06-30T12:17:49Z")

</div>

I've found the easiest way is to use Apache as a reverse proxy, implement basic auth there. That's because I'm more familiar with Apache than anything else (Java, ES plugins etc).

---

<div class="post-metadata">

### Author: ![swendel](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@swendel](https://discuss.elastic.co/u/swendel)
#### Post date: [June 30, 2012, 12:32pm UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/5 "2012-06-30T12:32:28Z")

</div>

If anyone is using chef, i wrote a cookbook what has jetty http basic-auth  
implementation.

[https://github.com/sebwendel/chef-elasticsearch.git](https://github.com/sebwendel/chef-elasticsearch.git) use the "0.1.0" branch.

please have a try, feedback is more than be welcome.

If you have trouble just let me know, i would like to help.

2012/6/30 Nick Dunn [nick@nick-dunn.co.uk](mailto:nick@nick-dunn.co.uk)

> I've found the easiest way is to use Apache as a reverse proxy, implement  
> basic auth there. That's because I'm more familiar with Apache than  
> anything else (Java, ES plugins etc).

---

<div class="post-metadata">

### Author: ![jagdeep](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jagdeep](https://discuss.elastic.co/u/jagdeep)
#### Post date: [June 30, 2012, 2:45pm UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/6 "2012-06-30T14:45:25Z")

</div>

You can use this [GitHub - Asquera/elasticsearch-http-basic: HTTP Basic Authentication for Elasticsearch (Discontinued)](https://github.com/Asquera/elasticsearch-http-basic)  
[GitHub - sonian/elasticsearch-jetty](https://github.com/sonian/elasticsearch-jetty)

On Saturday, June 30, 2012 5:47:49 PM UTC+5:30, Nick Dunn wrote:

> I've found the easiest way is to use Apache as a reverse proxy, implement  
> basic auth there. That's because I'm more familiar with Apache than  
> anything else (Java, ES plugins etc).

---

<div class="post-metadata">

### Author: ![Radu\_Gheorghe1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe1/32/2688_2.png) [@Radu\_Gheorghe1](https://discuss.elastic.co/u/Radu_Gheorghe1)
#### Post date: [July 2, 2012, 6:10am UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/7 "2012-07-02T06:10:37Z")

</div>

On Saturday, June 30, 2012 5:45:25 PM UTC+3, jagdeep wrote:

> You can use this [GitHub - Asquera/elasticsearch-http-basic: HTTP Basic Authentication for Elasticsearch (Discontinued)](https://github.com/Asquera/elasticsearch-http-basic)

Yep, it's quite easy:

- download it from here:  
[https://github.com/Asquera/elasticsearch-http-basic/downloads](https://github.com/Asquera/elasticsearch-http-basic/downloads)

- then, from your Elasticsearch home directory (/usr/share/elasticsearch if  
you installed from the .deb package):

# mkdir -p plugins/http-basic

# cp elasticsearch-http-basic-1.0.3.jar plugins/http-basic/

Then you need to add the following to your config, before restarting  
Elasticsearch:

http.basic.enabled: true  
http.basic.user: "myuser"  
http.basic.password: "mypass"

> [GitHub - sonian/elasticsearch-jetty](https://github.com/sonian/elasticsearch-jetty)
> 
> On Saturday, June 30, 2012 5:47:49 PM UTC+5:30, Nick Dunn wrote:
> 
> > I've found the easiest way is to use Apache as a reverse proxy, implement  
> > basic auth there. That's because I'm more familiar with Apache than  
> > anything else (Java, ES plugins etc).

---

<div class="post-metadata">

### Author: ![aps](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@aps](https://discuss.elastic.co/u/aps)
#### Post date: [July 2, 2012, 12:01pm UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/8 "2012-07-02T12:01:14Z")

</div>

Thanks all... I will try it and post comment...

On Friday, 29 June 2012 13:10:11 UTC+2, aps wrote:

> I m new in Elasticsearch, I want to implement Besic HTTP Authentication, I  
> have downloaded the plugin but not able to implement. The readme files  
> doesn't state how to implement it. Any help will be appreciated.

---

<div class="post-metadata">

### Author: ![aps](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@aps](https://discuss.elastic.co/u/aps)
#### Post date: [July 2, 2012, 12:49pm UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/9 "2012-07-02T12:49:30Z")

</div>

I have done the settings.. how do you access it through URL... when I hit  
"user myuser:mypass localhost:9200/sa/emp/1" it says bad URL

any clue?

On Monday, 2 July 2012 08:10:37 UTC+2, Radu Gheorghe wrote:

> On Saturday, June 30, 2012 5:45:25 PM UTC+3, jagdeep wrote:
> 
> > You can use this [GitHub - Asquera/elasticsearch-http-basic: HTTP Basic Authentication for Elasticsearch (Discontinued)](https://github.com/Asquera/elasticsearch-http-basic)
> 
> Yep, it's quite easy:
> 
> - download it from here:  
> [https://github.com/Asquera/elasticsearch-http-basic/downloads](https://github.com/Asquera/elasticsearch-http-basic/downloads)
> 
> - then, from your Elasticsearch home directory (/usr/share/elasticsearch  
> if you installed from the .deb package):
> 
> # mkdir -p plugins/http-basic
> 
> # cp elasticsearch-http-basic-1.0.3.jar plugins/http-basic/
> 
> Then you need to add the following to your config, before restarting  
> Elasticsearch:
> 
> http.basic.enabled: true  
> http.basic.user: "myuser"  
> http.basic.password: "mypass"
> 
> > [GitHub - sonian/elasticsearch-jetty](https://github.com/sonian/elasticsearch-jetty)
> > 
> > On Saturday, June 30, 2012 5:47:49 PM UTC+5:30, Nick Dunn wrote:
> > 
> > > I've found the easiest way is to use Apache as a reverse proxy,  
> > > implement basic auth there. That's because I'm more familiar with Apache  
> > > than anything else (Java, ES plugins etc).

---

<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: [July 6, 2017, 3:21am UTC](https://discuss.elastic.co/t/need-help-to-setup-basic-http-authentication/8259/10 "2017-07-06T03:21:47Z")

</div>


