From 1240d3bfdfedda6d672bb186cf13934e43625bdc Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 25 Jul 2025 20:14:04 +0200 Subject: [PATCH] Added debugging option to keycloak --- roles/web-app-keycloak/config/main.yml | 4 ++-- roles/web-app-keycloak/templates/env.j2 | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/roles/web-app-keycloak/config/main.yml b/roles/web-app-keycloak/config/main.yml index a7e8b5c3..dd34a32c 100644 --- a/roles/web-app-keycloak/config/main.yml +++ b/roles/web-app-keycloak/config/main.yml @@ -1,12 +1,12 @@ import_realm: True # If True realm will be imported. If false skip. features: matomo: true - css: false + css: true port-ui-desktop: true ldap: true central_database: true recaptcha: true - logout: true + logout: true csp: flags: script-src-elem: diff --git a/roles/web-app-keycloak/templates/env.j2 b/roles/web-app-keycloak/templates/env.j2 index ff7b4040..1b8115ff 100644 --- a/roles/web-app-keycloak/templates/env.j2 +++ b/roles/web-app-keycloak/templates/env.j2 @@ -22,4 +22,10 @@ KC_DB_PASSWORD= {{database_password}} # If the initial administrator already exists and the environment variables are still present at startup, an error message stating the failed creation of the initial administrator is shown in the logs. Keycloak ignores the values and starts up correctly. KC_BOOTSTRAP_ADMIN_USERNAME= "{{applications | get_app_conf(application_id, 'users.administrator.username', True)}}" -KC_BOOTSTRAP_ADMIN_PASSWORD= "{{applications | get_app_conf(application_id, 'credentials.administrator_password', True)}}" \ No newline at end of file +KC_BOOTSTRAP_ADMIN_PASSWORD= "{{applications | get_app_conf(application_id, 'credentials.administrator_password', True)}}" + +# Enable detailed logs +{% if enable_debug | bool %} +KC_LOG_LEVEL=DEBUG +KC_LOG_CONSOLE_ENABLED=true +{% endif %} \ No newline at end of file