KeyCloak redirect_uri gives 404 page not found error

I'm using Elasticsearch and Kibana 7.16.3. I've gotten SSL/TLS properly setup on my local install. I've gotten KeyCloak set up and working. I can bring up Kibana and login with Keycloak successfully. However, after login, Kibana redirects me to the following URL: https://localhost:5601/api/security/oidc/callback?state=X7lczvuWbZ1fJuA3y3Nq1vcf0H0I8vLSIbSGl1D9M-c&session_state=38edf960-3d80-4566-80c4-69eb11c57cba&code=9fcfe101-9117-46d8-b72f-bb34ca7e2851.38edf960-3d80-4566-80c4-69eb11c57cba.6213f326-ae59-46d3-9280-9b0608cfb650
This returns a page that reads "Not Found". So the redirect after logging in with Kibana doesn't seem to be working properly. I've set my Valid Redirect URIs in KeyCloak as https://localhost:5601/*. I'm not getting any error messages from Elasticsearch or Kibana.

I am running Elasticsearch and Kibana through Docker.

I figured out my issue. I didn't have the server.basePath parameter set in the kibana.yml file so when it started up, it used the random three letters as the base URL. Since my redirect_uri didn't include those three letters, it was an invalid request. Once I set the server.basePath and included that in my redirect_uri, the redirect worked properly.

1 Like

Thanks for sharing your solution!

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