0

I am trying to secure my ES instance for use with searchkit.

I have nginx-proxied my ES instance to proxy port 9200 requests on port 8080 and enabled a basic authentication on top of that.

My server is correctly reachable from browser (http://admin:password@es_server_ip:8080 is correctly reaching ES Json) and authentication is working properly.

In order to set searchkit I followed this sample :

http://docs.searchkit.co/stable/setup/elasticsearch.html

and entered my server configuration constants to reach my server with authentication :

const host = "http://192.168.1.28:8080/index_test"
const searchkit = new SearchkitManager(host, { basicAuth:"admin:elastic" })

But it seems that searchkit is unable to reach my server and returning a 401/Unauthorized on every ES connection no matter what (I can clearly see it from browser console)

Note that I am correctly able to use searchkit without authentication.

Any idea on what is wrong ?

gennaris
  • 1,467
  • 1
  • 11
  • 17
  • Could you share your nginx config? Are you sure you shouldn’t use https? – Mysterion Jan 16 '19 at 10:14
  • Sure here's the config [link](https://pastebin.com/mm6ZdVfL) - I have included a .htpasswd file in /etc/nginx/auth/ , as said the basic auth is working fine from browser so it's pretty straightforward... No https as I am on dev VMs - – gennaris Jan 17 '19 at 10:59

0 Answers0