Workflow failure: Fuse adapter tests
Closes: #27021 Signed-off-by: Simon Vacek <simonvacky@email.cz>
This commit is contained in:
parent
88d5970944
commit
0205262c91
16 changed files with 102 additions and 25 deletions
|
@ -236,6 +236,14 @@
|
|||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- Fuse adapter tests dependencies END -->
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
{
|
||||
"realm": "demo",
|
||||
"resource": "product-portal",
|
||||
"auth-server-url": "http://localhost:8080/auth",
|
||||
"ssl-required" : "external",
|
||||
"credentials": {
|
||||
"secret": "password"
|
||||
}
|
||||
}
|
|
@ -119,6 +119,7 @@
|
|||
<include>keycloak-direct-access.json</include>
|
||||
<include>keycloak-hawtio-client.json</include>
|
||||
<include>keycloak-hawtio.json</include>
|
||||
<include>product-portal-keycloak.json</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
javax.servlet;version="[3.1,5)",
|
||||
javax.servlet.http;version="[3.1,5)",
|
||||
javax.net.ssl,
|
||||
org.apache.camel.*,
|
||||
io.undertow.*;version="[1.4,3)",
|
||||
org.apache.camel;version="[2.13,3)",
|
||||
org.keycloak.*;version="${fuse.adapter.version}",
|
||||
|
|
|
@ -113,8 +113,8 @@
|
|||
<supportedProjectType>war</supportedProjectType>
|
||||
</supportedProjectTypes>
|
||||
<instructions>
|
||||
<Webapp-Context>customer-portal</Webapp-Context>
|
||||
<Web-ContextPath>customer-portal</Web-ContextPath>
|
||||
<Webapp-Context>/customer-portal</Webapp-Context>
|
||||
<Web-ContextPath>/customer-portal</Web-ContextPath>
|
||||
<Embed-Directory>WEB-INF/lib</Embed-Directory>
|
||||
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
|
||||
<Bundle-Name>${project.name}</Bundle-Name>
|
||||
|
|
|
@ -63,6 +63,12 @@
|
|||
<artifactId>cxf-rt-transports-http-undertow</artifactId>
|
||||
<version>${cxf.undertow.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>javax.ws.rs-api</artifactId>
|
||||
<version>2.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
package org.keycloak.example.rs;
|
||||
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -198,7 +198,10 @@
|
|||
"redirectUris": [
|
||||
"http://localhost:8181/customer-portal/*"
|
||||
],
|
||||
"secret": "password"
|
||||
"secret": "password",
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clientId": "product-portal",
|
||||
|
@ -208,7 +211,10 @@
|
|||
"redirectUris": [
|
||||
"http://localhost:8181/product-portal/*"
|
||||
],
|
||||
"secret": "password"
|
||||
"secret": "password",
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clientId": "builtin-cxf-app",
|
||||
|
@ -218,28 +224,40 @@
|
|||
"redirectUris": [
|
||||
"http://localhost:8181/cxf/*"
|
||||
],
|
||||
"secret": "password"
|
||||
"secret": "password",
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clientId": "custom-cxf-endpoint",
|
||||
"enabled": true,
|
||||
"adminUrl": "http://localhost:8282/PersonServiceCF",
|
||||
"baseUrl": "http://localhost:8282/PersonServiceCF",
|
||||
"bearerOnly": true
|
||||
"bearerOnly": true,
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clientId": "admin-camel-endpoint",
|
||||
"enabled": true,
|
||||
"adminUrl": "http://localhost:8383/admin-camel-endpoint",
|
||||
"baseUrl": "http://localhost:8383/admin-camel-endpoint",
|
||||
"bearerOnly": true
|
||||
"bearerOnly": true,
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clientId": "admin-camel-restdsl",
|
||||
"enabled": true,
|
||||
"adminUrl": "http://localhost:8484/restdsl",
|
||||
"baseUrl": "http://localhost:8484/restdsl",
|
||||
"bearerOnly": true
|
||||
"bearerOnly": true,
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clientId": "ssh-jmx-admin-client",
|
||||
|
@ -247,7 +265,10 @@
|
|||
"publicClient": false,
|
||||
"standardFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"secret": "password"
|
||||
"secret": "password",
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clientId": "external-config",
|
||||
|
@ -258,7 +279,10 @@
|
|||
"http://localhost:8181/external-config",
|
||||
"http://localhost:8181/external-config/*"
|
||||
],
|
||||
"secret": "password"
|
||||
"secret": "password",
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clientId" : "hawtio-client",
|
||||
|
@ -269,7 +293,10 @@
|
|||
"webOrigins" : [ "http://localhost:8080", "http://localhost:8181", "http://localhost:8081" ],
|
||||
"bearerOnly" : false,
|
||||
"publicClient" : true,
|
||||
"protocol" : "openid-connect"
|
||||
"protocol" : "openid-connect",
|
||||
"attributes": {
|
||||
"exclude.issuer.from.auth.response": "true"
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
|
|
|
@ -116,8 +116,8 @@
|
|||
<supportedProjectType>war</supportedProjectType>
|
||||
</supportedProjectTypes>
|
||||
<instructions>
|
||||
<Webapp-Context>external-config</Webapp-Context>
|
||||
<Web-ContextPath>external-config</Web-ContextPath>
|
||||
<Webapp-Context>/external-config</Webapp-Context>
|
||||
<Web-ContextPath>/external-config</Web-ContextPath>
|
||||
<Embed-Directory>WEB-INF/lib</Embed-Directory>
|
||||
<Bundle-Name>${project.name}</Bundle-Name>
|
||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<feature name="keycloak-fuse-7.0-example" version="${project.version}">
|
||||
<details>The Keycloak / Fuse 7.0 on Undertow example</details>
|
||||
<feature>pax-http-undertow</feature>
|
||||
<feature>pax-web-http-undertow</feature>
|
||||
<feature>war</feature>
|
||||
<feature>camel</feature>
|
||||
<feature>camel-undertow</feature>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<camel.version>2.21.2</camel.version>
|
||||
<fuse.adapter.version>18.0.7</fuse.adapter.version>
|
||||
<fuse.adapter.version>18.0.12</fuse.adapter.version>
|
||||
</properties>
|
||||
<modules>
|
||||
<module>customer-app-fuse</module>
|
||||
|
|
|
@ -55,7 +55,7 @@ public class ProductPortalServlet extends HttpServlet {
|
|||
out.println("<html><head><title>Product Portal Page</title></head><body>");
|
||||
|
||||
String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth").path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH)
|
||||
.queryParam("redirect_uri", "http://localhost:8181/product-portal").build("demo").toString();
|
||||
.build("demo").toString();
|
||||
String acctUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth").path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH)
|
||||
.queryParam("referrer", "product-portal").build("demo").toString();
|
||||
|
||||
|
|
|
@ -42,12 +42,25 @@
|
|||
|
||||
<bean id="productServlet" class="org.keycloak.example.ProductPortalServlet" depends-on="keycloakPaxWebIntegration" />
|
||||
|
||||
<service ref="productServlet" interface="javax.servlet.Servlet">
|
||||
<!--service ref="productServlet" interface="javax.servlet.Servlet">
|
||||
<service-properties>
|
||||
<entry key="alias" value="/product-portal" />
|
||||
<entry key="alias" value="/product-portal/*" />
|
||||
<entry key="servlet-name" value="ProductServlet" />
|
||||
<entry key="keycloak.config.file" value="/keycloak.json" />
|
||||
</service-properties>
|
||||
</service-->
|
||||
|
||||
<service ref="productServlet" interface="javax.servlet.Servlet">
|
||||
<service-properties>
|
||||
<entry key="osgi.http.whiteboard.servlet.name" value="ProductServlet" />
|
||||
<entry key="osgi.http.whiteboard.servlet.pattern">
|
||||
<array value-type="java.lang.String">
|
||||
<value>/product-portal/*</value>
|
||||
</array>
|
||||
</entry>
|
||||
<entry key="keycloak.config" value="/keycloak.json" />
|
||||
</service-properties>
|
||||
</service>
|
||||
|
||||
|
||||
</blueprint>
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"realm": "demo",
|
||||
"resource": "product-portal",
|
||||
"auth-server-url": "http://localhost:8080/auth",
|
||||
"ssl-required" : "external",
|
||||
"credentials": {
|
||||
"secret": "password"
|
||||
}
|
||||
}
|
|
@ -22,6 +22,7 @@ import org.junit.Assert;
|
|||
import org.junit.Assume;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.keycloak.protocol.oidc.OIDCLoginProtocolService;
|
||||
import org.keycloak.representations.idm.RealmRepresentation;
|
||||
import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest;
|
||||
|
@ -166,6 +167,7 @@ public class FuseAdapterTest extends AbstractExampleAdapterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@AppServerContainer(value = ContainerConstants.APP_SERVER_FUSE63, skip = true)
|
||||
public void hawtio2LoginTest() throws Exception {
|
||||
|
||||
|
@ -346,9 +348,9 @@ public class FuseAdapterTest extends AbstractExampleAdapterTest {
|
|||
|
||||
DroneUtils.getCurrentDriver().navigate().back();
|
||||
customerListing.clickLogOut();
|
||||
|
||||
logoutConfirmPage.confirmLogout();
|
||||
|
||||
WaitUtils.pause(2500);
|
||||
customerPortal.navigateTo();//needed for phantomjs
|
||||
WaitUtils.waitForPageToLoad();
|
||||
customerPortal.clickCustomerListingLink();
|
||||
|
@ -375,6 +377,7 @@ public class FuseAdapterTest extends AbstractExampleAdapterTest {
|
|||
WaitUtils.waitForPageToLoad();
|
||||
customerListing.clickLogOut();
|
||||
logoutConfirmPage.confirmLogout();
|
||||
WaitUtils.waitForPageToLoad();
|
||||
|
||||
WaitUtils.pause(2500);
|
||||
customerPortal.navigateTo();//needed for phantomjs
|
||||
|
@ -404,7 +407,8 @@ public class FuseAdapterTest extends AbstractExampleAdapterTest {
|
|||
assertThat(productPortal.getProduct2SecuredText(), containsString("Product received: id=2"));
|
||||
|
||||
productPortal.clickLogOutLink();
|
||||
logoutConfirmPage.confirmLogout();
|
||||
WaitUtils.waitForPageToLoad();
|
||||
assertCurrentUrlStartsWithLoginUrlOf(testRealmPage);
|
||||
assertCurrentUrlStartsWith(testRealmPage);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ public class FuseUtils {
|
|||
assertCommand(managementUser, managementPassword,
|
||||
"feature:repo-add mvn:org.keycloak/keycloak-osgi-features/" + fuseAdapterVersion + "/xml/features; " +
|
||||
"feature:repo-add mvn:org.keycloak.testsuite/fuse-example-keycloak-features/" + projectVersion + "/xml/features; " +
|
||||
"feature:install pax-http-undertow; " +
|
||||
"feature:install pax-web-http-undertow; " +
|
||||
"feature:install keycloak-jaas keycloak-pax-http-undertow; " +
|
||||
"feature:install keycloak-fuse-7.0-example",
|
||||
Result.OK);
|
||||
|
|
Loading…
Reference in a new issue