I implemented a kibana plugin to protect kibana. When a user tries to access kibana and the user hasn't been authenticated, then the browser is redirected to our Identify provider to do authentication, and then redirect back to kibana when the authentication finishes.
The above logic is working well on the first login. But it doesn't work when the session is timeout. When the session is timeout, the browser is supposed to be redirected to the Identify provider as well. But it doesn't work. I tried the following approaches, neither of them work.
- In the kibana plugin, just use reply.redirect(IdPURL). It doesn't work due to CORS issue.
- I tried to just send back a script back to the browser using reply(" < script > window.location.href=xxxx"< /script > "), but it doesn't work either. It seems that kibana doesn't process the script on client side.
Any suggestions? Thanks.