2015-08-06 15:29:08 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
2016-02-03 10:20:22 +00:00
|
|
|
<!--
|
|
|
|
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
|
|
~ and other contributors as indicated by the @author tags.
|
|
|
|
~
|
|
|
|
~ Licensed 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.
|
|
|
|
-->
|
|
|
|
|
2015-08-06 15:29:08 +00:00
|
|
|
<xsl:stylesheet version="2.0"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns:xalan="http://xml.apache.org/xalan"
|
2016-02-04 08:09:39 +00:00
|
|
|
xmlns:ds="urn:jboss:domain:datasources:4.0"
|
2015-08-06 15:29:08 +00:00
|
|
|
xmlns:logging="urn:jboss:domain:logging:3.0"
|
2016-02-04 08:09:39 +00:00
|
|
|
xmlns:ispn="urn:jboss:domain:infinispan:4.0"
|
2015-08-06 15:29:08 +00:00
|
|
|
xmlns:mcluster="urn:jboss:domain:modcluster:2.0"
|
|
|
|
xmlns:server="urn:jboss:domain:3.0"
|
|
|
|
exclude-result-prefixes='ds logging ispn mcluster xalan server'
|
|
|
|
>
|
|
|
|
|
|
|
|
<xsl:output method="xml" indent="yes" xalan:indent-amount="4" standalone="no"/>
|
|
|
|
<xsl:strip-space elements="*"/>
|
|
|
|
|
|
|
|
<xsl:template match="//ds:subsystem/ds:datasources/ds:datasource[@jndi-name='java:jboss/datasources/KeycloakDS']" >
|
|
|
|
<ds:datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
|
|
|
|
<ds:connection-url>jdbc:mysql://${mysql.host}/keycloak_db</ds:connection-url>
|
|
|
|
<ds:driver>mysql</ds:driver>
|
|
|
|
<ds:security>
|
|
|
|
<ds:user-name>root</ds:user-name>
|
|
|
|
<ds:password>mysecretpassword</ds:password>
|
|
|
|
</ds:security>
|
|
|
|
</ds:datasource>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="//ds:subsystem/ds:datasources/ds:drivers">
|
|
|
|
<xsl:copy>
|
|
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
|
|
<ds:driver name="mysql" module="com.mysql">
|
|
|
|
<ds:xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</ds:xa-datasource-class>
|
|
|
|
</ds:driver>
|
|
|
|
</xsl:copy>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="//logging:subsystem/logging:periodic-rotating-file-handler">
|
|
|
|
<xsl:copy>
|
|
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
|
|
</xsl:copy>
|
|
|
|
<logging:logger category="org.keycloak">
|
|
|
|
<logging:level name="DEBUG" />
|
|
|
|
</logging:logger>
|
|
|
|
<logging:logger category="org.jboss.resteasy.core.ResourceLocator">
|
|
|
|
<logging:level name="ERROR" />
|
|
|
|
</logging:logger>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="//ispn:subsystem/ispn:cache-container[@name='keycloak']">
|
|
|
|
<ispn:cache-container name="keycloak" jndi-name="infinispan/Keycloak">
|
|
|
|
<ispn:transport lock-timeout="60000"/>
|
|
|
|
<ispn:invalidation-cache name="realms" mode="SYNC"/>
|
|
|
|
<ispn:invalidation-cache name="users" mode="SYNC"/>
|
|
|
|
<ispn:distributed-cache name="sessions" mode="SYNC" owners="2"/>
|
2016-02-04 08:09:39 +00:00
|
|
|
<ispn:distributed-cache name="offlineSessions" mode="SYNC" owners="2"/>
|
2015-08-06 15:29:08 +00:00
|
|
|
<ispn:distributed-cache name="loginFailures" mode="SYNC" owners="2"/>
|
|
|
|
</ispn:cache-container>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="//mcluster:subsystem/mcluster:mod-cluster-config">
|
|
|
|
<mcluster:mod-cluster-config advertise-socket="modcluster" proxies='myproxy' proxy-url="/" balancer="mycluster" advertise="false" connector="ajp" sticky-session="true">
|
|
|
|
<mcluster:dynamic-load-provider>
|
|
|
|
<mcluster:load-metric type="cpu"/>
|
|
|
|
</mcluster:dynamic-load-provider>
|
|
|
|
</mcluster:mod-cluster-config>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="//server:socket-binding-group">
|
|
|
|
<xsl:copy>
|
|
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
|
|
<server:outbound-socket-binding name="myproxy">
|
|
|
|
<server:remote-destination host="${{httpd.proxyHost}}" port="${{httpd.proxyPort}}"/>
|
|
|
|
</server:outbound-socket-binding>
|
|
|
|
</xsl:copy>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="@*|node()">
|
|
|
|
<xsl:copy>
|
|
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
|
|
</xsl:copy>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|