From 3f51f620b78103b47ce9a74822378459f57f10a7 Mon Sep 17 00:00:00 2001 From: Pavel Drozd Date: Thu, 10 Dec 2015 07:21:23 +0100 Subject: [PATCH] Support for testing ssl-required. --- .../servers/eap6/pom.xml | 65 +++++++++++++++- .../eap6/src/main/keystore/keycloak.jks | Bin 0 -> 2233 bytes .../src/main/keystore/keycloak.truststore | Bin 0 -> 1857 bytes .../servers/eap6/src/main/xslt/security.xsl | 34 +++++++++ .../servers/wildfly/pom.xml | 63 +++++++++++++++- .../wildfly/src/main/keystore/keycloak.jks | Bin 0 -> 2233 bytes .../src/main/keystore/keycloak.truststore | Bin 0 -> 1857 bytes .../wildfly/src/main/xslt/security.xsl | 55 ++++++++++++++ .../tests/adapters/eap6/pom.xml | 70 +++++++++++++++++- .../eap6/src/main/keystore/adapter.jks | Bin 0 -> 2232 bytes .../src/main/keystore/keycloak.truststore | Bin 0 -> 1857 bytes .../adapters/eap6/src/main/xslt/security.xsl | 34 +++++++++ .../tests/adapters/pom.xml | 6 +- .../tests/adapters/wildfly/pom.xml | 66 +++++++++++++++++ .../wildfly/src/main/keystore/adapter.jks | Bin 0 -> 2232 bytes .../src/main/keystore/keycloak.truststore | Bin 0 -> 1857 bytes .../wildfly/src/main/xslt/security.xsl | 55 ++++++++++++++ .../arquillian/ContainersTestEnricher.java | 14 +++- .../DeploymentArchiveProcessor.java | 3 + .../arquillian/provider/URLProvider.java | 11 +++ .../adapter/AbstractAdapterTest.java | 3 + .../integration-arquillian/tests/pom.xml | 4 + 22 files changed, 473 insertions(+), 10 deletions(-) create mode 100644 testsuite/integration-arquillian/servers/eap6/src/main/keystore/keycloak.jks create mode 100644 testsuite/integration-arquillian/servers/eap6/src/main/keystore/keycloak.truststore create mode 100644 testsuite/integration-arquillian/servers/eap6/src/main/xslt/security.xsl create mode 100644 testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.jks create mode 100644 testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.truststore create mode 100644 testsuite/integration-arquillian/servers/wildfly/src/main/xslt/security.xsl create mode 100644 testsuite/integration-arquillian/tests/adapters/eap6/src/main/keystore/adapter.jks create mode 100644 testsuite/integration-arquillian/tests/adapters/eap6/src/main/keystore/keycloak.truststore create mode 100644 testsuite/integration-arquillian/tests/adapters/eap6/src/main/xslt/security.xsl create mode 100644 testsuite/integration-arquillian/tests/adapters/wildfly/src/main/keystore/adapter.jks create mode 100644 testsuite/integration-arquillian/tests/adapters/wildfly/src/main/keystore/keycloak.truststore create mode 100644 testsuite/integration-arquillian/tests/adapters/wildfly/src/main/xslt/security.xsl diff --git a/testsuite/integration-arquillian/servers/eap6/pom.xml b/testsuite/integration-arquillian/servers/eap6/pom.xml index 60dc5ab648..6861fe28bc 100644 --- a/testsuite/integration-arquillian/servers/eap6/pom.xml +++ b/testsuite/integration-arquillian/servers/eap6/pom.xml @@ -179,6 +179,67 @@ + + ssl + + + auth.server.ssl.required + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-adapter-subsystem-security + process-resources + + transform + + + + + ${keycloak.server.home}/standalone/configuration + + standalone.xml + + src/main/xslt/security.xsl + ${keycloak.server.home}/standalone/configuration + + + + + + + + maven-resources-plugin + 2.7 + + + copy-keystore + process-resources + + copy-resources + + + ${keycloak.server.home}/standalone/configuration + + + src/main/keystore + + keycloak.jks + keycloak.truststore + + + + + + + + + + - - + \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/eap6/src/main/keystore/keycloak.jks b/testsuite/integration-arquillian/servers/eap6/src/main/keystore/keycloak.jks new file mode 100644 index 0000000000000000000000000000000000000000..81570ab52922e70c047bf56442ccce582af55539 GIT binary patch literal 2233 zcmcgt`8(7L7oYE#jHMaI2&Kq!%ZzQTS;`(`OR}WFwPeXUN*YU2GuKE$t{A1P$x>t) zJ0U}gVQiVJ?E5}OE+Ss{KJR_r`xm@Foaa2Bb3Q+u=X1{UIr}U7DFvr!R?Q~ z?&g03AAI|;V(s_A9}fZ@0bz)cJq(VOqMcdl=A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)7J%o~$D z`DSmJD^)tb$MaEXf5Tp{t?I@Xh3@f(^ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/wildfly/pom.xml b/testsuite/integration-arquillian/servers/wildfly/pom.xml index 6353c5d47b..cc5918d15d 100644 --- a/testsuite/integration-arquillian/servers/wildfly/pom.xml +++ b/testsuite/integration-arquillian/servers/wildfly/pom.xml @@ -225,6 +225,68 @@ + + ssl + + + auth.server.ssl.required + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-adapter-subsystem-security + process-resources + + transform + + + + + ${keycloak.server.home}/standalone/configuration + + standalone.xml + + src/main/xslt/security.xsl + ${keycloak.server.home}/standalone/configuration + + + + + + + + maven-resources-plugin + 2.7 + + + copy-keystore + process-resources + + copy-resources + + + ${keycloak.server.home}/standalone/configuration + + + src/main/keystore + + keycloak.jks + keycloak.truststore + + + + + + + + + + jpa @@ -368,5 +430,4 @@ - diff --git a/testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.jks b/testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.jks new file mode 100644 index 0000000000000000000000000000000000000000..81570ab52922e70c047bf56442ccce582af55539 GIT binary patch literal 2233 zcmcgt`8(7L7oYE#jHMaI2&Kq!%ZzQTS;`(`OR}WFwPeXUN*YU2GuKE$t{A1P$x>t) zJ0U}gVQiVJ?E5}OE+Ss{KJR_r`xm@Foaa2Bb3Q+u=X1{UIr}U7DFvr!R?Q~ z?&g03AAI|;V(s_A9}fZ@0bz)cJq(VOqMcdl=AA29 znPJu}^_f1kNDY?gG+0WsamWy5&em}uPzeb}bQpfzVN7WG?)Q4Ce>D`M0qVBs1Izj3yYo{4iZ{k+ ze3S`AU6&YaUn~8d!LAiitH0CyXwVO#=6e1%hw|DTsX|qwWb~z>*oh+Q>lT80QJ$Q; z%5;r!b8>z5RG6k_Z+XO?GQsy_2)V4R#of5A&!fpcT*Gm!V`SS5O|)Oc^0`Lb`7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~vzYUaoMPeFBpU#))>D;(~exz3P7 z`!C0{`zzP|OMe-((NeALrS`Pzb5_OQ;w?6M@lyQC4vmk}a;7`C&tJLjq4O2qKW)*6 zXIc6@7B!2FXJTe#U|g(dAa5WGj6zvH7BLo)FUuHABUY@FT*999?~z={<7W-mB#;9U zn2Lab$jIPcmbaJLw7lu;(A@;P(=-?N{B zKh9n4n;4ug%(47H=^2ZE5@`%Kr7Wt?-mUZsaa|W)@V{)5&FSsS?_61}5o=ZUd^2X`h;i+|kZX3@n30%2Qu2X-{lW8kT_B{!n9GZAOX>+hL=hl7g zDXVmLAKB3K;ppUbS1sMywK?bW9P->E=+Mn+W_rEiZxxfmPmdq-T#S4^_D<7TQ2%`X z-5<-(y5CxRHkF0(@XvX7`u0>Tyq)j#-ey61qG0t;sV4QsZ679V@zhM+@a0IPgiNf@ z%s`2`3)ee_Zn^Sd!|4a^%i{RD**_cm>S=QCW@ebaYaa9yiMmTDBE3bSUY(6+|nM{e3Hea`KDZEj@x%^88TqL zVC6JT>!{9&ySHc`T$iG>%jz^*Is#`%=Kf!Hn<}3Cn=@Brd%6D#?RWk&BP6yoGWA)` z-)MbHGcSy1OP;h_-iK93KD9nIsx%SiogA(ZTv5j`XHS(&_uDgHi~cmLOx^VE`k8yS zf%aXot3N1eMn`LXN-_L#WB(ZwjbrHtnjdr<*|2SB+OW;`Jg@wLdr!O8NYyqg-kbPZ z;;7Ke8Cw{|W8YpYnjiciZ&Re|xy@b&T&^E^UMIM(e7Cf0P4lP67X;OPnl9-xZO6Ih7^bG<^O+sfvUc1({JQodpT)7J%o~$D z`DSmJD^)tb$MaEXf5Tp{t?I@Xh3@f(^ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/adapters/eap6/pom.xml b/testsuite/integration-arquillian/tests/adapters/eap6/pom.xml index 433ca63ae7..0026220951 100644 --- a/testsuite/integration-arquillian/tests/adapters/eap6/pom.xml +++ b/testsuite/integration-arquillian/tests/adapters/eap6/pom.xml @@ -4,7 +4,7 @@ org.keycloak.testsuite integration-arquillian-tests-adapters - 1.7.0.Final-SNAPSHOT + 1.8.0.CR1-SNAPSHOT 4.0.0 @@ -131,5 +131,71 @@ - + + ssl + + + app.server.ssl.required + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-adapter-subsystem-security + process-resources + + transform + + + + + ${app.server.eap6.home}/standalone/configuration + + standalone.xml + + src/main/xslt/security.xsl + ${app.server.eap6.home}/standalone/configuration + + + + + + + + maven-resources-plugin + 2.7 + + + copy-keystore + process-resources + + copy-resources + + + ${app.server.eap6.home}/standalone/configuration + + + src/main/keystore + + adapter.jks + keycloak.truststore + + + + + jks + truststore + + + + + + + + + diff --git a/testsuite/integration-arquillian/tests/adapters/eap6/src/main/keystore/adapter.jks b/testsuite/integration-arquillian/tests/adapters/eap6/src/main/keystore/adapter.jks new file mode 100644 index 0000000000000000000000000000000000000000..57cc34b6c4c0eaf60347dd8f894d5e81ffbb173d GIT binary patch literal 2232 zcmcgt={wX58=l|HU<{+iDB_G7YOxn&de8Nqzu^6Ff4J}G`S4u#^IZ3{Gruzrfk2>p0R9I5RmK&^ ztL_Xx|2@URlVxfTf$#tX5WYc7)sK zAidVkE`C^;kB@+T=}_8UJx}8E`+jtZlgB2kuWzwAep5(5L z605_}2^HYZO3u7zoq}wUA&-v+Lic*Y+gl6)YGY@9B_#4uUP7sW!1~tH#WR4mM*`leF4rbv@KAX0~NZg);l71+&Q-%mcz;p?%}!c{AkopNE0r8STMa@ z(TrOMlA!EQ^tW>vHOW1U|~^`z0@m!5%=f@Ys=u%la2yXWSydz(%2oeJTT*Q?`=FAJTN z@o|blPuayu>C&X0`c$)fJHC5&v>07#6GIBGrfIn}3R|BAIbIYhM#wM(o}<1jtv^9% z&Z#h4zS-aD%%|c{J2>k$(Qws)d_y&7^QBWa7j7EXp4?_}Taq5YO{tF?&p1HEFjczn zz{KnN2Pm(f&Zag3Fqd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00001 diff --git a/testsuite/integration-arquillian/tests/adapters/eap6/src/main/keystore/keycloak.truststore b/testsuite/integration-arquillian/tests/adapters/eap6/src/main/keystore/keycloak.truststore new file mode 100644 index 0000000000000000000000000000000000000000..2df5170f9b39756055850ed3ad0c5d012aab1402 GIT binary patch literal 1857 zcmezO_TO6u1_mZL=E})WPRz;3FD@}+U|MkMHlk@H8W4_LHnT8m&Fogw@|!Tij3-^a(24 zxS>4i;cs@HcH8_*%IE9ah3cCew{CaLFt^eX*I#(vlzYZ~#}B!TZPKMP5B0A8S79P0 zYrOhInU0UA*R##KSyv|aPRzPi@8jH1Uc5u^_%-Vft$&(iLtlN&IB=xKB_y`(W9Xub zjGBj^E2i(#=aHJeBk-#5xywcFGn5P%)o!M~s`~vzYUaoMPeFBpU#))>D;(~exz3P7 z`!C0{`zzP|OMe-((NeALrS`Pzb5_OQ;w?6M@lyQC4vmk}a;7`C&tJLjq4O2qKW)*6 zXIc6@7B!2FXJTe#U|g(dAa5WGj6zvH7BLo)FUuHABUY@FT*999?~z={<7W-mB#;9U zn2Lab$jIPcmbaJLw7lu;(A@;P(=-?N{B zKh9n4n;4ug%(47H=^2ZE5@`%Kr7Wt?-mUZsaa|W)@V{)5&FSsS?_61}5o=ZUd^2X`h;i+|kZX3@n30%2Qu2X-{lW8kT_B{!n9GZAOX>+hL=hl7g zDXVmLAKB3K;ppUbS1sMywK?bW9P->E=+Mn+W_rEiZxxfmPmdq-T#S4^_D<7TQ2%`X z-5<-(y5CxRHkF0(@XvX7`u0>Tyq)j#-ey61qG0t;sV4QsZ679V@zhM+@a0IPgiNf@ z%s`2`3)ee_Zn^Sd!|4a^%i{RD**_cm>S=QCW@ebaYaa9yiMmTDBE3bSUY(6+|nM{e3Hea`KDZEj@x%^88TqL zVC6JT>!{9&ySHc`T$iG>%jz^*Is#`%=Kf!Hn<}3Cn=@Brd%6D#?RWk&BP6yoGWA)` z-)MbHGcSy1OP;h_-iK93KD9nIsx%SiogA(ZTv5j`XHS(&_uDgHi~cmLOx^VE`k8yS zf%aXot3N1eMn`LXN-_L#WB(ZwjbrHtnjdr<*|2SB+OW;`Jg@wLdr!O8NYyqg-kbPZ z;;7Ke8Cw{|W8YpYnjiciZ&Re|xy@b&T&^E^UMIM(e7Cf0P4lP67X;OPnl9-xZO6Ih7^bG<^O+sfvUc1({JQodpT)7J%o~$D z`DSmJD^)tb$MaEXf5Tp{t?I@Xh3@f(^ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/adapters/pom.xml b/testsuite/integration-arquillian/tests/adapters/pom.xml index 759ad6ff91..07aae0dc27 100644 --- a/testsuite/integration-arquillian/tests/adapters/pom.xml +++ b/testsuite/integration-arquillian/tests/adapters/pom.xml @@ -15,8 +15,10 @@ 200 8280 + 8643 10190 10199 + false -Dapp.server.base.url=http://localhost:${app.server.http.port} -Dmy.host.name=localhost - @@ -91,9 +93,11 @@ ${app.server.port.offset} ${app.server.http.port} + ${app.server.https.port} ${app.server.management.port} ${app.server.management.port.jmx} - + ${app.server.ssl.required} + ${adapter.test.props} bundled diff --git a/testsuite/integration-arquillian/tests/adapters/wildfly/pom.xml b/testsuite/integration-arquillian/tests/adapters/wildfly/pom.xml index 1e7a0bec90..fbac8fe3c8 100644 --- a/testsuite/integration-arquillian/tests/adapters/wildfly/pom.xml +++ b/testsuite/integration-arquillian/tests/adapters/wildfly/pom.xml @@ -130,5 +130,71 @@ + + ssl + + + app.server.ssl.required + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-adapter-subsystem-security + process-resources + + transform + + + + + ${app.server.wildfly.home}/standalone/configuration + + standalone.xml + + src/main/xslt/security.xsl + ${app.server.wildfly.home}/standalone/configuration + + + + + + + + maven-resources-plugin + 2.7 + + + copy-keystore + process-resources + + copy-resources + + + ${app.server.wildfly.home}/standalone/configuration + + + src/main/keystore + + adapter.jks + keycloak.truststore + + + + + jks + truststore + + + + + + + + diff --git a/testsuite/integration-arquillian/tests/adapters/wildfly/src/main/keystore/adapter.jks b/testsuite/integration-arquillian/tests/adapters/wildfly/src/main/keystore/adapter.jks new file mode 100644 index 0000000000000000000000000000000000000000..57cc34b6c4c0eaf60347dd8f894d5e81ffbb173d GIT binary patch literal 2232 zcmcgt={wX58=l|HU<{+iDB_G7YOxn&de8Nqzu^6Ff4J}G`S4u#^IZ3{Gruzrfk2>p0R9I5RmK&^ ztL_Xx|2@URlVxfTf$#tX5WYc7)sK zAidVkE`C^;kB@+T=}_8UJx}8E`+jtZlgB2kuWzwAep5(5L z605_}2^HYZO3u7zoq}wUA&-v+Lic*Y+gl6)YGY@9B_#4uUP7sW!1~tH#WR4mM*`leF4rbv@KAX0~NZg);l71+&Q-%mcz;p?%}!c{AkopNE0r8STMa@ z(TrOMlA!EQ^tW>vHOW1U|~^`z0@m!5%=f@Ys=u%la2yXWSydz(%2oeJTT*Q?`=FAJTN z@o|blPuayu>C&X0`c$)fJHC5&v>07#6GIBGrfIn}3R|BAIbIYhM#wM(o}<1jtv^9% z&Z#h4zS-aD%%|c{J2>k$(Qws)d_y&7^QBWa7j7EXp4?_}Taq5YO{tF?&p1HEFjczn zz{KnN2Pm(f&Zag3Fqd7ePju9(+5O>QxNwKC$e?VpQ*c*LTw0lA`sf&g+0}n09`OXM z9hbnDY|8OgwYn62^t@CXv?)RA8{Ja)maU}xrYYz^?T2{zNPp}8`qPcgOK>_$<}7uo zd_l?85?<ML|JX>?p$t~=FRF_l*UdM{xZ*DZOubHFv0nv_lT3=ZHygG1j2uq&**cN+ zP~oXt5UkBN9gIbB7TnMEnP?S3^VK9JwG{tmYC|C6o7ka8+Gf55tVya)$Ei`Bk(zN6 zEloNOb`bn?okY1er#IQf^h$Z1@3=Z~f! zM9*C@%s)4+qwD)#a0Yw-ebtdHxLHMrnr@%aPDF%aQQ=5X;#{#9FP~BpKCv;+$@9S1 zm{29r3;Oz|UK(%iekLT`09b^fK#*?)_o9(Q)oG-0wtlanMVEGHJ4QuKs&w^*(8K$t z+0iQ+`8VPWC~*u9{)MJqcwvwfqs{$dnykg6@GwtZ&6n7)uER6N!hdHY&jlqCK?4GT zc@aR^Zv+r(kq3hUP$*p4d|{Y?;^mi%HH=+H0e}Dxgy2FHAn^0Ttl_*Es5R{$g1|t{ zC`2@2-(M9z4C1_tpT8@^*O|C~FJAW~B!Pd``m7)(jN>oF8*svi~PSEJNAq_q^Y1!Apdm)#qhuAR2Bi(R%Z=mTU~UvO@< z%7WtQH5TtM-2=V`8BzoQKkPCa`g2O0xy)Fxj6knx{qQ@&N?=wH5%SxJ>9Nv^9k&_F zN)3GMjC|T3*=6?cQGP04XG8~UWR@i)NiVB&ODiVy2T@zGmspt^rjrNAcJ@#h009bd zgu?{v-U_io@PlxX)nW+g!lQ~qMSLDRpCqj&r=y0%{%zvk744Y_Knw!ubudy8*p=cO zQ`4@i;Amget}+&_yXMPcav3|#z#oHC8!J13zmB^;)UdWj(AxamE5+j8J+8PChteEg zNtL=1;EYF)W@-A18#7DoT8icr%7^Q0=+7*HEE@p>u#<=m~ zfeG(F$Y$!SniH2PW|Yo$h?GH<@P;E&@v-l4%0!b~s2)04=w+dY Jt?$>je*%%w*Z}|l literal 0 HcmV?d00001 diff --git a/testsuite/integration-arquillian/tests/adapters/wildfly/src/main/keystore/keycloak.truststore b/testsuite/integration-arquillian/tests/adapters/wildfly/src/main/keystore/keycloak.truststore new file mode 100644 index 0000000000000000000000000000000000000000..2df5170f9b39756055850ed3ad0c5d012aab1402 GIT binary patch literal 1857 zcmezO_TO6u1_mZL=E})WPRz;3FD@}+U|MkMHlk@H8W4_LHnT8m&Fogw@|!Tij3-^a(24 zxS>4i;cs@HcH8_*%IE9ah3cCew{CaLFt^eX*I#(vlzYZ~#}B!TZPKMP5B0A8S79P0 zYrOhInU0UA*R##KSyv|aPRzPi@8jH1Uc5u^_%-Vft$&(iLtlN&IB=xKB_y`(W9Xub zjGBj^E2i(#=aHJeBk-#5xywcFGn5P%)o!M~s`~vzYUaoMPeFBpU#))>D;(~exz3P7 z`!C0{`zzP|OMe-((NeALrS`Pzb5_OQ;w?6M@lyQC4vmk}a;7`C&tJLjq4O2qKW)*6 zXIc6@7B!2FXJTe#U|g(dAa5WGj6zvH7BLo)FUuHABUY@FT*999?~z={<7W-mB#;9U zn2Lab$jIPcmbaJLw7lu;(A@;P(=-?N{B zKh9n4n;4ug%(47H=^2ZE5@`%Kr7Wt?-mUZsaa|W)@V{)5&FSsS?_61}5o=ZUd^2X`h;i+|kZX3@n30%2Qu2X-{lW8kT_B{!n9GZAOX>+hL=hl7g zDXVmLAKB3K;ppUbS1sMywK?bW9P->E=+Mn+W_rEiZxxfmPmdq-T#S4^_D<7TQ2%`X z-5<-(y5CxRHkF0(@XvX7`u0>Tyq)j#-ey61qG0t;sV4QsZ679V@zhM+@a0IPgiNf@ z%s`2`3)ee_Zn^Sd!|4a^%i{RD**_cm>S=QCW@ebaYaa9yiMmTDBE3bSUY(6+|nM{e3Hea`KDZEj@x%^88TqL zVC6JT>!{9&ySHc`T$iG>%jz^*Is#`%=Kf!Hn<}3Cn=@Brd%6D#?RWk&BP6yoGWA)` z-)MbHGcSy1OP;h_-iK93KD9nIsx%SiogA(ZTv5j`XHS(&_uDgHi~cmLOx^VE`k8yS zf%aXot3N1eMn`LXN-_L#WB(ZwjbrHtnjdr<*|2SB+OW;`Jg@wLdr!O8NYyqg-kbPZ z;;7Ke8Cw{|W8YpYnjiciZ&Re|xy@b&T&^E^UMIM(e7Cf0P4lP67X;OPnl9-xZO6Ih7^bG<^O+sfvUc1({JQodpT)7J%o~$D z`DSmJD^)tb$MaEXf5Tp{t?I@Xh3@f(^ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/ContainersTestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/ContainersTestEnricher.java index f1328a90e3..50beaa69e0 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/ContainersTestEnricher.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/ContainersTestEnricher.java @@ -249,13 +249,19 @@ public class ContainersTestEnricher { public static String getAuthServerContextRootFromSystemProperty() { // TODO find if this can be extracted from ARQ metadata instead of System properties - return "http://localhost:" + Integer.parseInt( - System.getProperty("auth.server.http.port", "8180")); + boolean sslRequired = Boolean.parseBoolean(System.getProperty("auth.server.ssl.required")); + if (sslRequired) { + return "https://localhost:" + Integer.parseInt(System.getProperty("auth.server.https.port", "8543")); + } + return "http://localhost:" + Integer.parseInt(System.getProperty("auth.server.http.port", "8180")); } public static String getAppServerContextRootFromSystemProperty() { - return "http://localhost:" + Integer.parseInt( - System.getProperty("app.server.http.port", "8280")); + boolean sslRequired = Boolean.parseBoolean(System.getProperty("app.server.ssl.required")); + if (sslRequired) { + return "https://localhost:" + Integer.parseInt(System.getProperty("app.server.https.port", "8643")); + } + return "http://localhost:" + Integer.parseInt(System.getProperty("app.server.http.port", "8280")); } } diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/DeploymentArchiveProcessor.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/DeploymentArchiveProcessor.java index 0a965d8072..2be45f7d3e 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/DeploymentArchiveProcessor.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/DeploymentArchiveProcessor.java @@ -74,6 +74,9 @@ public class DeploymentArchiveProcessor implements ApplicationArchiveProcessor { adapterConfig.setAuthServerUrl(getAuthServerContextRootFromSystemProperty() + "/auth"); adapterConfig.setRealmKey(REALM_KEY); } + if ("true".equals(System.getProperty("app.server.ssl.required"))) { + adapterConfig.setSslRequired("all"); + } archive.add(new StringAsset(JsonSerialization.writeValueAsPrettyString(adapterConfig)), adapterConfigPath); diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java index dd31483b16..d085f868d7 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java @@ -22,6 +22,8 @@ public class URLProvider extends URLResourceProvider { public static final String LOCALHOST_ADDRESS = "127.0.0.1"; public static final String LOCALHOST_HOSTNAME = "localhost"; + private final boolean appServerSslRequired = Boolean.parseBoolean(System.getProperty("app.server.ssl.required")); + @Inject Instance testContext; @@ -36,6 +38,9 @@ public class URLProvider extends URLResourceProvider { try { url = fixLocalhost(url); url = removeTrailingSlash(url); + if (appServerSslRequired) { + url = fixSsl(url); + } } catch (MalformedURLException ex) { log.log(Level.FATAL, null, ex); } @@ -67,6 +72,12 @@ public class URLProvider extends URLResourceProvider { return fixedUrl; } + public URL fixSsl(URL url) throws MalformedURLException { + URL fixedUrl = url; + String urlString = fixedUrl.toExternalForm().replace("http", "https").replace(System.getProperty("app.server.http.port", "8280"), System.getProperty("app.server.https.port", "8643")); + return new URL(urlString); + } + public URL removeTrailingSlash(URL url) throws MalformedURLException { URL urlWithoutSlash = url; String urlS = url.toExternalForm(); diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java index 73ea7a670e..9c33410e96 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java @@ -49,6 +49,9 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest { modifyClientRedirectUris(tr, "^(/.*/\\*)", appServerContextRootPage.toString() + "$1"); modifyClientUrls(tr, "^(/.*)", appServerContextRootPage.toString() + "$1"); } + if ("true".equals(System.getProperty("auth.server.ssl.required"))) { + tr.setSslRequired("all"); + } } } diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml index e9473ad92f..29a57fa72a 100644 --- a/testsuite/integration-arquillian/tests/pom.xml +++ b/testsuite/integration-arquillian/tests/pom.xml @@ -24,8 +24,10 @@ auth-server-undertow 100 8180 + 8543 10090 10099 + false 60 phantomjs @@ -84,8 +86,10 @@ true ${auth.server.port.offset} ${auth.server.http.port} + ${auth.server.https.port} ${auth.server.management.port} ${auth.server.management.port.jmx} + ${auth.server.ssl.required} ${startup.timeout.sec}