Skip to content

Commit

Permalink
Move to Keycloak 22.0.4 (#18)
Browse files Browse the repository at this point in the history
* Move to Keycloak 22.0.4

* Use of JDBC properties from the environment

* Updated Docker compose file with the new properties

---------

Co-authored-by: Petr Jurak <petr.jurak@integsoft.cz>
  • Loading branch information
jurakp and Petr Jurak authored Oct 18, 2023
1 parent 9ac0557 commit 350c882
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 45 deletions.
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/keycloak/keycloak:19.0.3 as builder
FROM quay.io/keycloak/keycloak:22.0.4 as builder

LABEL maintainer="support@integrationeye.com"
LABEL builder="Integsoft s.r.o"
Expand All @@ -15,10 +15,6 @@ ENV KC_HTTP_ENABLED=true
ENV KC_LOG_LEVEL=INFO,cz.integsoft:debug
ENV KC_PROXY=edge

USER root
# install system tools and update system
RUN ["/bin/bash", "-c", "microdnf update -y && microdnf install -y vim"]

USER keycloak

# copy build scripts and related data
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ services:
- KC_HEALTH_ENABLED=true
- KC_LOG_LEVEL=INFO,cz.integsoft:DEBUG,org.infinispan:DEBUG,org.jgroups:DEBUG
- KC_DB=mariadb
- KC_DB_URL=jdbc:mysql://mariadb:3306/keycloak?autoReconnect=true
- KC_DB_URL_HOST=mariadb
- KC_DB_URL_DATABASE=keycloak
- KC_DB_URL_PROPERTIES=?autoReconnect=true
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=keycloak
- KC_HTTP_RELATIVE_PATH=/auth
Expand Down
18 changes: 9 additions & 9 deletions files/conf/cache-ispn-jdbc-ping.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:11.0 http://www.infinispan.org/schemas/infinispan-config-11.0.xsd"
xmlns="urn:infinispan:config:11.0">
xsi:schemaLocation="urn:infinispan:config:14.0 http://www.infinispan.org/schemas/infinispan-config-14.0.xsd"
xmlns="urn:infinispan:config:14.0">

<jgroups>
<stack name="jdbc-ping-tcp" extends="tcp">
<JDBC_PING connection_driver="org.mariadb.jdbc.Driver"
connection_username="${env.KC_DB_USERNAME}" connection_password="${env.KC_DB_PASSWORD}"
connection_url="${env.KC_DB_URL}"
initialize_sql="CREATE TABLE IF NOT EXISTS JGROUPSPING (own_addr varchar(200) NOT NULL, cluster_name varchar(200) NOT NULL, ping_data BYTEA, constraint PK_JGROUPSPING PRIMARY KEY (own_addr, cluster_name));"
connection_url="jdbc:mysql://${env.KC_DB_URL_HOST}/${env.KC_DB_URL_DATABASE}${env.KC_DB_URL_PROPERTIES}"
initialize_sql="CREATE TABLE IF NOT EXISTS JGROUPSPING (own_addr varchar(200) NOT NULL, cluster_name varchar(200) NOT NULL, ping_data LONGBLOB, constraint PK_JGROUPSPING PRIMARY KEY (own_addr, cluster_name));"
insert_single_sql="INSERT INTO JGROUPSPING (own_addr, cluster_name, ping_data) values (?, ?, ?);"
delete_single_sql="DELETE FROM JGROUPSPING WHERE own_addr=? AND cluster_name=?;"
select_all_pingdata_sql="SELECT ping_data FROM JGROUPSPING WHERE cluster_name=?;"
Expand All @@ -20,16 +20,16 @@
</stack>
</jgroups>

<cache-container name="keycloak">
<cache-container name="keycloak">
<transport lock-timeout="60000" stack="jdbc-ping-tcp" />
<local-cache name="realms">
<local-cache name="realms" simple-cache="true">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
</encoding>
<memory max-count="10000"/>
</local-cache>
<local-cache name="users">
<local-cache name="users" simple-cache="true">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
Expand All @@ -54,7 +54,7 @@
<distributed-cache name="loginFailures" owners="2">
<expiration lifespan="-1"/>
</distributed-cache>
<local-cache name="authorization">
<local-cache name="authorization" simple-cache="true">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
Expand All @@ -64,7 +64,7 @@
<replicated-cache name="work">
<expiration lifespan="-1"/>
</replicated-cache>
<local-cache name="keys">
<local-cache name="keys" simple-cache="true">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30 changes: 0 additions & 30 deletions files/welcome-content/index.html

This file was deleted.

0 comments on commit 350c882

Please sign in to comment.