401 (Unauthorized) loop for kibana

I'll start with i dont know if this is an issue with kibana, browser or my UI but someone might have a suggestion.

So i check if kibana is up by hitting https://kibana-instance:5601/api/status which returns either 200 if the user is already authenticated or 401 if they are not. If it gets 200 or 401 i return true and attempt to do something if it gets no response(an error) i return false and do something else.

The issue seems to be if you hit that endpoint and get 401 in chrome and firefox (not tested in safari) it will just loop indefinitely. Not sure if its a setting in kibana which i'm not sure it is or if its a know issue.

Any suggestions?

Have you tried a curl command locally and then from your machine, eliminating the UI or Browser as a first troubleshooting step?

Also given the scheme is https, is the issue with certificates? Are the appropriate certificates setup for SSL or can you revert to http for further troubleshooting / testing ?

Hi, Yes I get a 401 as expected with curl locally passing no certificate, certs are setup on my kibana/elastic instances with pki enabled and setup. I believe it's due to the fact im not passing a cert from the browser when hitting that endpoint but as i get 401 and no loop with a curl passing no cert locally im making the assumption its the browser/kibana causing this.

Might be easier to troubleshoot via postman to examine the http response and headers, if you are using curl from the command line and not getting a similar issue, then it is more the browser and not kibana, i would assume.

You can use curl to troubleshoot the handshake

curl -iv https://kibana-instance:5601/api/status

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.