deployment/terraform/aws/modules/keycloak/resources/cache-ispn-jdbc-ping.xml (82 lines of code) (raw):

<!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License, Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific language governing permissions and limitations ~ under the License. --> <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"> <jgroups> <stack name="jdbc-ping-tcp" extends="tcp"> <JDBC_PING connection_driver="org.postgresql.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, bind_addr VARCHAR(200) NOT NULL, created timestamp NOT NULL, cluster_name varchar(200) NOT NULL, ping_data BYTEA, constraint PK_JGROUPSPING PRIMARY KEY (own_addr, cluster_name));" insert_single_sql="INSERT INTO JGROUPSPING (own_addr, bind_addr, created, cluster_name, ping_data) values (?,'${env.EXTERNAL_ADDR:127.0.0.1}',NOW(), ?, ?);" delete_single_sql="DELETE FROM JGROUPSPING WHERE own_addr=? AND cluster_name=?;" select_all_pingdata_sql="SELECT ping_data FROM JGROUPSPING WHERE cluster_name=?;" info_writer_sleep_time="5000" info_writer_max_writes_after_view="2" remove_all_data_on_view_change="true" stack.combine="REPLACE" stack.position="MPING"/> </stack> </jgroups> <cache-container name="keycloak"> <transport lock-timeout="60000" stack="jdbc-ping-tcp"/> <local-cache name="realms"> <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"> <encoding> <key media-type="application/x-java-object"/> <value media-type="application/x-java-object"/> </encoding> <memory max-count="10000"/> </local-cache> <distributed-cache name="sessions" owners="2"> <expiration lifespan="-1"/> </distributed-cache> <distributed-cache name="authenticationSessions" owners="2"> <expiration lifespan="-1"/> </distributed-cache> <distributed-cache name="offlineSessions" owners="2"> <expiration lifespan="-1"/> </distributed-cache> <distributed-cache name="clientSessions" owners="2"> <expiration lifespan="-1"/> </distributed-cache> <distributed-cache name="offlineClientSessions" owners="2"> <expiration lifespan="-1"/> </distributed-cache> <distributed-cache name="loginFailures" owners="2"> <expiration lifespan="-1"/> </distributed-cache> <local-cache name="authorization"> <encoding> <key media-type="application/x-java-object"/> <value media-type="application/x-java-object"/> </encoding> <memory max-count="10000"/> </local-cache> <replicated-cache name="work"> <expiration lifespan="-1"/> </replicated-cache> <local-cache name="keys"> <encoding> <key media-type="application/x-java-object"/> <value media-type="application/x-java-object"/> </encoding> <expiration max-idle="3600000"/> <memory max-count="1000"/> </local-cache> <distributed-cache name="actionTokens" owners="2"> <encoding> <key media-type="application/x-java-object"/> <value media-type="application/x-java-object"/> </encoding> <expiration max-idle="-1" lifespan="-1" interval="300000"/> <memory max-count="-1"/> </distributed-cache> </cache-container> </infinispan>