Keycloak

Форк
0
2111 строк · 119.9 Кб
1
<?xml version="1.0"?>
2
<!--
3
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
4
~ and other contributors as indicated by the @author tags.
5
~
6
~ Licensed under the Apache License, Version 2.0 (the "License");
7
~ you may not use this file except in compliance with the License.
8
~ You may obtain a copy of the License at
9
~
10
~ http://www.apache.org/licenses/LICENSE-2.0
11
~
12
~ Unless required by applicable law or agreed to in writing, software
13
~ distributed under the License is distributed on an "AS IS" BASIS,
14
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
~ See the License for the specific language governing permissions and
16
~ limitations under the License.
17
-->
18

19
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
20
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
21

22
    <modelVersion>4.0.0</modelVersion>
23

24
    <parent>
25
        <groupId>org.keycloak.testsuite</groupId>
26
        <artifactId>integration-arquillian</artifactId>
27
        <version>999.0.0-SNAPSHOT</version>
28
    </parent>
29

30
    <packaging>pom</packaging>
31

32
    <artifactId>integration-arquillian-tests</artifactId>
33

34
    <name>Tests</name>
35

36
    <modules>
37
        <module>base</module>
38
        <module>other</module>
39
    </modules>
40

41
    <properties>
42
        <auth.server>undertow</auth.server>
43
        <auth.server.undertow>true</auth.server.undertow>
44

45
        <auth.server.cluster>false</auth.server.cluster>
46
        <auth.server.undertow.cluster>false</auth.server.undertow.cluster>
47
        <auth.server.jboss.cluster>false</auth.server.jboss.cluster>
48
        <auth.server.jboss.legacy>false</auth.server.jboss.legacy>
49
        <auth.server.quarkus.cluster>false</auth.server.quarkus.cluster>
50

51
        <auth.server.crossdc>false</auth.server.crossdc>
52
        <auth.server.undertow.crossdc>false</auth.server.undertow.crossdc>
53
        <auth.server.jboss.crossdc>false</auth.server.jboss.crossdc>
54
        <cache.server.lifecycle.skip>false</cache.server.lifecycle.skip>
55

56
        <auth.server.container>auth-server-${auth.server}</auth.server.container>
57
        <auth.server.home>${containers.home}/${auth.server.container}</auth.server.home>
58
        <auth.server.config.dir>${auth.server.home}</auth.server.config.dir>
59

60
        <auth.server.db.host>${docker.container.testdb.ip}</auth.server.db.host>
61
        <auth.server.host>localhost</auth.server.host>
62
        <auth.server.management.host>${auth.server.host}</auth.server.management.host>
63
        <auth.server.browserHost/> <!-- if set, this host will be used by the browser instead of auth.server.host -->
64
        <auth.server.port.offset>100</auth.server.port.offset>
65
        <auth.server.http.port>8180</auth.server.http.port>
66
        <auth.server.events.http.port>8089</auth.server.events.http.port>
67
        <auth.server.https.port>8543</auth.server.https.port>
68
        <auth.server.management.port>10090</auth.server.management.port>
69
        <auth.server.management.port.jmx>10099</auth.server.management.port.jmx>
70
        <auth.server.ssl.required>true</auth.server.ssl.required>
71
        <auth.server.memory.settings>-Xms64m -Xmx512m</auth.server.memory.settings>
72
        <auth.server.config.property.name>serverConfig</auth.server.config.property.name>
73
        <auth.server.adapter.impl.class>org.jboss.as.arquillian.container.managed.ManagedDeployableContainer</auth.server.adapter.impl.class>
74
        <auth.server.truststore>${auth.server.config.dir}/keycloak.truststore</auth.server.truststore>
75
        <auth.server.truststore.password>secret</auth.server.truststore.password>
76
        <auth.server.truststore.type>jks</auth.server.truststore.type>
77
        <auth.server.keystore>${auth.server.config.dir}/keycloak.jks</auth.server.keystore>
78
        <auth.server.keystore.password>secret</auth.server.keystore.password>
79
        <auth.server.keystore.type>jks</auth.server.keystore.type>
80
        <auth.server.jvm.args.extra/>
81

82
        <auth.server.jboss.artifactId>integration-arquillian-servers-auth-server-${auth.server}</auth.server.jboss.artifactId>
83
        <auth.server.jboss.skip.unpack>${auth.server.undertow}</auth.server.jboss.skip.unpack>
84
        <auth.server.quarkus.skip.unpack>true</auth.server.quarkus.skip.unpack>
85
        <auth.server.undertow.skip.unpack>false</auth.server.undertow.skip.unpack>
86
        <auth.server.jboss.startup.timeout>300</auth.server.jboss.startup.timeout>
87

88
        <!--debug properties-->
89
        <auth.server.debug.port>5005</auth.server.debug.port>
90
        <auth.server.debug.suspend>n</auth.server.debug.suspend>
91
        <auth.server.jboss.jvm.debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=${auth.server.debug.suspend},address=${auth.server.host}:${auth.server.debug.port}</auth.server.jboss.jvm.debug.args>
92

93
        <auth.server.remote>false</auth.server.remote>
94
        <auth.server.quarkus>false</auth.server.quarkus>
95
        <auth.server.quarkus.embedded>false</auth.server.quarkus.embedded>
96

97
        <auth.server.profile/>
98
        <auth.server.feature/>
99

100
        <auth.server.host2>${auth.server.host}</auth.server.host2> <!-- for broker and JS adapter tests; defaults to auth.server.host -->
101
        <app.server.host>localhost</app.server.host>
102

103
        <app.server.skip.unpack>true</app.server.skip.unpack>
104
        <app.server.artifactId>integration-arquillian-servers-app-server-${app.server}</app.server.artifactId>
105
        <app.server.home>${containers.home}/app-server-${app.server}</app.server.home>
106
        <app.server.keystore.dir>${app.server.home}/standalone/configuration</app.server.keystore.dir>
107
        <app.server.port.offset>200</app.server.port.offset>
108
        <app.server.http.port>8280</app.server.http.port>
109
        <app.server.https.port>8643</app.server.https.port>
110
        <app.server.management.protocol>http-remoting</app.server.management.protocol>
111
        <app.server.management.port>10190</app.server.management.port>
112
        <app.server.startup.timeout>60</app.server.startup.timeout>
113
        <app.server.reverse-proxy.port.offset>500</app.server.reverse-proxy.port.offset>
114
        <app.server.1.port.offset>300</app.server.1.port.offset>
115
        <app.server.1.management.port>10290</app.server.1.management.port>
116
        <app.server.2.port.offset>400</app.server.2.port.offset>
117
        <app.server.2.management.port>10390</app.server.2.management.port>
118
        <app.server.debug.port>5006</app.server.debug.port>
119
        <app.server.debug.suspend>n</app.server.debug.suspend>
120
        <app.server.jboss.jvm.debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=${app.server.debug.suspend},address=localhost:${app.server.debug.port}</app.server.jboss.jvm.debug.args>
121
        <app.server.1.debug.port>7301</app.server.1.debug.port>
122
        <app.server.1.debug.suspend>n</app.server.1.debug.suspend>
123
        <app.server.1.jboss.jvm.debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=${app.server.1.debug.suspend},address=localhost:${app.server.1.debug.port}</app.server.1.jboss.jvm.debug.args>
124
        <app.server.2.debug.port>7302</app.server.2.debug.port>
125
        <app.server.2.debug.suspend>n</app.server.2.debug.suspend>
126
        <app.server.2.jboss.jvm.debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=${app.server.2.debug.suspend},address=localhost:${app.server.2.debug.port}</app.server.2.jboss.jvm.debug.args>
127
        <app.server.memory.Xms>64m</app.server.memory.Xms>
128
        <app.server.memory.Xmx>768m</app.server.memory.Xmx>
129
        <app.server.memory.settings>-Xms${app.server.memory.Xms} -Xmx${app.server.memory.Xmx} -XX:MetaspaceSize=${surefire.memory.metaspace} -XX:MaxMetaspaceSize=${surefire.memory.metaspace.max}</app.server.memory.settings>
130
        <app.server.ssl.required>false</app.server.ssl.required>
131
        <app.server.truststore>${app.server.keystore.dir}/keycloak.truststore</app.server.truststore>
132
        <app.server.truststore.password>secret</app.server.truststore.password>
133
        <app.server.keystore>${app.server.keystore.dir}/adapter.jks</app.server.keystore>
134
        <app.server.keystore.password>secret</app.server.keystore.password>
135
        <app.server.jvm.args.extra/>
136
        <tomcat.javax.net.ssl.properties/>
137

138
        <cache.server.legacy>false</cache.server.legacy>
139
        <cache.server.home>${containers.home}/cache-server-${cache.server}</cache.server.home>
140
        <cache.server.1.port.offset>1010</cache.server.1.port.offset>
141
        <cache.server.management.port>11000</cache.server.management.port>
142
        <cache.server.2.port.offset>2010</cache.server.2.port.offset>
143
        <cache.server.2.management.port>12000</cache.server.2.management.port>
144
        <cache.server.console.output>true</cache.server.console.output>
145
        <cache.server.auth>false</cache.server.auth>
146

147
        <!--
148
        ~ Definition of default JVM parameters for all modular JDKs. See:
149
        ~
150
        ~   https://github.com/wildfly/wildfly-core/blob/master/core-feature-pack/common/src/main/resources/content/bin/common.sh#L19 and
151
        ~   https://github.com/wildfly/wildfly-core/blob/master/launcher/src/main/java/org/wildfly/core/launcher/AbstractCommandBuilder.java#L58
152
        ~
153
        ~ for details. The explanation / purpose of adding a particular modular option is as follows:
154
        ~ * add-exports=java.desktop/sun.awt=ALL-UNNAMED                Needed by the iiop-openjdk subsystem
155
        ~ * add-opens=java.base/java.lang=ALL-UNNAMED                   Needed if Hibernate applications use Javassist
156
        ~ * add-opens=java.base/java.lang.invoke=ALL-UNNAMED            Needed by the MicroProfile REST Client subsystem
157
        ~ * add-opens=java.base/java.io=ALL-UNNAMED                     Needed by JBoss Marshalling
158
        ~ * add-opens=java.base/java.security=ALL-UNNAMED               Needed by WildFly Security Manager
159
        ~ * add-opens=java.base/java.util=ALL-UNNAMED                   Needed for marshalling of enum maps
160
        ~ * add-opens=java.management/javax.management=ALL-UNNAMED      EE integration with sar mbeans requires deep reflection in javax.management
161
        ~ * add-opens=java.naming/javax.naming=ALL-UNNAMED              InitialContext proxy generation requires deep reflection in javax.naming
162
        ~ * add-modules=java.se                                         Needed for backward compatibility with jboss-modules older than jboss-modules 1.9.1.Final
163
        -->
164
        <default.modular.jvm.options>--add-exports=java.base/sun.security.validator=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-exports=java.base/com.sun.crypto.provider=ALL-UNNAMED --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.naming/javax.naming=ALL-UNNAMED --add-modules=java.se</default.modular.jvm.options>
165

166
        <dependency.keystore.root>${project.build.directory}/dependency/keystore</dependency.keystore.root>
167
        <dependency.truststore>${dependency.keystore.root}/keycloak.truststore</dependency.truststore>
168
        <dependency.truststore.password>secret</dependency.truststore.password>
169
        <dependency.keystore>${dependency.keystore.root}/keycloak.jks</dependency.keystore>
170
        <dependency.keystore.password>secret</dependency.keystore.password>
171

172
        <keycloak.connectionsInfinispan.remoteStoreServer>localhost</keycloak.connectionsInfinispan.remoteStoreServer>
173
        <keycloak.connectionsInfinispan.remoteStorePort>12232</keycloak.connectionsInfinispan.remoteStorePort>
174
        <keycloak.connectionsInfinispan.remoteStorePort.2>13232</keycloak.connectionsInfinispan.remoteStorePort.2>
175
        <keycloak.connectionsJpa.url.crossdc>jdbc:h2:mem:test-dc-shared</keycloak.connectionsJpa.url.crossdc>
176
        <keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} %-5p [%c] %m%n</keycloak.testsuite.logging.pattern>
177

178
        <!--KEYCLOAK-4793-->
179
        <maven.repo.local>${user.home}/.m2/repository</maven.repo.local>
180
        <settings.path>${user.home}/.m2/settings.xml</settings.path>
181
        <repo.url/>
182
        <kie.maven.settings>
183
            -Dkie.maven.settings.custom=${settings.path}
184
            -Dkie.maven.repo.local=${maven.repo.local}
185
            -Drepo.url=${repo.url}
186
        </kie.maven.settings>
187

188
        <adapter.test.props>
189
            -Dkeycloak.x509cert.lookup.provider=${keycloak.x509cert.lookup.provider}
190
            -Dapp.server.base.url=http://localhost:${app.server.http.port}
191
            -Dauth.server.base.url=http://localhost:${auth.server.http.port}
192
            -Dapp.server.ssl.base.url=https://localhost:${app.server.https.port}
193
            -Dapp.server.ssl.required=${app.server.ssl.required}
194
            -Dauth.server.ssl.base.url=https://localhost:${auth.server.https.port}
195
            -Dauth.server.ssl.required=${auth.server.ssl.required}
196
            -Dauth.server.host=${auth.server.host}
197
            -Dauth.server.host2=${auth.server.host2}
198
            -Dapp.server.host=${app.server.host}
199
            -Dapp.server.http.port=${app.server.http.port}
200
            -Dapp.server.https.port=${app.server.https.port}
201
            -Dmy.host.name=localhost
202
            -Djava.security.krb5.conf=${project.build.directory}/dependency/kerberos/test-krb5.conf
203
        </adapter.test.props>
204

205
        <examples.home>${project.build.directory}/examples</examples.home>
206
        <examples.basedir>${keycloak-parent.basedir}/examples</examples.basedir> <!--keycloak/examples directory-->
207
        <examples.version.suffix>${project.version}</examples.version.suffix>
208
        <skip.copy.example.wars>false</skip.copy.example.wars>
209

210
        <browser>htmlUnit</browser>
211
        <browser.strict.cookies>false</browser.strict.cookies>
212
        <webdriverDownloadBinaries>true</webdriverDownloadBinaries>
213
        <droneInstantiationTimeoutInSeconds>60</droneInstantiationTimeoutInSeconds>
214
        <github.username/>
215
        <github.secretToken/>
216
        <ieDriverArch>Win32</ieDriverArch>
217
        <ieDriverVersion/>
218
        <js.browser>chrome</js.browser>
219
        <js.chromeArguments>--headless</js.chromeArguments>
220
        <htmlUnitBrowserVersion>chrome</htmlUnitBrowserVersion>
221
        <firefox_binary/> <!-- the path is set automatically based on the OS -->
222
        <firefoxLegacyDriver>false</firefoxLegacyDriver>
223
        <firefoxDriverVersion/>
224
        <firefoxUserPreferences/>
225
        <firefoxHeadless>true</firefoxHeadless>
226
        <chromeBinary/>
227
        <chromeArguments>--headless --window-size=1920,1080 --remote-allow-origins=*</chromeArguments>
228
        <chromeDriverVersion/>
229

230
        <appium.platformName/>
231
        <appium.deviceName/>
232
        <appium.browserName/>
233
        <appium.avd/>
234
        <appium.automationName/>
235
        <appium.noReset/>
236
        <appium.fullReset/>
237

238
        <frontend.console.output>true</frontend.console.output>
239
        <backends.console.output>true</backends.console.output>
240

241
        <testsuite.constants>${project.build.directory}/dependency/test-constants.properties</testsuite.constants>
242

243
        <skip.add.user.json>false</skip.add.user.json>
244
        <skip.clean.second.cache>true</skip.clean.second.cache>
245
        <skip.copy.auth.crossdc.nodes>true</skip.copy.auth.crossdc.nodes>
246
        <client.certificate.ca.path>${auth.server.config.dir}/ca.crt</client.certificate.ca.path>
247
        <client.certificate.file>${auth.server.config.dir}/client.crt</client.certificate.file>
248
        <client.certificate.keystore>${auth.server.config.dir}/client.jks</client.certificate.keystore>
249
        <client.certificate.keystore.passphrase>secret</client.certificate.keystore.passphrase>
250
        <client.key.file>${auth.server.config.dir}/client.key</client.key.file>
251
        <client.key.passphrase>secret</client.key.passphrase>
252
        <client.truststore>${auth.server.config.dir}/keycloak.truststore</client.truststore>
253
        <client.truststore.passphrase>secret</client.truststore.passphrase>
254

255
        <!-- KEYCLOAK-6771 Certificate Bound Token -->
256
        <hok.client.certificate.keystore>${auth.server.config.dir}/other_client.jks</hok.client.certificate.keystore>
257
        <hok.client.certificate.keystore.passphrase>secret</hok.client.certificate.keystore.passphrase>
258

259
        <!-- Client certificate with the format suitable for OpenBanking Brasil -->
260
        <obb.client.certificate.keystore>${auth.server.config.dir}/test-user-obb.jks</obb.client.certificate.keystore>
261
        <obb.client.certificate.keystore.passphrase>password</obb.client.certificate.keystore.passphrase>
262

263
        <auth.server.ocsp.responder.enabled>false</auth.server.ocsp.responder.enabled>
264
        <keycloak.x509cert.lookup.provider>default</keycloak.x509cert.lookup.provider>
265
        <auth.server.quarkus.cluster.config>local</auth.server.quarkus.cluster.config>
266
        <auth.server.fips.mode>disabled</auth.server.fips.mode>
267
        <auth.server.supported.keystore.types>JKS,PKCS12,BCFKS</auth.server.supported.keystore.types>
268
        <auth.server.supported.rsa.key.sizes>1024,2048,4096</auth.server.supported.rsa.key.sizes>
269
        <auth.server.kerberos.supported>true</auth.server.kerberos.supported>
270
    </properties>
271

272
    <build>
273
        <pluginManagement>
274
            <plugins>
275
                <plugin>
276
                    <artifactId>maven-dependency-plugin</artifactId>
277
                    <executions>
278
                        <execution>
279
                            <id>unpack-undertow-server</id>
280
                            <phase>generate-test-resources</phase>
281
                            <goals>
282
                                <goal>unpack</goal>
283
                            </goals>
284
                            <configuration>
285
                                <artifactItems>
286
                                    <artifactItem>
287
                                        <groupId>org.keycloak.testsuite</groupId>
288
                                        <artifactId>integration-arquillian-servers-auth-server-undertow</artifactId>
289
                                        <version>${project.version}</version>
290
                                        <type>jar</type>
291
                                        <outputDirectory>${containers.home}/auth-server-undertow</outputDirectory>
292
                                    </artifactItem>
293
                                </artifactItems>
294
                                <includes>*.jks,*.crt,*.truststore,*.crl,*.key,certs/clients/*</includes>
295
                                <skip>${auth.server.undertow.skip.unpack}</skip>
296
                            </configuration>
297
                        </execution>
298
                        <execution>
299
                            <id>unpack-quarkus-server</id>
300
                            <phase>generate-test-resources</phase>
301
                            <goals>
302
                                <goal>unpack</goal>
303
                            </goals>
304
                            <configuration>
305
                                <artifactItems>
306
                                    <artifactItem>
307
                                        <groupId>org.keycloak.testsuite</groupId>
308
                                        <artifactId>integration-arquillian-servers-auth-server-quarkus</artifactId>
309
                                        <version>${project.version}</version>
310
                                        <type>zip</type>
311
                                        <outputDirectory>${containers.home}</outputDirectory>
312
                                    </artifactItem>
313
                                </artifactItems>
314
                                <skip>${auth.server.quarkus.skip.unpack}</skip>
315
                            </configuration>
316
                        </execution>
317
                        <execution>
318
                            <id>unpack-app-server</id>
319
                            <phase>generate-test-resources</phase>
320
                            <goals>
321
                                <goal>unpack</goal>
322
                            </goals>
323
                            <configuration>
324
                                <artifactItems>
325
                                    <artifactItem>
326
                                        <groupId>org.keycloak.testsuite</groupId>
327
                                        <artifactId>${app.server.artifactId}</artifactId>
328
                                        <version>${project.version}</version>
329
                                        <type>zip</type>
330
                                    </artifactItem>
331
                                </artifactItems>
332
                                <outputDirectory>${containers.home}</outputDirectory>
333
                                <skip>${app.server.skip.unpack}</skip>
334
                            </configuration>
335
                        </execution>
336
                        <execution>
337
                            <id>example-wars</id>
338
                            <phase>generate-test-resources</phase>
339
                            <goals>
340
                                <goal>copy</goal>
341
                            </goals>
342
                            <configuration>
343
                                <skip>${skip.copy.example.wars}</skip>
344
                                <artifactItems>
345
                                    <artifactItem>
346
                                        <groupId>org.keycloak.testsuite</groupId>
347
                                        <artifactId>hello-world-authz-service</artifactId>
348
                                        <version>${project.version}</version>
349
                                        <type>war</type>
350
                                    </artifactItem>
351
                                    <artifactItem>
352
                                        <groupId>org.keycloak.testsuite</groupId>
353
                                        <artifactId>servlet-authz-app</artifactId>
354
                                        <version>${project.version}</version>
355
                                        <type>war</type>
356
                                    </artifactItem>
357
                                    <artifactItem>
358
                                        <groupId>org.keycloak.testsuite</groupId>
359
                                        <artifactId>servlet-policy-enforcer</artifactId>
360
                                        <version>${project.version}</version>
361
                                        <type>war</type>
362
                                    </artifactItem>
363
                                    <artifactItem>
364
                                        <groupId>org.keycloak.testsuite</groupId>
365
                                        <artifactId>integration-arquillian-test-apps-cors-angular-product</artifactId>
366
                                        <version>${project.version}</version>
367
                                        <type>war</type>
368
                                    </artifactItem>
369
                                    <artifactItem>
370
                                        <groupId>org.keycloak.testsuite</groupId>
371
                                        <artifactId>integration-arquillian-test-apps-cors-database-service</artifactId>
372
                                        <version>${project.version}</version>
373
                                        <type>war</type>
374
                                    </artifactItem>
375
                                </artifactItems>
376
                                <outputDirectory>${examples.home}</outputDirectory>
377
                                <overWriteIfNewer>true</overWriteIfNewer>
378
                            </configuration>
379
                        </execution>
380
                        <execution>
381
                            <id>test-apps-realms</id>
382
                            <phase>generate-test-resources</phase>
383
                            <goals>
384
                                <goal>unpack</goal>
385
                            </goals>
386
                            <configuration>
387
                                <artifactItems>
388
                                    <artifactItem>
389
                                        <groupId>org.keycloak.testsuite</groupId>
390
                                        <artifactId>integration-arquillian-test-apps-dist</artifactId>
391
                                        <version>${project.version}</version>
392
                                        <type>zip</type>
393
                                        <includes>**/*realm.json,**/*authz-service.json,**/testsaml.json,**/*-keycloak.json</includes>
394
                                    </artifactItem>
395
                                </artifactItems>
396
                                <outputDirectory>${examples.home}</outputDirectory>
397
                                <overWriteIfNewer>true</overWriteIfNewer>
398
                            </configuration>
399
                        </execution>
400
                    </executions>
401
                </plugin>
402
                <plugin>
403
                    <artifactId>maven-resources-plugin</artifactId>
404
                    <executions>
405
                        <execution>
406
                            <id>copy-admin-user-json-file</id>
407
                            <phase>generate-resources</phase>
408
                            <goals>
409
                                <goal>copy-resources</goal>
410
                            </goals>
411
                            <configuration>
412
                                <skip>${skip.add.user.json}</skip>
413
                                <outputDirectory>${auth.server.config.dir}</outputDirectory>
414
                                <resources>
415
                                    <resource>
416
                                        <directory>src/test/resources</directory>
417
                                        <includes>
418
                                            <include>keycloak-add-user.json</include>
419
                                        </includes>
420
                                        <filtering>true</filtering>
421
                                    </resource>
422
                                </resources>
423
                            </configuration>
424
                        </execution>
425
                        <execution>
426
                            <id>copy-truststore</id>
427
                            <phase>generate-resources</phase>
428
                            <goals>
429
                                <goal>copy-resources</goal>
430
                            </goals>
431
                            <configuration>
432
                                <outputDirectory>${project.build.directory}/dependency</outputDirectory>
433
                                <resources>
434
                                    <resource>
435
                                        <directory>src/test/resources</directory>
436
                                        <includes>
437
                                            <include>keystore/**</include>
438
                                        </includes>
439
                                    </resource>
440
                                </resources>
441
                            </configuration>
442
                        </execution>
443
                        <execution>
444
                            <id>example-realms</id>
445
                            <phase>generate-test-resources</phase>
446
                            <goals>
447
                                <goal>copy-resources</goal>
448
                            </goals>
449
                            <configuration>
450
                                <skip>${app.server.skip.unpack}</skip>
451
                                <outputDirectory>${examples.home}/example-realms</outputDirectory>
452
                                <overWriteIfNewer>true</overWriteIfNewer>
453
                                <resources>
454
                                    <resource>
455
                                        <directory>${examples.basedir}</directory>
456
                                        <filtering>true</filtering>
457
                                        <includes>
458
                                            <include>**/*.json</include>
459
                                        </includes>
460
                                    </resource>
461
                                </resources>
462
                            </configuration>
463
                        </execution>
464
                    </executions>
465
                </plugin>
466
                <plugin>
467
                    <artifactId>maven-antrun-plugin</artifactId>
468
                    <executions>
469
                        <execution>
470
                            <id>clean-second-cache-server-arquillian-bug-workaround</id><!--https://issues.jboss.org/browse/WFARQ-44-->
471
                            <phase>process-test-resources</phase>
472
                            <goals><goal>run</goal></goals>
473
                            <configuration>
474
                                <skip>${skip.clean.second.cache}</skip>
475
                                <target>
476
                                    <echo>${cache.server.home}/standalone-dc-2</echo>
477
                                    <delete failonerror="false" dir="${cache.server.home}/standalone-dc-2" />
478
                                    <mkdir dir="${cache.server.home}/standalone-dc-2/deployments" />
479
                                </target>
480
                            </configuration>
481
                        </execution>
482
                    </executions>
483
                </plugin>
484
                <plugin>
485
                    <artifactId>maven-surefire-plugin</artifactId>
486
                    <configuration>
487
                        <systemPropertyVariables>
488
                            <project.build.directory>${project.build.directory}</project.build.directory>
489
                            <arquillian.xml>${project.build.directory}/dependency/arquillian.xml</arquillian.xml>
490
                            <log4j.configuration>file:${project.build.directory}/dependency/log4j.properties</log4j.configuration> <!-- for the logging to properly work with tests in the 'other' module -->
491

492
                            <auth.server>${auth.server}</auth.server>
493
                            <auth.server.container>${auth.server.container}</auth.server.container>
494

495
                            <auth.server.undertow>${auth.server.undertow}</auth.server.undertow>
496
                            <auth.server.jboss>${auth.server.jboss}</auth.server.jboss>
497
                            <auth.server.memory.settings>${auth.server.memory.settings}</auth.server.memory.settings>
498

499
                            <auth.server.home>${auth.server.home}</auth.server.home>
500
                            <auth.server.java.home>${auth.server.java.home}</auth.server.java.home>
501

502
                            <auth.server.host>${auth.server.host}</auth.server.host>
503
                            <auth.server.management.host>${auth.server.management.host}</auth.server.management.host>
504
                            <auth.server.browserHost>${auth.server.browserHost}</auth.server.browserHost>
505
                            <auth.server.port.offset>${auth.server.port.offset}</auth.server.port.offset>
506
                            <auth.server.http.port>${auth.server.http.port}</auth.server.http.port>
507
                            <auth.server.events.http.port>${auth.server.events.http.port}</auth.server.events.http.port>
508
                            <auth.server.https.port>${auth.server.https.port}</auth.server.https.port>
509
                            <auth.server.management.port>${auth.server.management.port}</auth.server.management.port>
510
                            <auth.server.management.port.jmx>${auth.server.management.port.jmx}</auth.server.management.port.jmx>
511
                            <auth.server.ssl.required>${auth.server.ssl.required}</auth.server.ssl.required>
512
                            <auth.server.jboss.startup.timeout>${auth.server.jboss.startup.timeout}</auth.server.jboss.startup.timeout>
513
                            <auth.server.config.dir>${auth.server.config.dir}</auth.server.config.dir>
514
                            <auth.server.config.property.name>${auth.server.config.property.name}</auth.server.config.property.name>
515
                            <auth.server.config.property.value>${auth.server.config.property.value}</auth.server.config.property.value>
516
                            <auth.server.adapter.impl.class>${auth.server.adapter.impl.class}</auth.server.adapter.impl.class>
517
                            <auth.server.jboss.jvm.debug.args>${auth.server.jboss.jvm.debug.args}</auth.server.jboss.jvm.debug.args>
518
                            <auth.server.truststore>${auth.server.truststore}</auth.server.truststore>
519
                            <auth.server.truststore.password>${auth.server.truststore.password}</auth.server.truststore.password>
520
                            <auth.server.truststore.type>${auth.server.truststore.type}</auth.server.truststore.type>
521
                            <auth.server.keystore>${auth.server.keystore}</auth.server.keystore>
522
                            <auth.server.keystore.password>${auth.server.keystore.password}</auth.server.keystore.password>
523
                            <auth.server.keystore.type>${auth.server.keystore.type}</auth.server.keystore.type>
524
                            <auth.server.java.security.file>${auth.server.java.security.file}</auth.server.java.security.file>
525
                            <auth.server.jvm.args.extra>${auth.server.jvm.args.extra}</auth.server.jvm.args.extra>
526

527
                            <auth.server.profile>${auth.server.profile}</auth.server.profile>
528
                            <auth.server.feature>${auth.server.feature}</auth.server.feature>
529

530
                            <auth.server.host2>${auth.server.host2}</auth.server.host2> <!-- for broker tests -->
531

532
                            <app.server>${app.server}</app.server>
533
                            <app.server.home>${app.server.home}</app.server.home>
534
                            <app.server.keystore.dir>${app.server.keystore.dir}</app.server.keystore.dir>
535
                            <app.server.java.home>${app.server.java.home}</app.server.java.home>
536
                            <app.server.memory.settings>${app.server.memory.settings}</app.server.memory.settings>
537
                            <app.server.port.offset>${app.server.port.offset}</app.server.port.offset>
538
                            <app.server.http.port>${app.server.http.port}</app.server.http.port>
539
                            <app.server.https.port>${app.server.https.port}</app.server.https.port>
540
                            <app.server.management.protocol>${app.server.management.protocol}</app.server.management.protocol>
541
                            <app.server.management.port>${app.server.management.port}</app.server.management.port>
542
                            <app.server.startup.timeout>${app.server.startup.timeout}</app.server.startup.timeout>
543
                            <app.server.reverse-proxy.port.offset>${app.server.reverse-proxy.port.offset}</app.server.reverse-proxy.port.offset>
544
                            <app.server.1.port.offset>${app.server.1.port.offset}</app.server.1.port.offset>
545
                            <app.server.1.management.port>${app.server.1.management.port}</app.server.1.management.port>
546
                            <app.server.2.port.offset>${app.server.2.port.offset}</app.server.2.port.offset>
547
                            <app.server.2.management.port>${app.server.2.management.port}</app.server.2.management.port>
548
                            <app.server.jboss.jvm.debug.args>${app.server.jboss.jvm.debug.args}</app.server.jboss.jvm.debug.args>
549
                            <app.server.truststore>${app.server.truststore}</app.server.truststore>
550
                            <app.server.truststore.password>${app.server.truststore.password}</app.server.truststore.password>
551
                            <app.server.keystore>${app.server.keystore}</app.server.keystore>
552
                            <app.server.keystore.password>${app.server.keystore.password}</app.server.keystore.password>
553
                            <app.server.1.jboss.jvm.debug.args>${app.server.1.jboss.jvm.debug.args}</app.server.1.jboss.jvm.debug.args>
554
                            <app.server.2.jboss.jvm.debug.args>${app.server.2.jboss.jvm.debug.args}</app.server.2.jboss.jvm.debug.args>
555
                            <app.server.jvm.args.extra>${app.server.jvm.args.extra}</app.server.jvm.args.extra>
556
                            <tomcat.javax.net.ssl.properties>${tomcat.javax.net.ssl.properties}</tomcat.javax.net.ssl.properties>
557

558
                            <frontend.console.output>${frontend.console.output}</frontend.console.output>
559
                            <backends.console.output>${backend.console.output}</backends.console.output>
560

561
                            <auth.server.remote>${auth.server.remote}</auth.server.remote>
562
                            <auth.server.quarkus>${auth.server.quarkus}</auth.server.quarkus>
563
                            <auth.server.quarkus.embedded>${auth.server.quarkus.embedded}</auth.server.quarkus.embedded>
564
                            <jboss.server.config.dir>${auth.server.config.dir}</jboss.server.config.dir>
565

566
                            <adapter.test.props>${adapter.test.props}</adapter.test.props>
567
                            <examples.home>${examples.home}</examples.home>
568
                            <examples.version.suffix>${examples.version.suffix}</examples.version.suffix>
569

570
                            <kie.maven.settings>${kie.maven.settings}</kie.maven.settings>
571

572
                            <testsuite.constants>${testsuite.constants}</testsuite.constants>
573
                            <cli.log.output>${cli.log.output}</cli.log.output>
574
                            <test.intermittent>${test.intermittent}</test.intermittent>
575

576
                            <default.modular.jvm.options>${default.modular.jvm.options}</default.modular.jvm.options>
577

578
                            <dependency.keystore.root>${dependency.keystore.root}</dependency.keystore.root>
579
                            <dependency.truststore>${dependency.truststore}</dependency.truststore>
580
                            <dependency.truststore.password>${dependency.truststore.password}</dependency.truststore.password>
581
                            <dependency.keystore>${dependency.keystore}</dependency.keystore>
582
                            <dependency.keystore.password>${dependency.keystore.password}</dependency.keystore.password>
583

584
                            <browser>${browser}</browser>
585
                            <browser.strict.cookies>${browser.strict.cookies}</browser.strict.cookies>
586
                            <js.browser>${js.browser}</js.browser>
587
                            <js.chromeArguments>${js.chromeArguments}</js.chromeArguments>
588
                            <htmlUnitBrowserVersion>${htmlUnitBrowserVersion}</htmlUnitBrowserVersion>
589
                            <webdriverDownloadBinaries>${webdriverDownloadBinaries}</webdriverDownloadBinaries>
590
                            <droneInstantiationTimeoutInSeconds>${droneInstantiationTimeoutInSeconds}</droneInstantiationTimeoutInSeconds>
591

592
                            <github.username>${github.username}</github.username>
593
                            <github.secretToken>${github.secretToken}</github.secretToken>
594
                            <ieDriverArch>${ieDriverArch}</ieDriverArch>
595
                            <ieDriverVersion>${ieDriverVersion}</ieDriverVersion>
596

597
                            <firefox_binary>${firefox_binary}</firefox_binary>
598
                            <chromeBinary>${chromeBinary}</chromeBinary>
599
                            <chromeArguments>${chromeArguments}</chromeArguments>
600
                            <chromeDriverVersion>${chromeDriverVersion}</chromeDriverVersion>
601

602
                            <firefoxLegacyDriver>${firefoxLegacyDriver}</firefoxLegacyDriver>
603
                            <firefoxDriverVersion>${firefoxDriverVersion}</firefoxDriverVersion>
604
                            <firefoxUserPreferences>${firefoxUserPreferences}</firefoxUserPreferences>
605
                            <firefoxHeadless>${firefoxHeadless}</firefoxHeadless>
606

607
                            <appium.platformName>${appium.platformName}</appium.platformName>
608
                            <appium.deviceName>${appium.deviceName}</appium.deviceName>
609
                            <appium.browserName>${appium.browserName}</appium.browserName>
610
                            <appium.avd>${appium.avd}</appium.avd>
611
                            <appium.automationName>${appium.automationName}</appium.automationName>
612
                            <appium.noReset>${appium.noReset}</appium.noReset>
613
                            <appium.fullReset>${appium.fullReset}</appium.fullReset>
614

615
                            <project.version>${project.version}</project.version>
616

617
                            <client.certificate.ca.path>${client.certificate.ca.path}</client.certificate.ca.path>
618
                            <client.certificate.file>${client.certificate.file}</client.certificate.file>
619
                            <client.certificate.keystore>${client.certificate.keystore}</client.certificate.keystore>
620
                            <client.certificate.keystore.passphrase>${client.certificate.keystore.passphrase}</client.certificate.keystore.passphrase>
621
                            <client.key.file>${client.key.file}</client.key.file>
622
                            <client.key.passphrase>${client.key.passphrase}</client.key.passphrase>
623
                            <client.truststore>${client.truststore}</client.truststore>
624
                            <client.truststore.passphrase>${client.truststore.passphrase}</client.truststore.passphrase>
625

626
                            <!-- KEYCLOAK-6771 Certificate Bound Token -->
627
                            <hok.client.certificate.keystore>${hok.client.certificate.keystore}</hok.client.certificate.keystore>
628
                            <hok.client.certificate.keystore.passphrase>${hok.client.certificate.keystore.passphrase}</hok.client.certificate.keystore.passphrase>
629

630
                            <!-- Client certificate with the format suitable for OpenBanking Brasil -->
631
                            <obb.client.certificate.keystore>${obb.client.certificate.keystore}</obb.client.certificate.keystore>
632
                            <obb.client.certificate.keystore.passphrase>${obb.client.certificate.keystore.passphrase}</obb.client.certificate.keystore.passphrase>
633

634
                            <auth.server.ocsp.responder.enabled>${auth.server.ocsp.responder.enabled}</auth.server.ocsp.responder.enabled>
635

636
                            <!-- cluster properties -->
637
                            <auth.server.cluster>${auth.server.cluster}</auth.server.cluster>
638
                            <auth.server.undertow.cluster>${auth.server.undertow.cluster}</auth.server.undertow.cluster>
639
                            <auth.server.jboss.cluster>${auth.server.jboss.cluster}</auth.server.jboss.cluster>
640
                            <auth.server.jboss.legacy>${auth.server.jboss.legacy}</auth.server.jboss.legacy>
641
                            <auth.server.quarkus.cluster>${auth.server.quarkus.cluster}</auth.server.quarkus.cluster>
642
                            <auth.server.quarkus.cluster.config>${auth.server.quarkus.cluster.config}</auth.server.quarkus.cluster.config>
643

644
                            <!--cache server properties-->
645
                            <auth.server.crossdc>${auth.server.crossdc}</auth.server.crossdc>
646
                            <auth.server.undertow.crossdc>${auth.server.undertow.crossdc}</auth.server.undertow.crossdc>
647
                            <auth.server.jboss.crossdc>${auth.server.jboss.crossdc}</auth.server.jboss.crossdc>
648
                            <cache.server.lifecycle.skip>${cache.server.lifecycle.skip}</cache.server.lifecycle.skip>
649

650
                            <cache.server>${cache.server}</cache.server>
651
                            <cache.server.legacy>${cache.server.legacy}</cache.server.legacy>
652
                            <cache.server.1.port.offset>${cache.server.1.port.offset}</cache.server.1.port.offset>
653
                            <cache.server.home>${cache.server.home}</cache.server.home>
654
                            <cache.server.console.output>${cache.server.console.output}</cache.server.console.output>
655
                            <cache.server.management.port>${cache.server.management.port}</cache.server.management.port>
656
                            <cache.server.2.port.offset>${cache.server.2.port.offset}</cache.server.2.port.offset>
657
                            <cache.server.2.management.port>${cache.server.2.management.port}</cache.server.2.management.port>
658
                            <cache.server.java.home>${cache.server.java.home}</cache.server.java.home>
659
                            <cache.server.auth>${cache.server.auth}</cache.server.auth>
660

661
                            <keycloak.connectionsInfinispan.remoteStorePort>${keycloak.connectionsInfinispan.remoteStorePort}</keycloak.connectionsInfinispan.remoteStorePort>
662
                            <keycloak.connectionsInfinispan.remoteStorePort.2>${keycloak.connectionsInfinispan.remoteStorePort.2}</keycloak.connectionsInfinispan.remoteStorePort.2>
663
                            <keycloak.connectionsInfinispan.remoteStoreServer>${keycloak.connectionsInfinispan.remoteStoreServer}</keycloak.connectionsInfinispan.remoteStoreServer>
664
                            <keycloak.connectionsInfinispan.sessionsOwners>${keycloak.connectionsInfinispan.sessionsOwners}</keycloak.connectionsInfinispan.sessionsOwners>
665
                            <keycloak.testsuite.logging.pattern>${keycloak.testsuite.logging.pattern}</keycloak.testsuite.logging.pattern>
666

667
                            <keycloak.connectionsJpa.url.crossdc>${keycloak.connectionsJpa.url.crossdc}</keycloak.connectionsJpa.url.crossdc>
668

669
                            <!-- used by PasswordPolicyTest.testBlacklistPasswordPolicyWithTestBlacklist, see KEYCLOAK-5244 -->
670
                            <keycloak.password.blacklists.path>${project.build.directory}/dependency/password-blacklists</keycloak.password.blacklists.path>
671

672
                            <keycloak.storage.connections.vendor>${keycloak.storage.connections.vendor}</keycloak.storage.connections.vendor>
673
                            <keycloak.connectionsJpa.driver>${keycloak.connectionsJpa.driver}</keycloak.connectionsJpa.driver>
674
                            <keycloak.connectionsJpa.url>${keycloak.connectionsJpa.url}</keycloak.connectionsJpa.url>
675
                            <keycloak.connectionsJpa.database>${keycloak.connectionsJpa.database}</keycloak.connectionsJpa.database>
676
                            <keycloak.connectionsJpa.user>${keycloak.connectionsJpa.user}</keycloak.connectionsJpa.user>
677
                            <keycloak.connectionsJpa.password>${keycloak.connectionsJpa.password}</keycloak.connectionsJpa.password>
678

679
                            <!-- FIPS 140-2 -->
680
                            <auth.server.fips.mode>${auth.server.fips.mode}</auth.server.fips.mode>
681
                            <auth.server.fips.keystore.type>${auth.server.fips.keystore.type}</auth.server.fips.keystore.type>
682
                            <auth.server.supported.keystore.types>${auth.server.supported.keystore.types}</auth.server.supported.keystore.types>
683
                            <auth.server.supported.rsa.key.sizes>${auth.server.supported.rsa.key.sizes}</auth.server.supported.rsa.key.sizes>
684
                            <auth.server.kerberos.supported>${auth.server.kerberos.supported}</auth.server.kerberos.supported>
685

686
                            <!--
687
                              ~ Used for Wildfly Elytron 1.13.0.CR3+ RESTEasy client SSL truststore configuration.
688
                              ~ See KEYCLOAK-15692, ELY-1891 issues & PRs of EAP7-1219 issue for details.
689
                              -->
690
                            <wildfly-client.config.path>${project.build.directory}${file.separator}dependency${file.separator}wildfly-config.xml</wildfly-client.config.path>
691
                        </systemPropertyVariables>
692
                        <properties>
693
                            <property>
694
                                <name>listener</name>
695
                                <value>org.keycloak.testsuite.util.TestEventsLogger,org.keycloak.testsuite.util.NonIDERunListener</value>
696
                            </property>
697
                        </properties>
698
                    </configuration>
699
                </plugin>
700
                <plugin>
701
                    <groupId>org.commonjava.maven.plugins</groupId>
702
                    <artifactId>directory-maven-plugin</artifactId>
703
                    <executions>
704
                        <execution>
705
                            <id>keycloak-parent-basedir</id>
706
                            <goals>
707
                                <goal>directory-of</goal>
708
                            </goals>
709
                            <phase>initialize</phase>
710
                            <configuration>
711
                                <property>keycloak-parent.basedir</property>
712
                                <project>
713
                                    <groupId>org.keycloak</groupId>
714
                                    <artifactId>keycloak-parent</artifactId>
715
                                </project>
716
                            </configuration>
717
                        </execution>
718
                    </executions>
719
                </plugin>
720
            </plugins>
721
        </pluginManagement>
722
        <plugins>
723
            <plugin>
724
                <!--
725
                    Required for Filter Adapter tests - this plugin has to be here to prevent
726
                    org.jboss.shrinkwrap.resolver.api.maven.InvalidEnvironmentException
727

728
                    ShrinkWrap Maven Resolver Plugin sets automatically following properties:
729
                        maven.execution.pom-file
730
                        maven.execution.offline
731
                        maven.execution.user-settings
732
                        maven.execution.global-settings
733
                        maven.execution.active-profiles
734
                -->
735
                <groupId>org.jboss.shrinkwrap.resolver</groupId>
736
                <artifactId>shrinkwrap-resolver-maven-plugin</artifactId>
737
                <version>${shrinkwrap-resolver.version}</version>
738
                <executions>
739
                    <execution>
740
                        <goals>
741
                            <goal>propagate-execution-context</goal>
742
                        </goals>
743
                    </execution>
744
                </executions>
745
            </plugin>
746
        </plugins>
747
    </build>
748

749
    <profiles>
750
        <profile>
751
            <id>auth-server-quarkus</id>
752
            <properties>
753
                <auth.server>quarkus</auth.server>
754
                <auth.server.quarkus>true</auth.server.quarkus>
755
                <auth.server.jboss>false</auth.server.jboss>
756
                <auth.server.undertow>false</auth.server.undertow>
757
                <auth.server.config.dir>${auth.server.home}/conf</auth.server.config.dir>
758
                <auth.server.quarkus.skip.unpack>false</auth.server.quarkus.skip.unpack>
759
                <auth.server.undertow.skip.unpack>true</auth.server.undertow.skip.unpack>
760
                <auth.server.jboss.skip.unpack>true</auth.server.jboss.skip.unpack>
761
            </properties>
762
        </profile>
763

764
        <profile>
765
            <id>auth-server-quarkus-embedded</id>
766
            <properties>
767
                <auth.server>quarkus</auth.server>
768
                <auth.server.quarkus.embedded>true</auth.server.quarkus.embedded>
769
                <auth.server.jboss>false</auth.server.jboss>
770
                <auth.server.undertow>false</auth.server.undertow>
771
                <auth.server.config.dir>${auth.server.home}/conf</auth.server.config.dir>
772
                <auth.server.quarkus.skip.unpack>false</auth.server.quarkus.skip.unpack>
773
                <auth.server.undertow.skip.unpack>true</auth.server.undertow.skip.unpack>
774
                <auth.server.jboss.skip.unpack>true</auth.server.jboss.skip.unpack>
775
            </properties>
776
        </profile>
777

778
        <profile>
779
            <id>auth-server-cluster-quarkus</id>
780
            <properties>
781
                <!--disable exclusion pattern for cluster test which is enabled by default in base/pom.xml-->
782
                <exclude.cluster>-</exclude.cluster>
783
                <auth.server.cluster>true</auth.server.cluster>
784
                <auth.server.quarkus.cluster>true</auth.server.quarkus.cluster>
785
                <auth.server.quarkus.cluster.config>ha</auth.server.quarkus.cluster.config>
786
                <auth.server>quarkus</auth.server>
787
                <auth.server.quarkus>true</auth.server.quarkus>
788
                <auth.server.jboss>false</auth.server.jboss>
789
                <auth.server.undertow>false</auth.server.undertow>
790
                <auth.server.config.dir>${auth.server.home}/conf</auth.server.config.dir>
791
                <auth.server.quarkus.skip.unpack>false</auth.server.quarkus.skip.unpack>
792
                <auth.server.undertow.skip.unpack>true</auth.server.undertow.skip.unpack>
793
                <auth.server.jboss.skip.unpack>true</auth.server.jboss.skip.unpack>
794
                <keycloak.connectionsInfinispan.sessionsOwners>2</keycloak.connectionsInfinispan.sessionsOwners>
795
            </properties>
796
            <build>
797
                <plugins>
798
                    <plugin>
799
                        <artifactId>maven-surefire-plugin</artifactId>
800
                        <configuration>
801
                            <systemPropertyVariables>
802
                                <pageload.timeout>20000</pageload.timeout>
803
                            </systemPropertyVariables>
804
                        </configuration>
805
                    </plugin>
806
                </plugins>
807
            </build>
808
        </profile>
809

810
        <profile>
811
            <id>auth-servers-crossdc-undertow</id>
812
            <properties>
813
                <auth.servers.crossdc>true</auth.servers.crossdc>
814
                <auth.server.undertow.crossdc>true</auth.server.undertow.crossdc>
815
                <node.name>undertow</node.name>
816

817
                <cache.server.crossdc1.jvm.debug.port>6001</cache.server.crossdc1.jvm.debug.port>
818
                <cache.server.crossdc2.jvm.debug.port>6002</cache.server.crossdc2.jvm.debug.port>
819

820

821
                <!-- default is "n", possible to override by e.g. -Dcache.server.crossdc1.debug.suspend=y -->
822
                <cache.server.crossdc1.debug.suspend>${auth.server.debug.suspend}</cache.server.crossdc1.debug.suspend>
823
                <cache.server.crossdc2.debug.suspend>${auth.server.debug.suspend}</cache.server.crossdc2.debug.suspend>
824
            </properties>
825
            <build>
826
                <plugins>
827
                    <plugin>
828
                        <artifactId>maven-enforcer-plugin</artifactId>
829
                        <executions>
830
                            <execution>
831
                                <id>enforce-profile-activation</id>
832
                                <goals>
833
                                    <goal>enforce</goal>
834
                                </goals>
835
                                <configuration>
836
                                    <rules>
837
                                        <requireProperty>
838
                                            <property>cache.server</property>
839
                                            <message>Profile "auth-servers-crossdc-undertow" requires activation of one of the following profiles: "cache-server-infinispan", "cache-server-datagrid", "cache-server-legacy-infinispan", "cache-server-legacy-datagrid".</message>
840
                                        </requireProperty>
841
                                    </rules>
842
                                </configuration>
843
                            </execution>
844
                        </executions>
845
                    </plugin>
846
                    <plugin>
847
                        <artifactId>maven-surefire-plugin</artifactId>
848
                        <configuration>
849
                            <systemPropertyVariables>
850
                                <node.name>${node.name}</node.name>
851
                                <pageload.timeout>20000</pageload.timeout>
852

853
                                <!-- TODO Same props config is duplicated for undertow. Use separate profile? -->
854
                                <cache.server.crossdc1.jvm.debug.args>
855
                                    -agentlib:jdwp=transport=dt_socket,server=y,suspend=${cache.server.crossdc1.debug.suspend},address=localhost:${cache.server.crossdc1.jvm.debug.port}
856
                                </cache.server.crossdc1.jvm.debug.args>
857
                                <cache.server.crossdc2.jvm.debug.args>
858
                                    -agentlib:jdwp=transport=dt_socket,server=y,suspend=${cache.server.crossdc2.debug.suspend},address=localhost:${cache.server.crossdc2.jvm.debug.port}
859
                                </cache.server.crossdc2.jvm.debug.args>
860

861
                                <keycloak.connectionsInfinispan.hotrodProtocolVersion>${keycloak.connectionsInfinispan.hotrodProtocolVersion}</keycloak.connectionsInfinispan.hotrodProtocolVersion>
862

863
                            </systemPropertyVariables>
864
                        </configuration>
865
                    </plugin>
866
                </plugins>
867
            </build>
868
        </profile>
869

870
        <profile>
871
            <id>auth-servers-crossdc-jboss</id>
872
            <properties>
873
                <auth.servers.crossdc>true</auth.servers.crossdc>
874
                <auth.server.jboss.crossdc>true</auth.server.jboss.crossdc>
875
                <node.name>jboss</node.name>
876

877
                <auth.server.crossdc01.home>${containers.home}/auth-server-${auth.server}-crossdc01</auth.server.crossdc01.home>
878
                <auth.server.crossdc02.home>${containers.home}/auth-server-${auth.server}-crossdc02</auth.server.crossdc02.home>
879
                <auth.server.crossdc11.home>${containers.home}/auth-server-${auth.server}-crossdc11</auth.server.crossdc11.home>
880
                <auth.server.crossdc12.home>${containers.home}/auth-server-${auth.server}-crossdc12</auth.server.crossdc12.home>
881

882
                <!-- property specifies keycloak-add-user.json file destination -->
883
                <auth.server.config.dir>${auth.server.crossdc01.home}/standalone/configuration</auth.server.config.dir>
884

885
                <cache.server.crossdc1.jvm.debug.port>6001</cache.server.crossdc1.jvm.debug.port>
886
                <cache.server.crossdc2.jvm.debug.port>6002</cache.server.crossdc2.jvm.debug.port>
887
                <auth.server.crossdc01.jvm.debug.port>5001</auth.server.crossdc01.jvm.debug.port>
888
                <auth.server.crossdc02.jvm.debug.port>5002</auth.server.crossdc02.jvm.debug.port>
889
                <auth.server.crossdc11.jvm.debug.port>5011</auth.server.crossdc11.jvm.debug.port>
890
                <auth.server.crossdc12.jvm.debug.port>5012</auth.server.crossdc12.jvm.debug.port>
891

892
                <!-- default is "n", possible to override by e.g. -Dauth.server.crossdc01.debug.suspend=y -->
893
                <cache.server.crossdc1.debug.suspend>${auth.server.debug.suspend}</cache.server.crossdc1.debug.suspend>
894
                <cache.server.crossdc2.debug.suspend>${auth.server.debug.suspend}</cache.server.crossdc2.debug.suspend>
895
                <auth.server.crossdc01.debug.suspend>${auth.server.debug.suspend}</auth.server.crossdc01.debug.suspend>
896
                <auth.server.crossdc02.debug.suspend>${auth.server.debug.suspend}</auth.server.crossdc02.debug.suspend>
897
                <auth.server.crossdc11.debug.suspend>${auth.server.debug.suspend}</auth.server.crossdc11.debug.suspend>
898
                <auth.server.crossdc12.debug.suspend>${auth.server.debug.suspend}</auth.server.crossdc12.debug.suspend>
899
            </properties>
900
            <build>
901
                <pluginManagement>
902
                    <plugins>
903
                        <plugin>
904
                            <artifactId>maven-antrun-plugin</artifactId>
905
                            <executions>
906
                                <execution>
907
                                    <id>copy-auth-server-crossdc-nodes</id>
908
                                    <phase>process-resources</phase>
909
                                    <goals>
910
                                        <goal>run</goal>
911
                                    </goals>
912
                                    <configuration>
913
                                        <skip>${skip.copy.auth.crossdc.nodes}</skip>
914
                                        <target>
915
                                            <move todir="${auth.server.crossdc01.home}">
916
                                                <fileset dir="${auth.server.home}"/>
917
                                            </move>
918
                                            <copy todir="${auth.server.crossdc02.home}">
919
                                                <fileset dir="${auth.server.crossdc01.home}"/>
920
                                            </copy>
921
                                            <copy todir="${auth.server.crossdc11.home}">
922
                                                <fileset dir="${auth.server.crossdc01.home}"/>
923
                                            </copy>
924
                                            <copy todir="${auth.server.crossdc12.home}">
925
                                                <fileset dir="${auth.server.crossdc01.home}"/>
926
                                            </copy>
927
                                        </target>
928
                                    </configuration>
929
                                </execution>
930
                            </executions>
931
                        </plugin>
932
                    </plugins>
933
                </pluginManagement>
934
                <plugins>
935
                    <plugin>
936
                        <artifactId>maven-enforcer-plugin</artifactId>
937
                        <executions>
938
                            <execution>
939
                                <id>enforce-profiles-activation</id>
940
                                <goals>
941
                                    <goal>enforce</goal>
942
                                </goals>
943
                                <configuration>
944
                                    <rules>
945
                                        <requireProperty>
946
                                            <property>cache.server</property>
947
                                            <message>Profile "auth-servers-crossdc-jboss" requires activation of one of the following profiles: "cache-server-infinispan", "cache-server-datagrid", "cache-server-legacy-infinispan", "cache-server-legacy-datagrid".</message>
948
                                        </requireProperty>
949
                                        <requireProperty>
950
                                            <property>auth.server.jboss</property>
951
                                            <message>Profile "auth-servers-crossdc-jboss" requires activation of another profile: either "auth-server-wildfly" or "auth-server-eap".</message>
952
                                            <regex>true</regex>
953
                                        </requireProperty>
954
                                    </rules>
955
                                </configuration>
956
                            </execution>
957
                        </executions>
958
                    </plugin>
959
                    <plugin>
960
                        <artifactId>maven-surefire-plugin</artifactId>
961
                        <configuration>
962
                            <systemPropertyVariables>
963

964
                                <pageload.timeout>20000</pageload.timeout>
965

966
                                <run.h2>true</run.h2>
967
                                <node.name>${node.name}</node.name>
968

969
                                <auth.server.crossdc01.home>${auth.server.crossdc01.home}</auth.server.crossdc01.home>
970
                                <auth.server.crossdc02.home>${auth.server.crossdc02.home}</auth.server.crossdc02.home>
971
                                <auth.server.crossdc11.home>${auth.server.crossdc11.home}</auth.server.crossdc11.home>
972
                                <auth.server.crossdc12.home>${auth.server.crossdc12.home}</auth.server.crossdc12.home>
973

974
                                <keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>${keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled}</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
975
                                <keycloak.connectionsInfinispan.hotrodProtocolVersion>${keycloak.connectionsInfinispan.hotrodProtocolVersion}</keycloak.connectionsInfinispan.hotrodProtocolVersion>
976

977
                                <!--8101-->
978
                                <auth.server.crossdc01.port.offset>21</auth.server.crossdc01.port.offset>
979
                                <!--8102-->
980
                                <auth.server.crossdc02.port.offset>22</auth.server.crossdc02.port.offset>
981
                                <!--8111-->
982
                                <auth.server.crossdc11.port.offset>31</auth.server.crossdc11.port.offset>
983
                                <!--8112-->
984
                                <auth.server.crossdc12.port.offset>32</auth.server.crossdc12.port.offset>
985

986
                                <auth.server.crossdc01.management.port>10011</auth.server.crossdc01.management.port>
987
                                <auth.server.crossdc02.management.port>10012</auth.server.crossdc02.management.port>
988
                                <auth.server.crossdc11.management.port>10021</auth.server.crossdc11.management.port>
989
                                <auth.server.crossdc12.management.port>10022</auth.server.crossdc12.management.port>
990

991
                                <!-- TODO Same props config is duplicated for undertow. Use separate profile? -->
992
                                <cache.server.crossdc1.jvm.debug.args>
993
                                    -agentlib:jdwp=transport=dt_socket,server=y,suspend=${cache.server.crossdc1.debug.suspend},address=localhost:${cache.server.crossdc1.jvm.debug.port}
994
                                </cache.server.crossdc1.jvm.debug.args>
995
                                <cache.server.crossdc2.jvm.debug.args>
996
                                    -agentlib:jdwp=transport=dt_socket,server=y,suspend=${cache.server.crossdc2.debug.suspend},address=localhost:${cache.server.crossdc2.jvm.debug.port}
997
                                </cache.server.crossdc2.jvm.debug.args>
998

999
                                <auth.server.crossdc01.jvm.debug.args>
1000
                                    -agentlib:jdwp=transport=dt_socket,server=y,suspend=${auth.server.crossdc01.debug.suspend},address=localhost:${auth.server.crossdc01.jvm.debug.port}
1001
                                </auth.server.crossdc01.jvm.debug.args>
1002
                                <auth.server.crossdc02.jvm.debug.args>
1003
                                    -agentlib:jdwp=transport=dt_socket,server=y,suspend=${auth.server.crossdc02.debug.suspend},address=localhost:${auth.server.crossdc02.jvm.debug.port}
1004
                                </auth.server.crossdc02.jvm.debug.args>
1005
                                <auth.server.crossdc11.jvm.debug.args>
1006
                                    -agentlib:jdwp=transport=dt_socket,server=y,suspend=${auth.server.crossdc11.debug.suspend},address=localhost:${auth.server.crossdc11.jvm.debug.port}
1007
                                </auth.server.crossdc11.jvm.debug.args>
1008
                                <auth.server.crossdc12.jvm.debug.args>
1009
                                    -agentlib:jdwp=transport=dt_socket,server=y,suspend=${auth.server.crossdc12.debug.suspend},address=localhost:${auth.server.crossdc12.jvm.debug.port}
1010
                                </auth.server.crossdc12.jvm.debug.args>
1011

1012
                            </systemPropertyVariables>
1013
                        </configuration>
1014
                    </plugin>
1015
                </plugins>
1016
            </build>
1017
        </profile>
1018

1019
        <profile>
1020
            <id>cache-server-legacy-infinispan</id>
1021
            <properties>
1022
                <cache.server>legacy-infinispan</cache.server>
1023
                <cache.server.legacy>true</cache.server.legacy>
1024
                <auth.server.crossdc>true</auth.server.crossdc>
1025
                <cache.server.config.dir>${cache.server.home}/standalone/configuration</cache.server.config.dir>
1026
                <keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n</keycloak.testsuite.logging.pattern>
1027
                <keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>false</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
1028
                <keycloak.connectionsInfinispan.hotrodProtocolVersion>PROTOCOL_VERSION_30</keycloak.connectionsInfinispan.hotrodProtocolVersion>
1029
            </properties>
1030
            <dependencies>
1031
                <dependency>
1032
                    <groupId>org.wildfly.arquillian</groupId>
1033
                    <artifactId>wildfly-arquillian-container-managed</artifactId>
1034
                </dependency>
1035
            </dependencies>
1036

1037
            <build>
1038
                <plugins>
1039
                    <plugin>
1040
                        <artifactId>maven-enforcer-plugin</artifactId>
1041
                        <executions>
1042
                            <execution>
1043
                                <id>enforce-profile-activation</id>
1044
                                <goals>
1045
                                    <goal>enforce</goal>
1046
                                </goals>
1047
                                <configuration>
1048
                                    <rules>
1049
                                        <requireProperty>
1050
                                            <property>auth.servers.crossdc</property>
1051
                                            <message>Profile "cache-server-legacy-infinispan" requires activation of another profile: either "auth-servers-crossdc-undertow" or "auth-servers-crossdc-jboss".</message>
1052
                                        </requireProperty>
1053
                                    </rules>
1054
                                </configuration>
1055
                            </execution>
1056
                        </executions>
1057
                    </plugin>
1058
                </plugins>
1059
                <pluginManagement>
1060
                    <plugins>
1061
                        <plugin>
1062
                            <artifactId>maven-dependency-plugin</artifactId>
1063
                            <executions>
1064
                                <execution>
1065
                                    <id>unpack-cache-server-infinispan</id>
1066
                                    <phase>generate-resources</phase>
1067
                                    <goals>
1068
                                        <goal>unpack</goal>
1069
                                    </goals>
1070
                                    <configuration>
1071
                                        <artifactItems>
1072
                                            <artifactItem>
1073
                                                <groupId>org.keycloak.testsuite</groupId>
1074
                                                <artifactId>integration-arquillian-servers-cache-server-legacy-infinispan</artifactId>
1075
                                                <version>${project.version}</version>
1076
                                                <type>zip</type>
1077
                                                <outputDirectory>${containers.home}</outputDirectory>
1078
                                            </artifactItem>
1079
                                        </artifactItems>
1080
                                        <overWriteIfNewer>true</overWriteIfNewer>
1081
                                    </configuration>
1082
                                </execution>
1083
                            </executions>
1084
                        </plugin>
1085
                    </plugins>
1086
                </pluginManagement>
1087
            </build>
1088
        </profile>
1089

1090
        <profile>
1091
            <id>cache-server-legacy-datagrid</id>
1092
            <properties>
1093
                <cache.server>legacy-datagrid</cache.server>
1094
                <auth.server.crossdc>true</auth.server.crossdc>
1095
                <cache.server.legacy>true</cache.server.legacy>
1096
                <cache.server.config.dir>${cache.server.home}/standalone/configuration</cache.server.config.dir>
1097
                <keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n</keycloak.testsuite.logging.pattern>
1098
                <keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>false</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
1099
                <keycloak.connectionsInfinispan.hotrodProtocolVersion>PROTOCOL_VERSION_30</keycloak.connectionsInfinispan.hotrodProtocolVersion>
1100
            </properties>
1101
            <dependencies>
1102
                <dependency>
1103
                    <groupId>org.wildfly.arquillian</groupId>
1104
                    <artifactId>wildfly-arquillian-container-managed</artifactId>
1105
                </dependency>
1106
            </dependencies>
1107

1108
            <build>
1109
                <plugins>
1110
                    <plugin>
1111
                        <artifactId>maven-enforcer-plugin</artifactId>
1112
                        <executions>
1113
                            <execution>
1114
                                <id>enforce-profile-activation</id>
1115
                                <goals>
1116
                                    <goal>enforce</goal>
1117
                                </goals>
1118
                                <configuration>
1119
                                    <rules>
1120
                                        <requireProperty>
1121
                                            <property>auth.servers.crossdc</property>
1122
                                            <message>Profile "cache-server-legacy-datagrid" requires activation of another profile: either "auth-servers-crossdc-undertow" or "auth-servers-crossdc-jboss".</message>
1123
                                        </requireProperty>
1124
                                    </rules>
1125
                                </configuration>
1126
                            </execution>
1127
                        </executions>
1128
                    </plugin>
1129
                </plugins>
1130
                <pluginManagement>
1131
                    <plugins>
1132
                        <plugin>
1133
                            <artifactId>maven-dependency-plugin</artifactId>
1134
                            <executions>
1135
                                <execution>
1136
                                    <id>unpack-cache-server-jdg</id>
1137
                                    <phase>generate-resources</phase>
1138
                                    <goals>
1139
                                        <goal>unpack</goal>
1140
                                    </goals>
1141
                                    <configuration>
1142
                                        <artifactItems>
1143
                                            <artifactItem>
1144
                                                <groupId>org.keycloak.testsuite</groupId>
1145
                                                <artifactId>integration-arquillian-servers-cache-server-legacy-datagrid</artifactId>
1146
                                                <version>${project.version}</version>
1147
                                                <type>zip</type>
1148
                                                <outputDirectory>${containers.home}</outputDirectory>
1149
                                            </artifactItem>
1150
                                        </artifactItems>
1151
                                        <overWriteIfNewer>true</overWriteIfNewer>
1152
                                    </configuration>
1153
                                </execution>
1154
                            </executions>
1155
                        </plugin>
1156
                    </plugins>
1157
                </pluginManagement>
1158
            </build>
1159
        </profile>
1160

1161

1162

1163
        <profile>
1164
            <id>cache-server-infinispan</id>
1165
            <properties>
1166
                <cache.server>infinispan</cache.server>
1167
                <auth.server.crossdc>true</auth.server.crossdc>
1168
                <keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n</keycloak.testsuite.logging.pattern>
1169
                <keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>false</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
1170
                <keycloak.connectionsInfinispan.hotrodProtocolVersion>PROTOCOL_VERSION_30</keycloak.connectionsInfinispan.hotrodProtocolVersion>
1171
                <skip.clean.second.cache>true</skip.clean.second.cache>
1172
            </properties>
1173
            <build>
1174
                <plugins>
1175
                    <plugin>
1176
                        <artifactId>maven-enforcer-plugin</artifactId>
1177
                        <executions>
1178
                            <execution>
1179
                                <id>enforce-profile-activation</id>
1180
                                <goals>
1181
                                    <goal>enforce</goal>
1182
                                </goals>
1183
                                <configuration>
1184
                                    <rules>
1185
                                        <requireProperty>
1186
                                            <property>auth.servers.crossdc</property>
1187
                                            <message>Profile "cache-server-infinispan" requires activation of another profile: either "auth-servers-crossdc-undertow" or "auth-servers-crossdc-jboss".</message>
1188
                                        </requireProperty>
1189
                                    </rules>
1190
                                </configuration>
1191
                            </execution>
1192
                        </executions>
1193
                    </plugin>
1194
                </plugins>
1195
                <pluginManagement>
1196
                    <plugins>
1197
                        <plugin>
1198
                            <artifactId>maven-dependency-plugin</artifactId>
1199
                            <executions>
1200
                                <execution>
1201
                                    <id>unpack-cache-server-standalone-infinispan</id>
1202
                                    <phase>generate-resources</phase>
1203
                                    <goals>
1204
                                        <goal>unpack</goal>
1205
                                    </goals>
1206
                                    <configuration>
1207
                                        <artifactItems>
1208
                                            <artifactItem>
1209
                                                <groupId>org.keycloak.testsuite</groupId>
1210
                                                <artifactId>integration-arquillian-servers-cache-server-infinispan-infinispan</artifactId>
1211
                                                <version>${project.version}</version>
1212
                                                <type>zip</type>
1213
                                                <outputDirectory>${containers.home}</outputDirectory>
1214
                                            </artifactItem>
1215
                                        </artifactItems>
1216
                                        <overWriteIfNewer>true</overWriteIfNewer>
1217
                                    </configuration>
1218
                                </execution>
1219
                            </executions>
1220
                        </plugin>
1221
                        <plugin>
1222
                            <artifactId>maven-antrun-plugin</artifactId>
1223
                            <executions>
1224
                                <execution>
1225
                                    <id>copy-cache-server-standalone-infinispan-nodes</id>
1226
                                    <phase>process-resources</phase>
1227
                                    <goals>
1228
                                        <goal>run</goal>
1229
                                    </goals>
1230
                                    <configuration>
1231
                                        <skip>${skip.copy.cache.crossdc.nodes}</skip>
1232
                                        <target>
1233
                                            <move todir="${cache.server.home}-dc1">
1234
                                                <fileset dir="${cache.server.home}"/>
1235
                                            </move>
1236
                                            <copy todir="${cache.server.home}-dc2">
1237
                                                <fileset dir="${cache.server.home}-dc1"/>
1238
                                            </copy>
1239
                                            
1240
                                            <chmod dir="${cache.server.home}-dc1/bin" perm="ugo+rx" includes="**/*.sh"/>
1241
                                            <chmod dir="${cache.server.home}-dc2/bin" perm="ugo+rx" includes="**/*.sh"/>
1242
                                            
1243
                                            <move file="${cache.server.home}-dc1/server/conf/infinispan-xsite-1.xml" 
1244
                                                  tofile="${cache.server.home}-dc1/server/conf/infinispan-xsite.xml" />
1245
                                            <delete file="${cache.server.home}-dc1/server/conf/infinispan-xsite-2.xml"/>
1246
                                            
1247
                                            <move file="${cache.server.home}-dc2/server/conf/infinispan-xsite-2.xml" 
1248
                                                  tofile="${cache.server.home}-dc2/server/conf/infinispan-xsite.xml" />
1249
                                            <delete file="${cache.server.home}-dc1/server/conf/infinispan-xsite-1.xml"/>
1250
                                        </target>
1251
                                    </configuration>
1252
                                </execution>
1253
                            </executions>
1254
                        </plugin>
1255
                    </plugins>
1256
                </pluginManagement>
1257
            </build>
1258
        </profile>
1259

1260
        <profile>
1261
            <id>cache-server-datagrid</id>
1262
            <properties>
1263
                <cache.server>datagrid</cache.server>
1264
                <auth.server.crossdc>true</auth.server.crossdc>
1265
                <keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n</keycloak.testsuite.logging.pattern>
1266
                <keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>false</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
1267
                <keycloak.connectionsInfinispan.hotrodProtocolVersion>PROTOCOL_VERSION_30</keycloak.connectionsInfinispan.hotrodProtocolVersion>
1268
                <skip.clean.second.cache>true</skip.clean.second.cache>
1269
            </properties>
1270
            <build>
1271
                <plugins>
1272
                    <plugin>
1273
                        <artifactId>maven-enforcer-plugin</artifactId>
1274
                        <executions>
1275
                            <execution>
1276
                                <id>enforce-profile-activation</id>
1277
                                <goals>
1278
                                    <goal>enforce</goal>
1279
                                </goals>
1280
                                <configuration>
1281
                                    <rules>
1282
                                        <requireProperty>
1283
                                            <property>auth.servers.crossdc</property>
1284
                                            <message>Profile "cache-server-datagrid" requires activation of another profile: either "auth-servers-crossdc-undertow" or "auth-servers-crossdc-jboss".</message>
1285
                                        </requireProperty>
1286
                                    </rules>
1287
                                </configuration>
1288
                            </execution>
1289
                        </executions>
1290
                    </plugin>
1291
                </plugins>
1292
                <pluginManagement>
1293
                    <plugins>
1294
                        <plugin>
1295
                            <artifactId>maven-dependency-plugin</artifactId>
1296
                            <executions>
1297
                                <execution>
1298
                                    <id>unpack-cache-server-standalone-jdg</id>
1299
                                    <phase>generate-resources</phase>
1300
                                    <goals>
1301
                                        <goal>unpack</goal>
1302
                                    </goals>
1303
                                    <configuration>
1304
                                        <artifactItems>
1305
                                            <artifactItem>
1306
                                                <groupId>org.keycloak.testsuite</groupId>
1307
                                                <artifactId>integration-arquillian-servers-cache-server-infinispan-datagrid</artifactId>
1308
                                                <version>${project.version}</version>
1309
                                                <type>zip</type>
1310
                                                <outputDirectory>${containers.home}</outputDirectory>
1311
                                            </artifactItem>
1312
                                        </artifactItems>
1313
                                        <overWriteIfNewer>true</overWriteIfNewer>
1314
                                    </configuration>
1315
                                </execution>
1316
                            </executions>
1317
                        </plugin>
1318
                        <plugin>
1319
                            <artifactId>maven-antrun-plugin</artifactId>
1320
                            <executions>
1321
                                <execution>
1322
                                    <id>copy-cache-server-standalone-infinispan-nodes</id>
1323
                                    <phase>process-resources</phase>
1324
                                    <goals>
1325
                                        <goal>run</goal>
1326
                                    </goals>
1327
                                    <configuration>
1328
                                        <skip>${skip.copy.cache.crossdc.nodes}</skip>
1329
                                        <target>
1330
                                            <move todir="${cache.server.home}-dc1">
1331
                                                <fileset dir="${cache.server.home}"/>
1332
                                            </move>
1333
                                            <copy todir="${cache.server.home}-dc2">
1334
                                                <fileset dir="${cache.server.home}-dc1"/>
1335
                                            </copy>
1336
                                            
1337
                                            <chmod dir="${cache.server.home}-dc1/bin" perm="ugo+rx" includes="**/*.sh"/>
1338
                                            <chmod dir="${cache.server.home}-dc2/bin" perm="ugo+rx" includes="**/*.sh"/>
1339
                                            
1340
                                            <move file="${cache.server.home}-dc1/server/conf/infinispan-xsite-1.xml" 
1341
                                                  tofile="${cache.server.home}-dc1/server/conf/infinispan-xsite.xml" />
1342
                                            <delete file="${cache.server.home}-dc1/server/conf/infinispan-xsite-2.xml"/>
1343
                                            
1344
                                            <move file="${cache.server.home}-dc2/server/conf/infinispan-xsite-2.xml" 
1345
                                                  tofile="${cache.server.home}-dc2/server/conf/infinispan-xsite.xml" />
1346
                                            <delete file="${cache.server.home}-dc1/server/conf/infinispan-xsite-1.xml"/>
1347
                                        </target>
1348
                                    </configuration>
1349
                                </execution>
1350
                            </executions>
1351
                        </plugin>
1352
                    </plugins>
1353
                </pluginManagement>
1354
            </build>
1355
        </profile>
1356

1357
        <profile>
1358
            <id>auth-server-profile</id>
1359
            <activation>
1360
                <property>
1361
                    <name>keycloak.profile</name>
1362
                </property>
1363
            </activation>
1364
            <properties>
1365
                <auth.server.profile>-Dkeycloak.profile=${keycloak.profile}</auth.server.profile>
1366
            </properties>
1367
        </profile>
1368

1369
        <!--
1370
            profile that enables/disables specified feature, for more details see
1371
            https://keycloak.gitbooks.io/documentation/content/server_installation/topics/profiles.html
1372
        -->
1373
        <profile>
1374
            <id>auth-server-enable-disable-feature</id>
1375
            <properties>
1376
                <auth.server.feature>-Dkeycloak.profile.feature.${feature.name}=${feature.value}</auth.server.feature>
1377
            </properties>
1378
            <build>
1379
                <plugins>
1380
                    <plugin>
1381
                        <artifactId>maven-enforcer-plugin</artifactId>
1382
                        <executions>
1383
                            <execution>
1384
                                <goals>
1385
                                    <goal>enforce</goal>
1386
                                </goals>
1387
                                <configuration>
1388
                                    <rules>
1389
                                        <requireProperty>
1390
                                            <property>feature.name</property>
1391
                                        </requireProperty>
1392
                                        <requireProperty>
1393
                                            <property>feature.value</property>
1394
                                        </requireProperty>
1395
                                    </rules>
1396
                                </configuration>
1397
                            </execution>
1398
                        </executions>
1399
                    </plugin>
1400
                </plugins>
1401
            </build>
1402
        </profile>
1403

1404
        <profile>
1405
            <id>auth-server-cluster-undertow</id>
1406
            <properties>
1407
                <!--disable exclusion pattern for cluster test which is enabled by default in base/pom.xml-->
1408
                <exclude.cluster>-</exclude.cluster>
1409

1410
                <auth.server.undertow>false</auth.server.undertow>
1411
                <auth.server.cluster>true</auth.server.cluster>
1412
                <auth.server.undertow.cluster>true</auth.server.undertow.cluster>
1413

1414
                <auth.server.jboss.skip.unpack>true</auth.server.jboss.skip.unpack>
1415

1416
                <keycloak.connectionsInfinispan.sessionsOwners>2</keycloak.connectionsInfinispan.sessionsOwners>
1417
            </properties>
1418
            <build>
1419
                <plugins>
1420
                    <plugin>
1421
                        <artifactId>maven-surefire-plugin</artifactId>
1422
                        <configuration>
1423
                            <systemPropertyVariables>
1424
                                <pageload.timeout>20000</pageload.timeout>
1425
                            </systemPropertyVariables>
1426
                        </configuration>
1427
                    </plugin>
1428
                </plugins>
1429
            </build>
1430
        </profile>
1431

1432
        <profile>
1433
            <id>clean-jpa</id>
1434
            <build>
1435
                <pluginManagement>
1436
                    <plugins>
1437
                        <plugin>
1438
                            <groupId>org.liquibase</groupId>
1439
                            <artifactId>liquibase-maven-plugin</artifactId>
1440
                            <configuration>
1441
                                <changeLogFile>META-INF/jpa-changelog-master.xml</changeLogFile>
1442

1443
                                <url>${keycloak.connectionsJpa.url}</url>
1444
                                <driver>${keycloak.connectionsJpa.driver}</driver>
1445
                                <username>${keycloak.connectionsJpa.user}</username>
1446
                                <password>${keycloak.connectionsJpa.password}</password>
1447

1448
                                <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
1449
                                <databaseClass>${keycloak.connectionsJpa.liquibaseDatabaseClass}</databaseClass>
1450
                            </configuration>
1451
                            <executions>
1452
                                <execution>
1453
                                    <id>clean-jpa</id>
1454
                                    <phase>clean</phase>
1455
                                    <goals>
1456
                                        <goal>dropAll</goal>
1457
                                    </goals>
1458
                                </execution>
1459
                            </executions>
1460
                        </plugin>
1461
                    </plugins>
1462
                </pluginManagement>
1463
            </build>
1464
        </profile>
1465

1466
        <!-- Profiles for migration tests-->
1467
        <profile>
1468
            <id>auth-server-migration</id>
1469
            <properties>
1470
                <migration.import.file>target/test-classes/migration-test/migration-realm-${migrated.auth.server.version}.json</migration.import.file>
1471
                <migration.import.props.previous>
1472
                    -Dkeycloak.migration.action=import
1473
                    -Dkeycloak.migration.provider=singleFile
1474
                    -Dkeycloak.migration.file=${migration.import.file}
1475
                    -Dkeycloak.migration.strategy=OVERWRITE_EXISTING
1476
                </migration.import.props.previous>
1477
                <skip.add.user.json>true</skip.add.user.json>
1478
            </properties>
1479
            <build>
1480
                <plugins>
1481
                    <plugin>
1482
                        <artifactId>maven-enforcer-plugin</artifactId>
1483
                        <executions>
1484
                            <execution>
1485
                                <goals>
1486
                                    <goal>enforce</goal>
1487
                                </goals>
1488
                                <configuration>
1489
                                    <rules>
1490
                                        <requireProperty>
1491
                                            <property>migrated.auth.server.version</property>
1492
                                        </requireProperty>
1493
                                        <requireProperty>
1494
                                            <property>migration.mode</property>
1495
                                        </requireProperty>
1496
                                    </rules>
1497
                                </configuration>
1498
                            </execution>
1499
                        </executions>
1500
                    </plugin>
1501
                </plugins>
1502
                <pluginManagement>
1503
                    <plugins>
1504
                        <plugin>
1505
                            <artifactId>maven-dependency-plugin</artifactId>
1506
                            <executions>
1507
                                <execution>
1508
                                    <id>unpack-migrated-auth-server</id>
1509
                                    <phase>generate-resources</phase>
1510
                                    <goals>
1511
                                        <goal>unpack</goal>
1512
                                    </goals>
1513
                                    <configuration>
1514
                                        <artifactItems>
1515
                                            <artifactItem>
1516
                                                <groupId>org.keycloak.testsuite</groupId>
1517
                                                <artifactId>integration-arquillian-migration-server</artifactId>
1518
                                                <version>${project.version}</version>
1519
                                                <type>zip</type>
1520
                                            </artifactItem>
1521
                                        </artifactItems>
1522
                                        <outputDirectory>${containers.home}</outputDirectory>
1523
                                        <overWriteIfNewer>true</overWriteIfNewer>
1524
                                    </configuration>
1525
                                </execution>
1526
                            </executions>
1527
                        </plugin>
1528
                        <plugin>
1529
                            <artifactId>maven-surefire-plugin</artifactId>
1530
                            <configuration>
1531
                                <systemPropertyVariables>
1532
                                    <migration.import.file.name>${migration.import.file.name}</migration.import.file.name>
1533
                                    <migrated.auth.server.version>${migrated.auth.server.version}</migrated.auth.server.version>
1534
                                    <auth.server.migration>true</auth.server.migration>
1535
                                    <keycloak.migration.home>${containers.home}/auth-server-migration</keycloak.migration.home>
1536
                                    <migration.import.props.previous>${migration.import.props.previous}</migration.import.props.previous>
1537
                                </systemPropertyVariables>
1538
                            </configuration>
1539
                        </plugin>
1540
                    </plugins>
1541
                </pluginManagement>
1542
            </build>
1543
        </profile>
1544

1545
        <profile>
1546
            <id>migration-prod</id>
1547
            <activation>
1548
                <property>
1549
                    <name>migration.import.file.name</name>
1550
                </property>
1551
            </activation>
1552
            <properties>
1553
                <migration.import.file>target/test-classes/migration-test/${migration.import.file.name}</migration.import.file>
1554
            </properties>
1555
        </profile>
1556

1557
        <profile>
1558
            <id>auth-server-fips140-2</id>
1559
            <properties>
1560
                <auth.server.fips.mode>non-strict</auth.server.fips.mode>
1561

1562
                <auth.server.supported.keystore.types>PKCS12,BCFKS</auth.server.supported.keystore.types>
1563
                <auth.server.kerberos.supported>false</auth.server.kerberos.supported>
1564

1565
                <auth.server.keystore.type>pkcs12</auth.server.keystore.type>
1566
                <auth.server.keystore>${auth.server.config.dir}/keycloak-fips.keystore.${auth.server.keystore.type}</auth.server.keystore>
1567
                <auth.server.keystore.password>passwordpassword</auth.server.keystore.password>
1568

1569
                <auth.server.truststore.type>${auth.server.keystore.type}</auth.server.truststore.type>
1570
                <auth.server.truststore>${auth.server.config.dir}/keycloak-fips.truststore.${auth.server.truststore.type}</auth.server.truststore>
1571
                <auth.server.truststore.password>passwordpassword</auth.server.truststore.password>
1572

1573
                <auth.server.java.security.file>${auth.server.config.dir}/kc.java.security</auth.server.java.security.file>
1574
            </properties>
1575
        </profile>
1576

1577
        <profile>
1578
            <id>common-test-dependencies</id>
1579
            <activation>
1580
                <file>
1581
                    <exists>src/test</exists>
1582
                    <!--    ^ only activate this profile in submodules that have actual tests -->
1583
                </file>
1584
            </activation>
1585
            <dependencies>
1586
                <!-- TEST DEPENDENCIES -->
1587
                <dependency>
1588
                    <groupId>junit</groupId>
1589
                    <artifactId>junit</artifactId>
1590
                </dependency>
1591

1592
                <!--Dependencies for creaper:-->
1593

1594
                <dependency>
1595
                    <groupId>org.wildfly.extras.creaper</groupId>
1596
                    <artifactId>creaper-commands</artifactId>
1597
                    <version>${version.org.wildfly.extras.creaper}</version>
1598
                    <exclusions>
1599
                        <exclusion>
1600
                            <groupId>com.google.guava</groupId>
1601
                            <artifactId>guava</artifactId>
1602
                        </exclusion>
1603
                    </exclusions>
1604
                </dependency>
1605

1606
                <dependency>
1607
                    <groupId>net.bytebuddy</groupId>
1608
                    <artifactId>byte-buddy</artifactId>
1609
                    <version>1.12.18</version>
1610
                </dependency>
1611

1612
                <dependency>
1613
                    <groupId>org.jboss.arquillian.junit</groupId>
1614
                    <artifactId>arquillian-junit-container</artifactId>
1615
                </dependency>
1616

1617
                <dependency>
1618
                    <groupId>org.jboss.arquillian.graphene</groupId>
1619
                    <artifactId>graphene-webdriver</artifactId>
1620
                    <version>${arquillian-graphene.version}</version>
1621
                    <type>pom</type>
1622
                </dependency>
1623
                <dependency>
1624
                    <groupId>org.jboss.arquillian.protocol</groupId>
1625
                    <artifactId>arquillian-protocol-servlet</artifactId>
1626
                </dependency>
1627
                <dependency>
1628
                    <groupId>org.jboss.arquillian.extension</groupId>
1629
                    <artifactId>arquillian-phantom-driver</artifactId>
1630
                    <version>1.2.1.Final</version>
1631
                </dependency>
1632
                <dependency>
1633
                    <groupId>org.jboss.arquillian.graphene</groupId>
1634
                    <artifactId>arquillian-browser-screenshooter</artifactId>
1635
                    <version>${arquillian-graphene.version}</version>
1636
                    <exclusions>
1637
                        <exclusion>
1638
                            <groupId>org.apache.commons</groupId>
1639
                            <artifactId>commons-io</artifactId>
1640
                        </exclusion>
1641
                        <exclusion>
1642
                            <groupId>com.google.guava</groupId>
1643
                            <artifactId>guava</artifactId>
1644
                        </exclusion>
1645
                    </exclusions>
1646
                </dependency>
1647

1648
                <dependency>
1649
                    <groupId>io.appium</groupId>
1650
                    <artifactId>java-client</artifactId>
1651
                    <version>${appium.client.version}</version>
1652
                </dependency>
1653

1654
                <!--
1655
                    httpclient and httpcore are here to ensure we use the same version
1656
                    as in keycloak/pom.xml and to prevent the other versions beeing present
1657
                    on classpath during tests (as a transitive dependencies e.g.).
1658
                    There has beeen issues due to this.
1659
                -->
1660
                <dependency>
1661
                    <groupId>org.apache.httpcomponents</groupId>
1662
                    <artifactId>httpclient</artifactId>
1663
                </dependency>
1664
                <dependency>
1665
                    <groupId>org.apache.httpcomponents</groupId>
1666
                    <artifactId>httpcore</artifactId>
1667
                </dependency>
1668

1669
                <dependency>
1670
                    <groupId>jfree</groupId>
1671
                    <artifactId>jfreechart</artifactId>
1672
                    <version>1.0.13</version>
1673
                </dependency>
1674

1675
                <dependency>
1676
                    <groupId>org.keycloak.testsuite</groupId>
1677
                    <artifactId>integration-arquillian-util</artifactId>
1678
                    <version>${project.version}</version>
1679
                </dependency>
1680

1681
                <!--                <dependency>
1682
                    <groupId>org.arquillian.extension</groupId>
1683
                    <artifactId>arquillian-recorder-reporter-impl</artifactId>
1684
                    <version>1.1.0.Final</version>
1685
                </dependency>-->
1686

1687
                <dependency>
1688
                    <groupId>log4j</groupId>
1689
                    <artifactId>log4j</artifactId>
1690
                </dependency>
1691
                <dependency>
1692
                    <groupId>org.slf4j</groupId>
1693
                    <artifactId>slf4j-api</artifactId>
1694
                </dependency>
1695
                <dependency>
1696
                    <groupId>org.slf4j</groupId>
1697
                    <artifactId>slf4j-reload4j</artifactId>
1698
                </dependency>
1699

1700
                <dependency>
1701
                    <groupId>org.apache.ant</groupId>
1702
                    <artifactId>ant</artifactId>
1703
                    <version>1.10.11</version>
1704
                    <type>jar</type>
1705
                </dependency>
1706

1707
                <dependency>
1708
                    <groupId>com.h2database</groupId>
1709
                    <artifactId>h2</artifactId>
1710
                    <version>${h2.version}</version>
1711
                    <scope>compile</scope>
1712
                </dependency>
1713

1714
                <!-- Email Test Server -->
1715
                <dependency>
1716
                    <groupId>com.icegreen</groupId>
1717
                    <artifactId>greenmail</artifactId>
1718
                    <exclusions>
1719
                        <exclusion>
1720
                            <groupId>org.slf4j</groupId>
1721
                            <artifactId>slf4j-api</artifactId>
1722
                        </exclusion>
1723
                    </exclusions>
1724
                </dependency>
1725
                <dependency>
1726
                    <groupId>org.subethamail</groupId>
1727
                    <artifactId>subethasmtp</artifactId>
1728
                    <exclusions>
1729
                        <exclusion>
1730
                            <groupId>org.slf4j</groupId>
1731
                            <artifactId>slf4j-api</artifactId>
1732
                        </exclusion>
1733
                    </exclusions>
1734
                </dependency>
1735

1736
                <!-- Keycloak deps for tests -->
1737

1738
                <dependency>
1739
                    <groupId>org.keycloak</groupId>
1740
                    <artifactId>keycloak-dependencies-server-all</artifactId>
1741
                    <type>pom</type>
1742
                    <exclusions>
1743
                        <exclusion>
1744
                            <groupId>com.google.guava</groupId>
1745
                            <artifactId>guava</artifactId>
1746
                        </exclusion>
1747
                    </exclusions>
1748
                </dependency>
1749

1750
                <dependency>
1751
                    <groupId>org.keycloak</groupId>
1752
                    <artifactId>keycloak-admin-client</artifactId>
1753
                </dependency>
1754
                <dependency>
1755
                    <groupId>org.keycloak</groupId>
1756
                    <artifactId>keycloak-client-registration-api</artifactId>
1757
                </dependency>
1758
                <dependency>
1759
                    <groupId>org.keycloak</groupId>
1760
                    <artifactId>keycloak-services</artifactId>
1761
                </dependency>
1762
                <dependency>
1763
                    <groupId>org.keycloak</groupId>
1764
                    <artifactId>keycloak-authz-client</artifactId>
1765
                </dependency>
1766

1767
                <!--UNDERTOW-->
1768

1769
                <dependency>
1770
                    <groupId>org.keycloak.testsuite</groupId>
1771
                    <artifactId>integration-arquillian-servers-auth-server-undertow</artifactId>
1772
                    <version>${project.version}</version>
1773
                </dependency>
1774

1775
                <dependency>
1776
                    <groupId>org.jboss.resteasy</groupId>
1777
                    <artifactId>resteasy-client</artifactId>
1778
                </dependency>
1779
                <dependency>
1780
                    <groupId>org.jboss.resteasy</groupId>
1781
                    <artifactId>resteasy-undertow</artifactId>
1782
                    <scope>compile</scope>
1783
                </dependency>
1784
                <dependency>
1785
                    <groupId>org.jboss.resteasy</groupId>
1786
                    <artifactId>resteasy-multipart-provider</artifactId>
1787
                </dependency>
1788
                <dependency>
1789
                    <groupId>org.jboss.resteasy</groupId>
1790
                    <artifactId>resteasy-jackson2-provider</artifactId>
1791
                </dependency>
1792
                <dependency>
1793
                    <groupId>com.fasterxml.jackson.core</groupId>
1794
                    <artifactId>jackson-core</artifactId>
1795
                </dependency>
1796
                <dependency>
1797
                    <groupId>com.fasterxml.jackson.core</groupId>
1798
                    <artifactId>jackson-databind</artifactId>
1799
                </dependency>
1800
                <dependency>
1801
                    <groupId>com.fasterxml.jackson.core</groupId>
1802
                    <artifactId>jackson-annotations</artifactId>
1803
                </dependency>
1804

1805
                <dependency>
1806
                    <groupId>org.bouncycastle</groupId>
1807
                    <artifactId>bcprov-jdk18on</artifactId>
1808
                </dependency>
1809
                <dependency>
1810
                    <groupId>org.bouncycastle</groupId>
1811
                    <artifactId>bcpkix-jdk18on</artifactId>
1812
                </dependency>
1813
                <dependency>
1814
                    <groupId>org.hamcrest</groupId>
1815
                    <artifactId>hamcrest</artifactId>
1816
                    <scope>test</scope>
1817
                </dependency>
1818
                <dependency>
1819
                    <groupId>org.infinispan</groupId>
1820
                    <artifactId>infinispan-core-jakarta</artifactId>
1821
                </dependency>
1822

1823
                <dependency>
1824
                    <groupId>${jdbc.mvn.groupId}</groupId>
1825
                    <artifactId>${jdbc.mvn.artifactId}</artifactId>
1826
                    <version>${jdbc.mvn.version}</version>
1827
                    <scope>compile</scope>
1828
                </dependency>
1829

1830
                <!-- OpenJDK 17 and further versions doesn't provide Nashorn library out of the box. -->
1831
                <dependency>
1832
                    <groupId>org.openjdk.nashorn</groupId>
1833
                    <artifactId>nashorn-core</artifactId>
1834
                    <version>${nashorn.version}</version>
1835
                </dependency>
1836

1837
                <!-- CLI -->
1838
                <!--
1839
                  - This dependency must come after org.bouncycastle dependencies since it contains BC classes,
1840
                  - and MAC signature check on classes would fail otherwise with:
1841
                  - 'java.lang.SecurityException: JCE cannot authenticate the provider BC'
1842
                -->
1843
                <dependency>
1844
                    <groupId>org.keycloak</groupId>
1845
                    <artifactId>keycloak-client-cli-dist</artifactId>
1846
                    <exclusions>
1847
                        <exclusion>
1848
                            <groupId>org.keycloak</groupId>
1849
                            <artifactId>keycloak-crypto-fips1402</artifactId>
1850
                        </exclusion>
1851
                    </exclusions>
1852
                    <type>zip</type>
1853
                </dependency>
1854

1855
                <!-- Fuse adapter dependency -->
1856
                <dependency>
1857
                    <groupId>org.osgi</groupId>
1858
                    <artifactId>org.osgi.enterprise</artifactId>
1859
                    <scope>provided</scope>
1860
                </dependency>
1861

1862
                <!-- Needed for infinispan statistics -->
1863
                <dependency>
1864
                    <groupId>org.eclipse.microprofile.metrics</groupId>
1865
                    <artifactId>microprofile-metrics-api</artifactId>
1866
                </dependency>
1867

1868
            </dependencies>
1869

1870
            <dependencyManagement>
1871
                <dependencies>
1872
                    <!-- we need to specify the correct version because of conflict in arquillian-drone-webdriver-depchain -->
1873
                    <dependency>
1874
                        <groupId>org.seleniumhq.selenium</groupId>
1875
                        <artifactId>htmlunit-driver</artifactId>
1876
                        <version>2.27</version>
1877
                    </dependency>
1878
                </dependencies>
1879
            </dependencyManagement>
1880

1881
            <build>
1882
                <plugins>
1883
                    <plugin>
1884
                        <artifactId>maven-surefire-plugin</artifactId>
1885
                    </plugin>
1886
                    <plugin>
1887
                        <artifactId>maven-dependency-plugin</artifactId>
1888
                    </plugin>
1889
                    <plugin>
1890
                        <artifactId>maven-antrun-plugin</artifactId>
1891
                    </plugin>
1892
                    <plugin>
1893
                        <groupId>org.codehaus.mojo</groupId>
1894
                        <artifactId>xml-maven-plugin</artifactId>
1895
                    </plugin>
1896
                    <plugin>
1897
                        <groupId>org.liquibase</groupId>
1898
                        <artifactId>liquibase-maven-plugin</artifactId>
1899
                    </plugin>
1900
                    <plugin>
1901
                        <groupId>org.codehaus.mojo</groupId>
1902
                        <artifactId>keytool-maven-plugin</artifactId>
1903
                    </plugin>
1904
                </plugins>
1905
            </build>
1906
        </profile>
1907

1908
        <profile>
1909
            <id>no-offset</id>
1910
            <properties>
1911
                <auth.server.port.offset>0</auth.server.port.offset>
1912
                <auth.server.http.port>8080</auth.server.http.port>
1913
                <auth.server.https.port>8443</auth.server.https.port>
1914
                <auth.server.management.port>9990</auth.server.management.port>
1915
                <auth.server.management.port.jmx>9999</auth.server.management.port.jmx>
1916
            </properties>
1917
        </profile>
1918

1919
        <profile>
1920
            <id>java11-auth-server</id>
1921
            <activation>
1922
                <jdk>[11,)</jdk>
1923
            </activation>
1924
            <properties>
1925
                <auth.server.jvm.args.extra>${default.modular.jvm.options}</auth.server.jvm.args.extra>
1926
            </properties>
1927
        </profile>
1928

1929
        <profile>
1930
            <id>java11-app-server</id>
1931
            <activation>
1932
                <jdk>[11,)</jdk>
1933
            </activation>
1934
            <properties>
1935
                <app.server.jvm.args.extra>${default.modular.jvm.options}</app.server.jvm.args.extra>
1936
            </properties>
1937
        </profile>
1938

1939
        <profile>
1940
            <id>java7-app-server</id>
1941
            <properties>
1942
                <app.server.memory.settings>-Xms${app.server.memory.Xms} -Xmx${app.server.memory.Xmx} -XX:PermSize=${surefire.memory.metaspace} -XX:MaxPermSize=${surefire.memory.metaspace.max}</app.server.memory.settings>
1943
            </properties>
1944
        </profile>
1945

1946
        <profile>
1947
            <id>app-server-eap8</id>
1948
            <activation>
1949
                <property>
1950
                    <name>app.server</name>
1951
                    <value>eap8</value>
1952
                </property>
1953
            </activation>
1954
            <dependencies>
1955
                <dependency>
1956
                    <groupId>org.keycloak.testsuite</groupId>
1957
                    <artifactId>integration-arquillian-test-apps-servlets-jakarta</artifactId>
1958
                    <version>${project.version}</version>
1959
                </dependency>
1960
            </dependencies>
1961
        </profile>
1962

1963
        <profile>
1964
            <id>not-app-server-eap8</id>
1965
            <activation>
1966
                <property>
1967
                    <name>app.server</name>
1968
                    <value>!eap8</value>
1969
                </property>
1970
            </activation>
1971
            <dependencies>
1972
                <dependency>
1973
                    <groupId>org.keycloak.testsuite</groupId>
1974
                    <artifactId>integration-arquillian-test-apps-servlets</artifactId>
1975
                    <version>${project.version}</version>
1976
                </dependency>
1977
            </dependencies>
1978
        </profile>
1979

1980
        <profile>
1981
            <id>generate-certs-for-custom-auth-server-host</id>
1982
            <activation>
1983
                <property>
1984
                    <name>auth.server.host</name>
1985
                </property>
1986
            </activation>
1987
            <build>
1988
                <pluginManagement>
1989
                    <plugins>
1990
                        <plugin>
1991
                            <groupId>org.codehaus.mojo</groupId>
1992
                            <artifactId>keytool-maven-plugin</artifactId>
1993
                            <executions>
1994
                                <execution>
1995
                                    <id>remove-old-auth-server-key</id>
1996
                                    <phase>generate-test-resources</phase>
1997
                                    <goals>
1998
                                        <goal>deleteAlias</goal>
1999
                                    </goals>
2000
                                    <configuration>
2001
                                        <keystore>${dependency.keystore}</keystore>
2002
                                        <storepass>${dependency.keystore.password}</storepass>
2003
                                        <alias>localhost</alias>
2004
                                    </configuration>
2005
                                </execution>
2006
                                <execution>
2007
                                    <id>generate-new-auth-server-cert</id>
2008
                                    <phase>generate-test-resources</phase>
2009
                                    <goals>
2010
                                        <goal>generateKeyPair</goal>
2011
                                    </goals>
2012
                                    <configuration>
2013
                                        <keystore>${dependency.keystore}</keystore>
2014
                                        <storepass>${dependency.keystore.password}</storepass>
2015
                                        <alias>${auth.server.host}</alias>
2016
                                        <dname>CN=${auth.server.host}, OU=Keycloak, O=Red Hat, L=Westword, ST=MA, C=US</dname>
2017
                                        <ext>SAN=dns:${auth.server.host},dns:${auth.server.host2}</ext> <!-- for broker tests; IdP is the same server as auth server -->
2018
                                        <keyalg>RSA</keyalg>
2019
                                        <keysize>2048</keysize>
2020
                                        <sigalg>SHA256withRSA</sigalg>
2021
                                    </configuration>
2022
                                </execution>
2023
                                <execution>
2024
                                    <id>export-auth-server-cert</id>
2025
                                    <phase>generate-test-resources</phase>
2026
                                    <goals>
2027
                                        <goal>exportCertificate</goal>
2028
                                    </goals>
2029
                                    <configuration>
2030
                                        <keystore>${dependency.keystore}</keystore>
2031
                                        <storepass>${dependency.keystore.password}</storepass>
2032
                                        <alias>${auth.server.host}</alias>
2033
                                        <file>${dependency.keystore.root}/${auth.server.host}.pem</file>
2034
                                    </configuration>
2035
                                </execution>
2036
                                <execution>
2037
                                    <id>import-auth-server-cert-to-truststore</id>
2038
                                    <phase>generate-test-resources</phase>
2039
                                    <goals>
2040
                                        <goal>importCertificate</goal>
2041
                                    </goals>
2042
                                    <configuration>
2043
                                        <keystore>${dependency.truststore}</keystore>
2044
                                        <storepass>${dependency.truststore.password}</storepass>
2045
                                        <alias>${auth.server.host}</alias>
2046
                                        <file>${dependency.keystore.root}/${auth.server.host}.pem</file>
2047
                                        <trustcacerts>true</trustcacerts>
2048
                                        <noprompt>true</noprompt>
2049
                                    </configuration>
2050
                                </execution>
2051
                            </executions>
2052
                        </plugin>
2053
                        <plugin>
2054
                            <artifactId>maven-resources-plugin</artifactId>
2055
                            <executions>
2056
                                <execution>
2057
                                    <id>copy-processed-truststore-to-auth-server</id>
2058
                                    <phase>process-test-resources</phase>
2059
                                    <goals>
2060
                                        <goal>copy-resources</goal>
2061
                                    </goals>
2062
                                    <configuration>
2063
                                        <outputDirectory>${auth.server.config.dir}</outputDirectory>
2064
                                        <resources>
2065
                                            <resource>
2066
                                                <directory>${dependency.keystore.root}</directory>
2067
                                            </resource>
2068
                                        </resources>
2069
                                        <overwrite>true</overwrite>
2070
                                    </configuration>
2071
                                </execution>
2072
                            </executions>
2073
                        </plugin>
2074
                    </plugins>
2075
                </pluginManagement>
2076
            </build>
2077
        </profile>
2078

2079
        <profile>
2080
            <id>firefox-strict-cookies</id>
2081
            <properties>
2082
                <browser>firefox</browser>
2083
                <js.browser>firefox</js.browser>
2084
                <firefoxUserPreferences>${project.build.directory}/dependency/firefox-cookies-prefs.js</firefoxUserPreferences>
2085
                <firefoxHeadless>true</firefoxHeadless>
2086
                <browser.strict.cookies>true</browser.strict.cookies>
2087
            </properties>
2088
        </profile>
2089

2090
        <profile>
2091
            <id>set-javax.net.ssl-properties-for-tomcat</id>
2092
            <activation>
2093
                <property>
2094
                    <name>app.server.ssl.required</name>
2095
                </property>
2096
            </activation>
2097
            <properties>
2098
                <tomcat.javax.net.ssl.properties>-Djavax.net.ssl.trustStore=${app.server.home}/lib/keycloak.truststore -Djavax.net.ssl.trustStorePassword=secret</tomcat.javax.net.ssl.properties>
2099
            </properties>
2100
        </profile>
2101
        
2102
        <profile>
2103
            <id>cache-auth</id>
2104
            <properties>
2105
                <cache.server.auth>true</cache.server.auth>
2106
            </properties>
2107
        </profile>
2108
        
2109
    </profiles>
2110

2111
</project>
2112

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.