From 46e628e74f4340c25fe6c942a0734055dbcc1ee6 Mon Sep 17 00:00:00 2001 From: Bernt Christian Egeland Date: Sat, 7 Dec 2024 21:01:02 +0000 Subject: [PATCH] updated docs for keycloak --- docs/docs/Authentication/oauth.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/docs/Authentication/oauth.md b/docs/docs/Authentication/oauth.md index d12e4a87..9a7023fa 100644 --- a/docs/docs/Authentication/oauth.md +++ b/docs/docs/Authentication/oauth.md @@ -64,7 +64,9 @@ ztnet: ### Keycloak Configuration -docker-compose.yml +Keycloak can be configured to provide authentication for ZTNet using OpenID Connect. Below are the configuration details and important notes about URL structures. + +#### Docker Configuration ```yml ztnet: image: sinamics/ztnet:latest @@ -72,9 +74,21 @@ ztnet: environment: OAUTH_ID: "your-client-id" OAUTH_SECRET: "your-client-secret" - OAUTH_WELLKNOWN: "http://{PROVIDER_URL}/auth/realms/{REALM}/.well-known/openid-configuration" + OAUTH_WELLKNOWN: "http://{PROVIDER_URL}/realms/{REALM}/.well-known/openid-configuration" ``` +#### Important Notes + +1. **URL Structure Changes** + - For Keycloak versions 17 and newer: + ``` + http://{PROVIDER_URL}/realms/{REALM}/.well-known/openid-configuration + ``` + - For older Keycloak versions (pre-17): + ``` + http://{PROVIDER_URL}/auth/realms/{REALM}/.well-known/openid-configuration + ``` + ### GitHub Configuration