We use Keycloak 17 (Quarkus distribution). We would like to persist user session in the database. We use blue-green deployment of our infrastructure and we would like to maintain user sessions when we replace our infrastructure.
As far as I can see from documentation on caching it is possible to provide your own Infinispan configuration. In Infinispan documentation I can see that I can use jdbc connection when defining distributed cache.
However, when I provide my own Infinispan configuration with something like this:
<distributed-cache name="sessions">
<persistence>
<connection-pool connection-url="${env.INFINISPAN_DATABASE_CONNECTION_URL}"
username="${env.INFINISPAN_DATABASE_USERNAME}"
password="${env.INFINISPAN_DATABASE_PASSWORD}"
driver="${env.INFINISPAN_DATABASE_DRIVER_CLASS}"/>
</persistence>
</distributed-cache>
Then I get an error during Keycloak startup:
ERROR: Failed to start server in (production) mode
ERROR: org.infinispan.commons.CacheConfigurationException: ISPN000327: Cannot find a parser for element 'connection-pool' in namespace 'urn:infinispan:config:11.0'. Check that your configuration is up-to date for Infinispan '13.0.5.Final' and if you have the proper dependency in the classpath
ERROR: ISPN000327: Cannot find a parser for element 'connection-pool' in namespace 'urn:infinispan:config:11.0'. Check that your configuration is up-to date for Infinispan '13.0.5.Final' and if you have the proper dependency in the classpath
Do I correctly understand that I cannot persist user sessions using only Keycloak 17 without dedicated Infinispan installation?
I can also see a similar post here.