Hello community,
I am trying to configure LDAP/Active directory authentication and it seems like it works well and it doesn’t at the same time. After I have done all the configuration, I try to log in Kibana using my LDAP credentials and it recognizes if the credentials are good or bad. But, if I successfully log in, I am asked for credentials again in a new window that pops up, it’s like a second layer of authentication that I don’t want:
And after using the same credentials here, I finally get an error:
I have checked that I can list all indices using my LDAP credentials using the Elasticsearch API:
curl -k -u user:password https://ES-IP:9200/_cat/indices
Checking the browser’s dev tools, I see that I get the error when I am forwarded to the page:
https://KIBANA-DNS/app/select_tenant?nextURL=%2F
My Kibana service is using the admin user, and my LDAP backend role is being mapped to the role all_access
and to another role with unlimited privileges and all permissions for the global and admin tenant.
When I log in Kibana, I can see this log in the Elasticsearch logs:
But after I get access denied when I put my credentials in the window that pops up (I don’t even know why I get asked credentials twice) I get this error in Kibana logs:
Oct 29 13:14:06 kibana[12899]: {“type”:“response”,“@timestamp”:“2020-10-29T12:14:06Z”,“tags”:,“pid”:12899,“method”:“get”,“statusCode”:401,“req”:{“url”:“/app/select_tenant?nextUrl=%2F”,“method”:“get”,“headers”:{“host”:“DNS”,“user-agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0”,“accept”:“text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8”,“accept-language”:“fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3”,“accept-encoding”:“gzip, deflate, br”,“referer”:“https://DNS/app/login?nextUrl=%2F",“upgrade-insecure-requests”:“1”,“x-forwarded-for”:“IP”,“connection”:“close”},“remoteAddress”:“IP”,“userAgent”:“IP”,“referer”:“https://DNS/app/login?nextUrl=%2F”},“res”:{“statusCode”:401,“responseTime”:29,“contentLength”:9},“message”:"GET /app/select_tenant?nextUrl=%2F 401 29ms - 9.0B”}
So the questions are:
- Why do I have to put credentials twice?
- Why is my LDAP account not workig on the second authentication? If I use
admin:admin
orkibanaserver:kibanaserver
there, it works.
Any ideas would be much appreciated.
Thank you.
Regards,
Sergio.