Skip to content

Commit 8dc588d

Browse files
committed
feat: Update Keycloak to v25.0.1 and OpenFGA platform to v1.5.5. Update custom extension
1 parent ba93d12 commit 8dc588d

6 files changed

+14
-21
lines changed

.env

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
KC_VERSION=25.0.1
2+
OPENFGA_VERSION=v1.5.5

docker-compose-import.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
depends_on:
66
openfga:
77
condition: service_healthy
8-
image: openfga/cli:v0.2.0
8+
image: openfga/cli:v0.5.1
99
container_name: openfga-import
1010
restart: "no"
1111
command: "store create --name keycloak --api-url http://openfga:8080 --model /tmp/model.dsl"
@@ -21,7 +21,7 @@ services:
2121
condition: service_healthy
2222
openfga-import:
2323
condition: service_completed_successfully
24-
image: quay.io/keycloak/keycloak:21.1
24+
image: quay.io/keycloak/keycloak:${KC_VERSION}
2525
container_name: keycloak-import
2626
restart: "no"
2727
entrypoint: [
@@ -34,5 +34,5 @@ services:
3434
KEYCLOAK_USER: admin
3535
KEYCLOAK_PASSWORD: password
3636
volumes:
37-
- $PWD/keycloak/initialize-poc.sh:/opt/keycloak/import.sh
37+
- $PWD/keycloak/import.sh:/opt/keycloak/import.sh
3838

docker-compose-openfga.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
depends_on:
2323
openfga-postgres:
2424
condition: service_healthy
25-
image: openfga/openfga:v1.3.1
25+
image: openfga/openfga:${OPENFGA_VERSION}
2626
container_name: migrate
2727
environment:
2828
- OPENFGA_DATASTORE_ENGINE=postgres
@@ -35,13 +35,14 @@ services:
3535
depends_on:
3636
migrate:
3737
condition: service_completed_successfully
38-
image: openfga/openfga:v1.3.1
38+
image: openfga/openfga:${OPENFGA_VERSION}
3939
container_name: openfga
4040
command: run
4141
environment:
4242
- OPENFGA_DATASTORE_ENGINE=postgres
4343
- OPENFGA_DATASTORE_URI=postgres://postgres:password@openfga-postgres:5432/postgres?sslmode=disable
4444
- OPENFGA_DATASTORE_MAX_OPEN_CONNS=100
45+
- OPENFGA_LOG_LEVEL=error
4546
networks:
4647
- default
4748
ports:

docker-compose.yml

+5-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
version: '3'
22

3-
volumes:
4-
postgres_data:
5-
driver: local
6-
73
services:
84

95
keycloak-postgres:
106
image: postgres:14
117
container_name: keycloak-postgres
12-
# volumes:
13-
# - postgres_data:/var/lib/postgresql/data
148
environment:
159
POSTGRES_DB: keycloak
1610
POSTGRES_USER: keycloak
@@ -24,7 +18,7 @@ services:
2418
- 5433:5432
2519

2620
keycloak:
27-
image: quay.io/keycloak/keycloak:21.1
21+
image: quay.io/keycloak/keycloak:${KC_VERSION}
2822
container_name: keycloak
2923
command:
3024
- start-dev
@@ -42,22 +36,19 @@ services:
4236
KC_HOSTNAME_STRICT: 'false'
4337
KC_HTTP_ENABLED: 'true'
4438
KC_HEALTH_ENABLED: 'true'
45-
KC_HOSTNAME_ADMIN: localhost
4639
KC_HOSTNAME: keycloak
47-
KC_FEATURES: declarative-user-profile
4840
KC_SPI_EVENTS_LISTENER_OPENFGA_EVENTS_PUBLISHER_API_URL: http://openfga:8080
49-
KC_LOG_LEVEL: INFO, com.twogenidentity.keycloak:debug,com.twogenidentity.keycloak.utils:debug
41+
KC_LOG_LEVEL: info,com.twogenidentity.keycloak:debug,com.twogenidentity.keycloak.utils:debug
5042
healthcheck:
51-
# test: ["CMD", "curl", "-f", "http://localhost:8081/health/ready"]
52-
test: cat /proc/net/tcp | grep '00000000:1F91 00000000:0000' || exit 1
43+
test: ["CMD", "/opt/keycloak/bin/kcadm.sh", "config", "credentials", "--server", "http://localhost:8081", "--realm", "master", "--user", "admin", "--password", "password"]
5344
interval: 5s
5445
timeout: 2s
5546
retries: 15
5647
ports:
5748
- 8081:8081
5849
- 8443:8443
5950
volumes:
60-
- $PWD/keycloak/lib/keycloak-openfga-event-publisher-1.0.0.jar:/opt/keycloak/providers/keycloak-openfga-event-publisher-1.0.0.jar
61-
- $PWD/keycloak/initialize-poc.sh:/opt/keycloak/initialize-poc.sh
51+
- $PWD/keycloak/lib/keycloak-openfga-event-publisher.jar:/opt/keycloak/providers/keycloak-openfga-event-publisher.jar
52+
- $PWD/keycloak/import.sh:/opt/keycloak/import.sh
6253
depends_on:
6354
- keycloak-postgres

keycloak/initialize-poc.sh keycloak/import.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ echo "Creating PoC Users, Role Model, User Role Assigments and Clients"
2929

3030
# User Role Assignments
3131
/opt/keycloak/bin/kcadm.sh add-roles -r master --uusername paula --rolename analyst-catalog
32-
/opt/keycloak/bin/kcadm.sh add-roles -r master --uusername richard --rolename admin-catalog
33-
32+
/opt/keycloak/bin/kcadm.sh add-roles -r master --uusername richard --rolename admin-catalog
Binary file not shown.

0 commit comments

Comments
 (0)