mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #6793] OIDC login with reverse proxy and custom root ca #14490
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joejoe87577 on GitHub (Nov 8, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6793
Bug Report
Installation Method
docker
Environment
Open WebUI Version: v0.3.35 (
7228b39064)Ollama (if applicable): 0.3.14
Operating System: Debian GNU/Linux 12 (bookworm)
Browser (if applicable): Firefox 131.0
Confirmation:
Expected Behavior:
Logging in with OIDC token and using custom root ca certificate.
Actual Behavior:
Different error messages and exceptions thrown, see description.
Description
Bug Summary:
I'm trying to use keycloak as a SSO solution for open webui, but I keep running into SSL errors. My setup (all docker) currently is:
http://keycloak-keycloak-1:8080(direct) orhttps://keycloak.local(With the reverse proxy)http://llm-open-web-ui-1:8080(direct) orhttps://llm.local(With the reverse proxy)I'm also running a custom DNS server that resolves all local domain names to the correct IP address. I'm using a custom root ca certificate for my ssl certificates because all of this is setup in my internal network.
This is the open webui part of my docker-compose file
Now for my issue, when using
https://keycloak.local/realms/nas-local/.well-known/openid-configurationasOPENID_PROVIDER_URLafter clicking the sign in with keycloak button I just get a internal server error in my browser and the server logs (Case 1 below) showand a bunch of other exception messages.
Changing the
OPENID_PROVIDER_URLtohttp://keycloak-keycloak-1:8080/realms/nas-local/.well-known/openid-configurationI get a bit further in the webui. After logging in trough keycloak I get a json errorThe email or password provided is incorrect. Please check for typos and try logging in again.in my browser. The server logs (Case 2 below) showBut no exception messages from python.
I think the issue is my custom CA that is not recognized by python. I've tried following the documentation for setting up a custom ca store. And I've also tried running the command
update-ca-certificatesafter starting the docker container. This shows 1 added certificate and I can curl my keycloak container withhttpsand get a good response.I've also tried to get a response with python from the command line. This also shows a good response and python isn't complaining about a missing certificate.
Reproduction Details
Steps to Reproduce:
Logs and Screenshots
Browser Console Logs:
Not relevant (I think)
Docker Container Logs:
Case 1
Case 2:
Screenshots/Screen Recordings (if applicable):
Additional Information
I've also used my keycloak deployment as SSO for other self hosted applications, I think I can exclude that as an general issue. I also assume that docker is not the issue here, as all my other stuff is hosted with docker and works with this setup.
@joejoe87577 commented on GitHub (Nov 8, 2024):
Ok, I've found the fix.
I had to add
SSL_CERT_FILEas environment variable instead ofREQUESTS_CA_BUNDLEto get this to work. Do you want to change the documentation or should I write a quick pull request?@tjbck commented on GitHub (Nov 9, 2024):
Feel free to update the docs! Thanks!