Sense fails to authenticate users
- Dominant language
- JavaScript
- Stars
- 379
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
### Our environment
Our elasticsearch (2.3.2) environment consists of
- a production cluster to keep and analyze data (secured by shield)
- a single node monitoring cluster (also secured by shield)
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]
```
Contributor guide
Research direction
Start by reproducing the failure with Sense 2.0.0-beta5 on Kibana 4.5.0, using the monitoring cluster and sense.defaultServerUrl for the production cluster. Compare the authentication target and realm selection against the reported Shield logs; done means a user authenticated through the production cluster's esusers realm can use Sense successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, javascript
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100