Elasticsearch JS .. Unable to connect to elasticserach with basic authentication plugin

83 views
Skip to first unread message

Sharath Kumar M N

unread,
Nov 12, 2015, 3:07:54 AM11/12/15
to Elasticsearch ES

I am using elasticsearch-angular.js client to connect from my UI built using angularjs to connect to elasticserach 1.4. Our es instance has a custom plugin with Base authentication to intercept every request to check if the incoming request has authorization header set. I am setting the auth param as described in the docs when instantiating the esFactory. However the auth headers are not getting set. Can you please let me know how to set auth headers from java script client for every request

var myServices = angular.module('myServices', ['elasticsearch']);

myServices.service('es', ['esFactory',
function (esFactory, $http) {
return esFactory({
host: 'http://user:passwordlocalhost:9200'

});
}]);


I don't see auth headers set when i inspect in chrome 

Marc

unread,
Jan 13, 2017, 12:07:39 PM1/13/17
to Elasticsearch ES
Hi Sharath,

This post may be a little old, but just curious what Authentication plugin are you using?
Is it a 'commercial' one, or you developed it in-house? Are you only implementing Authentication, or Authorization (against LDAP, for example) as well?

Thanks,
Marc
Reply all
Reply to author
Forward
0 new messages