From f32b38cdbc9d1b2c368408c86506e48f21eb9d51 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Wed, 29 Jul 2015 09:31:00 +0200 Subject: [PATCH] KEYCLOAK-1702 KEYCLOAK-1703 Make Infinispan default user session and cache provider --- .../configuration/keycloak-server.json | 15 ++-- .../server-war/META-INF/keycloak-server.json | 82 ------------------- .../server-war/META-INF/keycloak-server.json | 82 ------------------- .../eap6/eap6-server-overlay/assembly.xml | 2 +- .../src/main/keycloak-server.json | 82 ------------------- .../src/main/xslt/standalone.xsl | 13 +++ .../keycloak-infinispan.xml | 6 ++ 7 files changed, 29 insertions(+), 253 deletions(-) delete mode 100755 distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/META-INF/keycloak-server.json delete mode 100755 distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-as7-server-subsystem/main/server-war/META-INF/keycloak-server.json delete mode 100644 distribution/server-overlay/eap6/eap6-server-overlay/src/main/keycloak-server.json diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/keycloak-server.json b/distribution/feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/keycloak-server.json index 9b8f05171d..ee56f78dc8 100644 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/keycloak-server.json +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/keycloak-server.json @@ -23,18 +23,15 @@ }, "userSessions": { - "provider" : "mem" + "provider" : "infinispan" }, "realmCache": { - "provider": "mem" + "provider": "infinispan" }, "userCache": { - "provider": "mem", - "mem": { - "maxSize": 20000 - } + "provider": "infinispan" }, "timer": { @@ -78,5 +75,11 @@ "dataSource": "java:jboss/datasources/KeycloakDS", "databaseSchema": "update" } + }, + + "connectionsInfinispan": { + "default" : { + "cacheContainer" : "java:jboss/infinispan/Keycloak" + } } } \ No newline at end of file diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/META-INF/keycloak-server.json b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/META-INF/keycloak-server.json deleted file mode 100755 index 9b8f05171d..0000000000 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/META-INF/keycloak-server.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "providers": [ - "classpath:${jboss.server.config.dir}/providers/*" - ], - - "admin": { - "realm": "master" - }, - - "eventsStore": { - "provider": "jpa", - "jpa": { - "exclude-events": [ "REFRESH_TOKEN" ] - } - }, - - "realm": { - "provider": "jpa" - }, - - "user": { - "provider": "jpa" - }, - - "userSessions": { - "provider" : "mem" - }, - - "realmCache": { - "provider": "mem" - }, - - "userCache": { - "provider": "mem", - "mem": { - "maxSize": 20000 - } - }, - - "timer": { - "provider": "basic" - }, - - "theme": { - "default": "keycloak", - "staticMaxAge": 2592000, - "cacheTemplates": true, - "cacheThemes": true, - "folder": { - "dir": "${jboss.server.config.dir}/themes" - } - }, - - "login": { - "provider": "freemarker" - }, - - "account": { - "provider": "freemarker" - }, - - "email": { - "provider": "freemarker" - }, - - "scheduled": { - "interval": 900 - }, - - "connectionsHttpClient": { - "default": { - "disable-trust-manager": true - } - }, - - "connectionsJpa": { - "default": { - "dataSource": "java:jboss/datasources/KeycloakDS", - "databaseSchema": "update" - } - } -} \ No newline at end of file diff --git a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-as7-server-subsystem/main/server-war/META-INF/keycloak-server.json b/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-as7-server-subsystem/main/server-war/META-INF/keycloak-server.json deleted file mode 100755 index 9b8f05171d..0000000000 --- a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-as7-server-subsystem/main/server-war/META-INF/keycloak-server.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "providers": [ - "classpath:${jboss.server.config.dir}/providers/*" - ], - - "admin": { - "realm": "master" - }, - - "eventsStore": { - "provider": "jpa", - "jpa": { - "exclude-events": [ "REFRESH_TOKEN" ] - } - }, - - "realm": { - "provider": "jpa" - }, - - "user": { - "provider": "jpa" - }, - - "userSessions": { - "provider" : "mem" - }, - - "realmCache": { - "provider": "mem" - }, - - "userCache": { - "provider": "mem", - "mem": { - "maxSize": 20000 - } - }, - - "timer": { - "provider": "basic" - }, - - "theme": { - "default": "keycloak", - "staticMaxAge": 2592000, - "cacheTemplates": true, - "cacheThemes": true, - "folder": { - "dir": "${jboss.server.config.dir}/themes" - } - }, - - "login": { - "provider": "freemarker" - }, - - "account": { - "provider": "freemarker" - }, - - "email": { - "provider": "freemarker" - }, - - "scheduled": { - "interval": 900 - }, - - "connectionsHttpClient": { - "default": { - "disable-trust-manager": true - } - }, - - "connectionsJpa": { - "default": { - "dataSource": "java:jboss/datasources/KeycloakDS", - "databaseSchema": "update" - } - } -} \ No newline at end of file diff --git a/distribution/server-overlay/eap6/eap6-server-overlay/assembly.xml b/distribution/server-overlay/eap6/eap6-server-overlay/assembly.xml index e95f6aa88a..9a9e49069f 100755 --- a/distribution/server-overlay/eap6/eap6-server-overlay/assembly.xml +++ b/distribution/server-overlay/eap6/eap6-server-overlay/assembly.xml @@ -34,7 +34,7 @@ standalone-keycloak-ha.xml - src/main/keycloak-server.json + ../../../feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/keycloak-server.json standalone/configuration diff --git a/distribution/server-overlay/eap6/eap6-server-overlay/src/main/keycloak-server.json b/distribution/server-overlay/eap6/eap6-server-overlay/src/main/keycloak-server.json deleted file mode 100644 index 9b8f05171d..0000000000 --- a/distribution/server-overlay/eap6/eap6-server-overlay/src/main/keycloak-server.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "providers": [ - "classpath:${jboss.server.config.dir}/providers/*" - ], - - "admin": { - "realm": "master" - }, - - "eventsStore": { - "provider": "jpa", - "jpa": { - "exclude-events": [ "REFRESH_TOKEN" ] - } - }, - - "realm": { - "provider": "jpa" - }, - - "user": { - "provider": "jpa" - }, - - "userSessions": { - "provider" : "mem" - }, - - "realmCache": { - "provider": "mem" - }, - - "userCache": { - "provider": "mem", - "mem": { - "maxSize": 20000 - } - }, - - "timer": { - "provider": "basic" - }, - - "theme": { - "default": "keycloak", - "staticMaxAge": 2592000, - "cacheTemplates": true, - "cacheThemes": true, - "folder": { - "dir": "${jboss.server.config.dir}/themes" - } - }, - - "login": { - "provider": "freemarker" - }, - - "account": { - "provider": "freemarker" - }, - - "email": { - "provider": "freemarker" - }, - - "scheduled": { - "interval": 900 - }, - - "connectionsHttpClient": { - "default": { - "disable-trust-manager": true - } - }, - - "connectionsJpa": { - "default": { - "dataSource": "java:jboss/datasources/KeycloakDS", - "databaseSchema": "update" - } - } -} \ No newline at end of file diff --git a/distribution/server-overlay/eap6/eap6-server-overlay/src/main/xslt/standalone.xsl b/distribution/server-overlay/eap6/eap6-server-overlay/src/main/xslt/standalone.xsl index 519b4a71b6..3d4b77cedb 100755 --- a/distribution/server-overlay/eap6/eap6-server-overlay/src/main/xslt/standalone.xsl +++ b/distribution/server-overlay/eap6/eap6-server-overlay/src/main/xslt/standalone.xsl @@ -9,6 +9,7 @@ + @@ -44,6 +45,18 @@ + + + + + + + + + + + + diff --git a/integration/wildfly/wf9-server-subsystem/src/main/resources/subsystem-templates/keycloak-infinispan.xml b/integration/wildfly/wf9-server-subsystem/src/main/resources/subsystem-templates/keycloak-infinispan.xml index 30706ac978..1d92afc6d5 100644 --- a/integration/wildfly/wf9-server-subsystem/src/main/resources/subsystem-templates/keycloak-infinispan.xml +++ b/integration/wildfly/wf9-server-subsystem/src/main/resources/subsystem-templates/keycloak-infinispan.xml @@ -7,6 +7,12 @@ + + + + + +