elastic / sense

A JSON aware developer's interface to Elasticsearch. Comes with handy machinery such as syntax highlighting, autocomplete, formatting and code folding.
Other
382 stars 134 forks source link

Sense fails to authenticate users #137

Open vicvega opened 8 years ago

vicvega commented 8 years ago

Our environment

Our elasticsearch (2.3.2) environment consists of

We have sense (2.0.0-beta5) installed on the single node monitoring cluster (kibana 4.5.0) and we use it to point the production cluster (using sense.defaultServerUrl). On each cluster we have two realms for shield authentication: esusers (order 0) and ldap (order 1)

Step to reproduce

Create two local users (esusers) with same name (root) and different password on the production cluster and the monitoring cluster. Connect to kibana on monitoring cluster using said local user (root). Switch to sense. It asks for credentials, but fails any authentication attempts for same username (root).

It seems to check credentials on ldap realm instead of esusers (which is first in order). See the following logs

[2016-05-02 11:02:21,865][WARN ][shield.authc.ldap        ] [elastic004a] authentication failed for user [root]: failed to find user [root] with search base [dc=sods,dc=local] scope [sub_tree]
[2016-05-02 11:02:30,786][WARN ][shield.authc.ldap        ] [elastic004a] authentication failed for user [root]: failed to find user [root] with search base [dc=sods,dc=local] scope [sub_tree]