From 85f917cc2f896042ade688777a6f147bf23e7496 Mon Sep 17 00:00:00 2001
From: Benoit Crickboom <pro@sleig.be>
Date: Thu, 5 Dec 2024 15:47:20 +0100
Subject: [PATCH] release

---
 minimal-setup/keycloak/docker-compose.yml    |  2 +-
 release-notes.md                             |  2 +-
 sources/keycloak/regenerate-client-secret.sh | 12 ++++++++++++
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/minimal-setup/keycloak/docker-compose.yml b/minimal-setup/keycloak/docker-compose.yml
index 72f4cbb..c401e56 100644
--- a/minimal-setup/keycloak/docker-compose.yml
+++ b/minimal-setup/keycloak/docker-compose.yml
@@ -132,7 +132,7 @@ services:
 
 
   keycloak:
-    image: orthancteam/orthanc-keycloak:24.11.0
+    image: orthancteam/orthanc-keycloak:24.12.0
     depends_on: [keycloak-db]
     restart: unless-stopped
     environment:
diff --git a/release-notes.md b/release-notes.md
index 735b032..7786667 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -4,7 +4,7 @@ SPDX-FileCopyrightText: 2022 - 2024 Orthanc Team SRL <info@orthanc.team>
 SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
-v x.x.x
+v 24.12.0
 ========
 
 - Upgraded OHIF from v3.9.0-beta.56 to v3.9.2
diff --git a/sources/keycloak/regenerate-client-secret.sh b/sources/keycloak/regenerate-client-secret.sh
index d08a9d1..efaab52 100755
--- a/sources/keycloak/regenerate-client-secret.sh
+++ b/sources/keycloak/regenerate-client-secret.sh
@@ -32,6 +32,18 @@
 
 cd /opt/keycloak/bin/
 
+# exit if test mode
+if [[ ${SKIP_CLIENT_SECRET_UPDATE_FOR_TESTS} == true ]]; then
+    echo -e "\n##################################################################################################################"
+    echo -e "WARNING ! WARNING ! WARNING ! WARNING !"
+    echo -e "Client Secret value is kept to default value!"
+    echo -e "This is a major security issue!"
+    echo -e "This mode should be used only for unit testing!"
+    echo -e "If you read this, you should probably restart your setup withtout the SKIP_CLIENT_SECRET_UPDATE_FOR_TESTS env var"
+    echo -e "##################################################################################################################\n"
+    exit 0
+fi 
+
 # wait till Keycloak is ready
 
 READY=0