Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Commit 6603669

Browse files
authored
build: Bump keycloak from 24 to 25.0.6 (#290)
1 parent 95db20e commit 6603669

8 files changed

Lines changed: 100 additions & 17 deletions

File tree

compose/openems-dev/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ services:
2828
--spi-theme-cache-templates=false
2929
3030
keycloak-config:
31-
image: quay.io/adorsys/keycloak-config-cli:latest-24.0.1
31+
image: quay.io/adorsys/keycloak-config-cli:latest-25
3232
depends_on:
3333
- keycloak
3434
volumes:

devops/templates/compose-up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ echo '👪 Configure keycloak'
1717
docker run --rm \
1818
--env-file ./keycloak/config/.env \
1919
--volume ./keycloak/config:/config \
20-
quay.io/adorsys/keycloak-config-cli:latest-24.0.1
20+
quay.io/adorsys/keycloak-config-cli:latest-25

devops/templates/keycloak/.env

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# https://www.keycloak.org/server/all-config
2-
# Reverse proxy
3-
KC_PROXY_HEADERS=xforwarded
2+
3+
# Hostname: https://www.keycloak.org/server/hostname
4+
## TLS termination
45
KC_HTTP_ENABLED=true
6+
## Reverse proxy
7+
KC_PROXY_HEADERS=xforwarded
58
KC_HOSTNAME=auth.opencleanenergy.org
6-
KC_HTTP_RELATIVE_PATH=/
79

810
# Admin
911
KEYCLOAK_ADMIN={{KEYCLOAK_ADMIN}}

keycloak/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/keycloak/keycloak:24.0
1+
FROM quay.io/keycloak/keycloak:25.0.6
22

33
# User Id: 1000
44
# see https://github.com/keycloak/keycloak/blob/main/quarkus/container/Dockerfile

keycloak/debug-keycloak/Caddyfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
auth.dev.local {
2+
handle /whoami {
3+
reverse_proxy whoami:80
4+
}
5+
handle {
6+
reverse_proxy keycloak:8080
7+
}
8+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
volumes:
2+
proxy_data:
3+
proxy_config:
4+
keycloak_database_data:
5+
6+
secrets:
7+
keycloak-env:
8+
file: ./keycloak/.env
9+
10+
services:
11+
proxy:
12+
image: caddy:2
13+
volumes:
14+
- proxy_data:/data
15+
- proxy_config:/config
16+
- ./Caddyfile:/etc/caddy/Caddyfile
17+
ports:
18+
- 80:80
19+
- 443:443
20+
21+
whoami:
22+
image: traefik/whoami
23+
24+
keycloak:
25+
image: keycloak:local
26+
build:
27+
context: ../
28+
depends_on:
29+
- keycloak-database
30+
secrets:
31+
- source: keycloak-env
32+
target: .env
33+
command: start
34+
35+
keycloak-database:
36+
image: postgres:15-alpine
37+
volumes:
38+
- keycloak_database_data:/var/lib/postgresql/data
39+
environment:
40+
POSTGRES_DB: dev
41+
POSTGRES_USER: dev
42+
POSTGRES_PASSWORD: dev
43+
44+
adminer:
45+
image: adminer:latest
46+
ports:
47+
- 5002:8080
48+
environment:
49+
- ADMINER_DEFAULT_SERVER=keycloak-database
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# https://www.keycloak.org/server/all-config
2+
3+
# Hostname: https://www.keycloak.org/server/hostname
4+
## TLS termination
5+
KC_HTTP_ENABLED=true
6+
## Reverse proxy
7+
KC_PROXY_HEADERS=xforwarded
8+
KC_HOSTNAME=auth.dev.local
9+
10+
KEYCLOAK_ADMIN=admin
11+
KEYCLOAK_ADMIN_PASSWORD=admin
12+
13+
KC_DB=postgres
14+
KC_DB_URL_HOST=keycloak-database
15+
KC_DB_URL_DATABASE=dev
16+
KC_DB_USERNAME=dev
17+
KC_DB_PASSWORD=dev
18+
19+
# Theme
20+
OPEN_CLEAN_ENERGY_LEGAL_NOTICE_URL=https://opencleanenergy.org/legal-notice/
21+
OPEN_CLEAN_ENERGY_PRIVACY_POLICY_URL=https://opencleanenergy.org/privacy-policy/

keycloak/themes/open-clean-energy/login/template.ftl

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<#import "footer.ftl" as loginFooter>
2-
<#-- https://github.com/keycloak/keycloak/blob/24.0.8/themes/src/main/resources/theme/base/login/template.ftl -->
2+
<#-- https://github.com/keycloak/keycloak/blob/25.0.6/themes/src/main/resources/theme/base/login/template.ftl -->
33
<#macro registrationLayout bodyClass="" displayInfo=false displayMessage=true displayRequiredFields=false>
44
<!DOCTYPE html>
55
<html class="${properties.kcHtmlClass!}"<#if realm.internationalizationEnabled> lang="${locale.currentLanguageTag}"</#if>>
@@ -31,23 +31,26 @@
3131
<script src="${url.resourcesPath}/${script}" type="text/javascript"></script>
3232
</#list>
3333
</#if>
34+
<script type="importmap">
35+
{
36+
"imports": {
37+
"rfc4648": "${url.resourcesCommonPath}/node_modules/rfc4648/lib/rfc4648.js"
38+
}
39+
}
40+
</script>
3441
<script src="${url.resourcesPath}/js/menu-button-links.js" type="module"></script>
3542
<#if scripts??>
3643
<#list scripts as script>
3744
<script src="${script}" type="text/javascript"></script>
3845
</#list>
3946
</#if>
40-
<#if authenticationSession??>
41-
<script type="module">
42-
import { checkCookiesAndSetTimer } from "${url.resourcesPath}/js/authChecker.js";
47+
<script type="module">
48+
import { checkCookiesAndSetTimer } from "${url.resourcesPath}/js/authChecker.js";
4349
44-
checkCookiesAndSetTimer(
45-
"${authenticationSession.authSessionId}",
46-
"${authenticationSession.tabId}",
47-
"${url.ssoLoginInOtherTabsUrl?no_esc}"
48-
);
49-
</script>
50-
</#if>
50+
checkCookiesAndSetTimer(
51+
"${url.ssoLoginInOtherTabsUrl?no_esc}"
52+
);
53+
</script>
5154
</head>
5255

5356
<body class="${properties.kcBodyClass!}">

0 commit comments

Comments
 (0)