Skip to content

Commit fbf408e

Browse files
committed
🔧(keycloak) Fix https required issue in dev mode.
On some environments keycloak returns a 'HTTPS required' message on login. The same issue was fixed in drive by changing the 'sslRequired' value from 'external' to 'none'. Also upgrade keycloak up to 26.3.2 Signed-off-by: Fabre Florian <[email protected]>
1 parent 0cf8b9d commit fbf408e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

compose.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,21 @@ services:
184184
- env.d/development/kc_postgresql.local
185185

186186
keycloak:
187-
image: quay.io/keycloak/keycloak:20.0.1
187+
image: quay.io/keycloak/keycloak:26.3
188188
volumes:
189189
- ./docker/auth/realm.json:/opt/keycloak/data/import/realm.json
190190
command:
191191
- start-dev
192192
- --features=preview
193193
- --import-realm
194-
- --proxy=edge
195-
- --hostname-url=http://localhost:8083
196-
- --hostname-admin-url=http://localhost:8083/
194+
# - --proxy=edge
195+
- --hostname=http://localhost:8083
197196
- --hostname-strict=false
198-
- --hostname-strict-https=false
199197
- --health-enabled=true
200198
- --metrics-enabled=true
201199
healthcheck:
202-
test: ["CMD", "curl", "--head", "-fsS", "http://localhost:8080/health/ready"]
200+
test: ['CMD-SHELL', '[ -f /tmp/HealthCheck.java ] || echo "public class HealthCheck { public static void main(String[] args) throws java.lang.Throwable { java.net.URI uri = java.net.URI.create(args[0]); System.exit(java.net.HttpURLConnection.HTTP_OK == ((java.net.HttpURLConnection)uri.toURL().openConnection()).getResponseCode() ? 0 : 1); } }" > /tmp/HealthCheck.java && java /tmp/HealthCheck.java http://localhost:9000/health/live']
201+
start_period: 5s
203202
interval: 1s
204203
timeout: 2s
205204
retries: 300

docker/auth/realm.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"oauth2DeviceCodeLifespan": 600,
2727
"oauth2DevicePollingInterval": 5,
2828
"enabled": true,
29-
"sslRequired": "external",
29+
"sslRequired": "none",
3030
"registrationAllowed": true,
3131
"registrationEmailAsUsername": false,
3232
"rememberMe": true,
@@ -2270,7 +2270,7 @@
22702270
"cibaInterval": "5",
22712271
"realmReusableOtpCode": "false"
22722272
},
2273-
"keycloakVersion": "20.0.1",
2273+
"keycloakVersion": "26.3.2",
22742274
"userManagedAccessAllowed": false,
22752275
"clientProfiles": {
22762276
"profiles": []

0 commit comments

Comments
 (0)