Skip to content

Commit

Permalink
Add newly introduced crl cache to KCB
Browse files Browse the repository at this point in the history
* Remove kcb-infinispan-cache-remote-store-config.xml as it is no longer used and is replaced by Keycloak config options

Closes #1107

Signed-off-by: Michal Hajas <[email protected]>
  • Loading branch information
mhajas authored Jan 23, 2025
1 parent 9e3fb40 commit d7f72d7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 283 deletions.
5 changes: 0 additions & 5 deletions doc/kubernetes/modules/ROOT/pages/customizing-deployment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,4 @@ If Infinispan is deployed in the Openshift cluster as described in xref:openshif
KC_ISPN_NAMESPACE::
The namespace in the local Openshift cluster where the Infinispan cluster is deployed.

Also, the caches need to be configured with a https://infinispan.org/docs/stable/titles/configuring/configuring.html#remote-cache-store_persistence[Remote Store].
Using the Hot Rod protocol, it offloads the sessions to the Infinispan cluster.
The file `link:{github-files}/provision/minikube/keycloak/config/kcb-infinispan-cache-remote-store-config.xml[kcb-infinispan-cache-remote-store-config.xml]` contains the configuration required for this.
Use `KC_CUSTOM_INFINISPAN_CONFIG_FILE=config/kcb-infinispan-cache-remote-store-config.xml` to upload and use this file in your Keycloak cluster.

NOTE: Cross-site enabled Infinispan cluster can be used as well.
2 changes: 1 addition & 1 deletion provision/common/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vars:
KC_MEMORY_LIMITS_MB: '{{default "1024" .KC_MEMORY_LIMITS_MB}}'
KC_METASPACE_INIT_MB: '{{default "96" .KC_METASPACE_INIT_MB}}'
KC_METASPACE_MAX_MB: '{{default "256" .KC_METASPACE_MAX_MB}}'
KC_CUSTOM_INFINISPAN_CONFIG: '{{default "true" .KC_CUSTOM_INFINISPAN_CONFIG}}'
KC_CUSTOM_INFINISPAN_CONFIG: '{{default "false" .KC_CUSTOM_INFINISPAN_CONFIG}}'
KC_CUSTOM_INFINISPAN_CONFIG_FILE: '{{default "config/kcb-infinispan-cache-config.xml" .KC_CUSTOM_INFINISPAN_CONFIG_FILE}}'
KC_REMOTE_STORE: '{{default "false" .KC_REMOTE_STORE}}'
KC_REMOTE_STORE_HOST: '{{default "localhost" .KC_REMOTE_STORE_HOST}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
<expiration max-idle="3600000"/>
<memory max-count="1000"/>
</local-cache>
<local-cache name="crl" simple-cache="true">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
</encoding>
<expiration lifespan="-1"/>
<memory max-count="1000"/>
</local-cache>
<distributed-cache name="actionTokens" owners="2">
<encoding>
<key media-type="application/x-java-object"/>
Expand Down

This file was deleted.

0 comments on commit d7f72d7

Please sign in to comment.