We keep having a strange situation occur with Kibana which we need help with.
The scenario:
A privileged user will login, authenticate with Active Directory and get
the .kibana index as expected. In comparison a non-privileged user will
login and get the .kibana-nonpriv index. We have this based on Active Directory
OUs and groups.
After a short period of time privileged users will, while working, in Kibana
seem to switch, rather default, to the .kibana-nonpriv index
In an attempt to resolve the issue the users when asked to logout and back in
again will not get their expected index(.kibana) only the default non-privileged
index(.kibana-nonpriv).
Our only remedy at this point is to restart Kibana.
We’ve been trying to trap the condition to provide additional details however the
only indication we’ve been able find is from Kibana’s logs:
Oct 2 16:46:02 kibana1 kibana: {"type":"log","@timestamp":"2018-10-02T16:46:02Z","tags":["debug","readonlyrest_kbn"],"pid":13854,"message":"try extract credentials from JSON"}
Oct 2 16:46:02 kibana1 kibana: {"type":"log","@timestamp":"2018-10-02T16:46:02Z","tags":["debug","readonlyrest_kbn"],"pid":13854,"message":"groupCurrent not found in cookie, that's ok."}
Oct 2 16:46:02 kibana1 kibana: {"type":"log","@timestamp":"2018-10-02T16:46:02Z","tags":["debug","readonlyrest_kbn"],"pid":13854,"message":"try extract credentials from JSON"}
Oct 2 16:46:02 kibana1 kibana: {"type":"log","@timestamp":"2018-10-02T16:46:02Z","tags":["debug","readonlyrest_kbn"],"pid":13854,"message":"groupCurrent not found in cookie, that's ok."}
Oct 2 16:46:02 kibana1 kibana: {"type":"log","@timestamp":"2018-10-02T16:46:02Z","tags":["debug","readonlyrest_kbn"],"pid":13854,"message":" received identity payload: {\"x-ror-current-group\":null,\"x-ror-username\":\"user5\",\"x-ror-kibana-hidden-apps\":[\"kibana:dev_tools\",\"kibana:management\",\"readonlyrest_kbn\"],\"x-ror-kibana_access\":\"rw\",\"x-ror-available-groups\":[]}"}
Oct 2 16:46:02 kibana1 kibana: {"type":"log","@timestamp":"2018-10-02T16:46:02Z","tags":["debug","readonlyrest_kbn"],"pid":13854,"message":"ON_IDENTITY no kibana index from headers, setting kibana index to default configured .kibana"}
Oct 2 16:46:02 kibana1 kibana: {"type":"response","@timestamp":"2018-10-02T16:46:02Z","tags":[],"pid":13854,"method":"post","statusCode":302,"req":{"url":"/login","method":"post","headers":{"host":"localhost:5601","connection":"close","content-length":"39","origin":"https://kibana1.example.com","kbn-xsrf":"5.6.1","kbn-version":"5.6.1","user-agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36","content-type":"application/x-www-form-urlencoded; charset=UTF-8","accept":"application/json, text/javascript, */*; q=0.01","x-requested-with":"XMLHttpRequest","referer":"https://kibana1.example.com/login","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"https://kibana1.example.com/login"},"res":{"statusCode":302,"responseTime":108,"contentLength":9},"message":"POST /login 302 108ms - 9.0B"}
Oct 2 16:46:02 kibana1 kibana: {"type":"response","@timestamp":"2018-10-02T16:46:02Z","tags":[],"pid":13854,"method":"get","statusCode":200,"req":{"url":"/","method":"get","headers":{"host":"localhost:5601","connection":"close","kbn-xsrf":"5.6.1","kbn-version":"5.6.1","user-agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36","accept":"application/json, text/javascript, */*; q=0.01","x-requested-with":"XMLHttpRequest","referer":"https://kibana1.example.com/login","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"https://kibana1.example.com/login"},"res":{"statusCode":200,"responseTime":8,"contentLength":9},"message":"GET / 200 8ms - 9.0B"}
Oct 2 16:46:02 kibana1 kibana: {"type":"log","@timestamp":"2018-10-02T16:46:02Z","tags":["debug","readonlyrest_kbn"],"pid":13854,"message":"ON_INJECT kibana index not found, defaulting to: .kibana"}
Additional notes:
-
The condition is seen to occur on both our primary and secondary clusters and with local users and AD users.
-
curl to ES appears to continue to work as expected.
Cluster details:
-
Primary cluster is running Elasticsearch 5.6.1 with the 1.16.27 RoR on masters, clients and Kibana
-
Secondary cluster is running Elasticsearch 5.6.11 with the 1.16.27 RoR on masters, clients, data nodes and Kibana
No other logs from clients or masters seem to have anything relevant.
We can provide a sanitized readonlyrest config if needed.
Ideas? Thoughts? Comments?
Thanks
Travis