Cannot reach Kibana dashboard URL after Keycloak (openid) login

Hi ,

We are trying to integrate kibana with openid (keycloak), Integration is successful and we are able to access kibana UI through keycloak.

We have created a dashboard in kibana & tried to share that dashboard to others through the “copylink” tag available in kibana. When someone tries to open that dashboard URL , It redirects to keycloak page for authentication & after successful login, it loads kibana home page. But my expectation was to load the dashboard page directly after keycloak authentication.

In our case "opendistro_security.openid.base_redirect_url:"is set to https://: in kibana configuration , is this the reason that ,it always redirect to the kibana homepage?
But, even if I do not set this value, the default value of “opendistro_security.openid.base_redirect_url” is taken as server.host, server.port and server.basepath from kibana.yml .

What do you suggest here in my case? Is there a way to set “opendistro_security.openid.base_redirect_url” to such value , so that it can redirect to the actual page expected in a copylink rather than redirect to the home page of kibana?

Thanks.

@mohitj252
Which version of odfe are you using?

I have just recreated your scenario and was directed straight to the dashboard that I had saved using link below:

http://localhost:5601/goto/24ee...5c9e2?security_tenant=global

using:
opendistro_security.openid.base_redirect_url: “http://localhost:5601

Do you use multitenacy? Can you show example of the link you are sharing?

Hi, we are using od 1.19 and elastic search version 7.8.0
Do you use multitenacy?
Yes we use multitenancy.
Can you show example of the link you are sharing?
yes, PFB urls which I copied from the dashboard’s share button.
https://xx.xx.xx.xx/mohit123/app/kibana?security_tenant=global#/dashboard/c9db40-beea-11ecb9-0d205c197898?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:’’,filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:’’),timeRestore:!f,title:d1,viewMode:view)

when I login with the above link in the incognito window, I was redirecting to keycloak page, the after successful login it is redirecting to the url.
https://xx.xx.xx.xx/mohit123/app/kibana?security_tenant=global#/home)

I was expecting it should redirect to dashboard page, instead of home page.

@mohitj252 There does appear to be some bug with long links. Can you try to use short link?
Screenshot 2021-05-27 at 14.46.39

If that doesn’t work, can you DM me your config files so I can try to reproduce issue from my end?

config.yml
elasticsearch.yml
kibana.yml
(redact any sensitive details)

Yes, it is working with short link, but with the long link it is not working.