diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationFlowResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationFlowResource.java new file mode 100644 index 0000000000..b2147fe51a --- /dev/null +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationFlowResource.java @@ -0,0 +1,47 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2012, Red Hat, Inc., and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package org.keycloak.admin.client.resource; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.PUT; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import org.keycloak.representations.idm.AuthenticationFlowRepresentation; + +/** + * + * @author Vlastislav Ramik + */ +public interface AuthenticationFlowResource { + + @GET + @Produces(MediaType.APPLICATION_JSON) + public AuthenticationFlowRepresentation toRepresentation(); + + @PUT + @Consumes(MediaType.APPLICATION_JSON) + public void update(AuthenticationFlowRepresentation authenticationFlowRepresentation); + + +} diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationFlowsResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationFlowsResource.java new file mode 100644 index 0000000000..a100a2525d --- /dev/null +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationFlowsResource.java @@ -0,0 +1,50 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2012, Red Hat, Inc., and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.keycloak.admin.client.resource; + +import java.util.List; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import org.keycloak.representations.idm.AuthenticationFlowRepresentation; + +/** + * @author Vlastislav Ramik + */ +public interface AuthenticationFlowsResource { + +// @Path("{alias}") +// public AuthenticationFlowResource get(@PathParam("alias") String alias); + + @POST + @Consumes(MediaType.APPLICATION_JSON) + public Response create(AuthenticationFlowRepresentation authenticationFlowRepresentation); + + @GET + @Produces(MediaType.APPLICATION_JSON) + public List list(); +} diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationResource.java new file mode 100644 index 0000000000..15cfb07f9f --- /dev/null +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationResource.java @@ -0,0 +1,36 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2012, Red Hat, Inc., and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package org.keycloak.admin.client.resource; + +import javax.ws.rs.Path; + +/** + * + * @author Vlastislav Ramik + */ +public interface AuthenticationResource { + + @Path("flows") + AuthenticationFlowsResource flows(); + +} diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RealmResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RealmResource.java index 87513ec2ab..0ac1022107 100644 --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RealmResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RealmResource.java @@ -46,4 +46,7 @@ public interface RealmResource { @GET List> getClientSessionStats(); + @Path("authentication") + AuthenticationResource authentication(); + } diff --git a/testsuite/integration-arquillian/servers/pom.xml b/testsuite/integration-arquillian/servers/pom.xml index aadfe4e5d9..d97c97c38f 100644 --- a/testsuite/integration-arquillian/servers/pom.xml +++ b/testsuite/integration-arquillian/servers/pom.xml @@ -26,6 +26,12 @@ eap6 + + migration-kc16 + + wildfly_kc16 + + migration-kc15 diff --git a/testsuite/integration-arquillian/servers/wildfly_kc16/assembly.xml b/testsuite/integration-arquillian/servers/wildfly_kc16/assembly.xml new file mode 100644 index 0000000000..46782886cb --- /dev/null +++ b/testsuite/integration-arquillian/servers/wildfly_kc16/assembly.xml @@ -0,0 +1,29 @@ + + + auth-server-wildfly-kc16 + + + zip + + + false + + + + ${keycloak.server.home} + keycloak-1.6.0.Final + + **/*.sh + + + + ${keycloak.server.home} + keycloak-1.6.0.Final + + **/*.sh + + 0755 + + + + diff --git a/testsuite/integration-arquillian/servers/wildfly_kc16/pom.xml b/testsuite/integration-arquillian/servers/wildfly_kc16/pom.xml new file mode 100644 index 0000000000..c5e8ac147c --- /dev/null +++ b/testsuite/integration-arquillian/servers/wildfly_kc16/pom.xml @@ -0,0 +1,199 @@ + + + + org.keycloak.testsuite + integration-arquillian-servers + 1.7.0.Final-SNAPSHOT + + 4.0.0 + + integration-arquillian-server-wildfly-kc16 + pom + Keycloak 1.6.0.Final on Wildfly + + + ${project.build.directory}/unpacked/keycloak-1.6.0.Final + ${keycloak.server.home}/modules/system/layers/base/com/${jdbc.mvn.artifactId}/main + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-enforcer-plugin + 1.4 + + + enforce-properties + + enforce + + + + + jdbc.mvn.groupId + + + jdbc.mvn.artifactId + + + jdbc.mvn.version + + + keycloak.connectionsJpa.url + + + keycloak.connectionsJpa.user + + + keycloak.connectionsJpa.password + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-server + generate-resources + + unpack + + + + + org.keycloak + keycloak-server-dist + 1.6.0.Final + zip + ${project.build.directory}/unpacked + + + + + + jdbc-driver + process-resources + + copy + + + + + ${jdbc.mvn.groupId} + ${jdbc.mvn.artifactId} + ${jdbc.mvn.version} + jar + + + ${jdbc.mvn.driver.deployment.dir} + true + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-wildfly-datasource + process-resources + + transform + + + + + + ${keycloak.server.home}/modules/system/layers/base/com/h2database/h2/main + src/main/xslt/module.xsl + + module.xml + + ${jdbc.mvn.driver.deployment.dir} + + + database + ${jdbc.mvn.artifactId} + + + version + ${jdbc.mvn.version} + + + + + + ${keycloak.server.home}/standalone/configuration + src/main/xslt/datasource.xsl + + standalone.xml + + ${keycloak.server.home}/standalone/configuration + + + jdbc.url + ${keycloak.connectionsJpa.url} + + + driver + ${jdbc.mvn.artifactId} + + + username + ${keycloak.connectionsJpa.user} + + + password + ${keycloak.connectionsJpa.password} + + + + + + ${keycloak.server.home}/standalone/configuration + src/main/xslt/add-dialect-logger.xsl + + standalone.xml + + ${keycloak.server.home}/standalone/configuration + + + + + + + + maven-assembly-plugin + + + create-zip + package + + single + + + + assembly.xml + + false + + + + + + + diff --git a/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/add-dialect-logger.xsl b/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/add-dialect-logger.xsl new file mode 100644 index 0000000000..b5dc8c4e02 --- /dev/null +++ b/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/add-dialect-logger.xsl @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/datasource.xsl b/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/datasource.xsl new file mode 100644 index 0000000000..c06899fd74 --- /dev/null +++ b/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/datasource.xsl @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/module.xsl b/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/module.xsl new file mode 100644 index 0000000000..88ac56b86c --- /dev/null +++ b/testsuite/integration-arquillian/servers/wildfly_kc16/src/main/xslt/module.xsl @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml index 1b6df1d5e1..bc82ac773c 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml +++ b/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml @@ -21,6 +21,17 @@ + + + ${migration.kc16} + org.jboss.as.arquillian.container.managed.ManagedDeployableContainer + ${keycloak-1.6.0.Final.home} + -Djboss.socket.binding.port-offset=${auth.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m + ${auth.server.management.port} + ${startup.timeout.sec} + + + ${migration.kc15} diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml index 2c9f13f5f0..2a1be0b2d6 100644 --- a/testsuite/integration-arquillian/tests/pom.xml +++ b/testsuite/integration-arquillian/tests/pom.xml @@ -451,6 +451,56 @@ + + migration-kc16 + + ${containers.home}/keycloak-1.6.0.Final + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + + + unpack-previous + generate-test-resources + + unpack + + + + + org.keycloak.testsuite + integration-arquillian-server-wildfly-kc16 + ${project.version} + zip + + + ${containers.home} + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + true + true + ${keycloak-1.6.0.Final.home} + + + + + + + + migration-kc15