diff --git a/llm-server/llm/ansible/roles/open_webui/defaults/main.yml b/llm-server/llm/ansible/roles/open_webui/defaults/main.yml index 97ebe39..d1d57d1 100644 --- a/llm-server/llm/ansible/roles/open_webui/defaults/main.yml +++ b/llm-server/llm/ansible/roles/open_webui/defaults/main.yml @@ -44,6 +44,8 @@ open_webui_data_dir: /var/lib/ghostnet-ai/production/openwebui-data open_webui_oidc_enabled: false open_webui_oidc_client_id: gnai-openwebui open_webui_oidc_client_secret_secret: openwebui-oidc-client-secret +# Public client with PKCE needs no secret; set true only for a confidential client. +open_webui_oidc_use_client_secret: false open_webui_oidc_provider_url: https://auth.ghostnet.selfhost.eu/realms/Ghost.net/.well-known/openid-configuration open_webui_public_url: https://chat.ghostnet.selfhost.eu diff --git a/llm-server/llm/ansible/roles/open_webui/templates/open-webui.container.j2 b/llm-server/llm/ansible/roles/open_webui/templates/open-webui.container.j2 index 5e0c81b..0e9f09b 100644 --- a/llm-server/llm/ansible/roles/open_webui/templates/open-webui.container.j2 +++ b/llm-server/llm/ansible/roles/open_webui/templates/open-webui.container.j2 @@ -24,8 +24,8 @@ Environment=OPENID_PROVIDER_URL={{ open_webui_oidc_provider_url }} Environment=OAUTH_CLIENT_ID={{ open_webui_oidc_client_id }} Environment=OAUTH_SCOPES=openid email profile Environment=OAUTH_PROVIDER_NAME=Keycloak -Secret={{ open_webui_oidc_client_secret_secret }},type=env,target=OAUTH_CLIENT_SECRET -{% endif %} +{% if open_webui_oidc_use_client_secret %}Secret={{ open_webui_oidc_client_secret_secret }},type=env,target=OAUTH_CLIENT_SECRET +{% endif %}{% endif %} [Service] Restart=on-failure