diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostSigExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostSigExample.java index 9891889bce..7105bd1a64 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostSigExample.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostSigExample.java @@ -29,7 +29,7 @@ import java.net.URL; * @author mhajas */ public class SAMLPostSigExample extends AbstractPageWithInjectedUrl { - public static final String DEPLOYMENT_NAME = "saml-post-signatures"; + public static final String DEPLOYMENT_NAME = "sales-post-sig"; @ArquillianResource @OperateOnDeployment(DEPLOYMENT_NAME) diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java index e8703b450d..9dace92d7d 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java @@ -1,9 +1,5 @@ package org.keycloak.testsuite.arquillian; -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; import org.jboss.arquillian.container.spi.event.container.BeforeDeploy; import org.jboss.arquillian.container.test.api.ContainerController; import org.jboss.arquillian.core.api.Instance; @@ -13,12 +9,18 @@ import org.jboss.arquillian.core.api.annotation.Observes; import org.jboss.arquillian.test.spi.annotation.ClassScoped; import org.jboss.arquillian.test.spi.event.suite.BeforeClass; import org.jboss.logging.Logger; -import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerContextRoot; -import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerQualifier; import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import static org.keycloak.testsuite.util.IOUtil.execCommand; import org.keycloak.testsuite.util.LogChecker; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; + +import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerContextRoot; +import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerQualifier; +import static org.keycloak.testsuite.util.IOUtil.execCommand; import static org.keycloak.testsuite.util.WaitUtils.pause; /** @@ -158,7 +160,9 @@ public class AppServerTestEnricher { execCommand(command + " --connect --command=reload" + controllerArg, bin); log.info("Container restarted"); pause(5000); - LogChecker.checkJBossServerLog(jbossHomePath); + if (System.getProperty("app.server.log.check","true").equals("true")) { + LogChecker.checkJBossServerLog(jbossHomePath); + } } appServerInfo.setAdapterLibsInstalled(true); diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/Login.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/Login.java index 761718b4a9..67c145b262 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/Login.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/Login.java @@ -35,11 +35,12 @@ public abstract class Login extends AuthRealm { public static final String PROTOCOL = "protocol"; public static final String OIDC = "openid-connect"; public static final String SAML = "saml"; + public static final String LOGIN_ACTION = "login-action"; @Override public UriBuilder createUriBuilder() { return super.createUriBuilder() - .path("protocol/{" + PROTOCOL + "}" + (getProtocol().equals(OIDC) ? "/auth" : "")); + .path((getProtocol().equals(OIDC) || getProtocol().equals(SAML)) ? "protocol/" : "" + "{" + PROTOCOL + "}" + (getProtocol().equals(OIDC) ? "/auth" : "")); } public void setProtocol(String protocol) { diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLPostLogin.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLPostLogin.java new file mode 100644 index 0000000000..89814a6d67 --- /dev/null +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLPostLogin.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.auth.page.login; + +/** + * @author mhajas + */ +public class SAMLPostLogin extends Login { + SAMLPostLogin() { + setProtocol(LOGIN_ACTION); + } +} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLLogin.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLRedirectLogin.java similarity index 91% rename from testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLLogin.java rename to testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLRedirectLogin.java index c855880b86..498d231b02 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLLogin.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/SAMLRedirectLogin.java @@ -20,8 +20,8 @@ package org.keycloak.testsuite.auth.page.login; /** * @author mhajas */ -public class SAMLLogin extends Login { - SAMLLogin() { +public class SAMLRedirectLogin extends Login { + SAMLRedirectLogin() { setProtocol(SAML); } } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractAuthTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractAuthTest.java index f7b573545d..697323caf0 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractAuthTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractAuthTest.java @@ -23,7 +23,8 @@ import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.testsuite.auth.page.AuthRealm; import org.keycloak.testsuite.auth.page.login.OIDCLogin; -import org.keycloak.testsuite.auth.page.login.SAMLLogin; +import org.keycloak.testsuite.auth.page.login.SAMLPostLogin; +import org.keycloak.testsuite.auth.page.login.SAMLRedirectLogin; import org.openqa.selenium.Cookie; import java.text.MessageFormat; @@ -47,7 +48,10 @@ public abstract class AbstractAuthTest extends AbstractKeycloakTest { protected OIDCLogin testRealmLoginPage; @Page - protected SAMLLogin testRealmSAMLLoginPage; + protected SAMLPostLogin testRealmSAMLPostLoginPage; + + @Page + protected SAMLRedirectLogin testRealmSAMLRedirectLoginPage; protected UserRepresentation testUser; 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 a9ed805c3a..0ef7215866 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 @@ -135,7 +135,7 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest { masterUrl = client.getBaseUrl(); } masterUrl = masterUrl.replaceFirst(regex, replacement); - client.setAdminUrl(masterUrl); + client.setAdminUrl(masterUrl + ((!masterUrl.endsWith("/saml")) ? "/saml" : "")); } } } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractSAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractSAMLExampleAdapterTest.java index 8b0e608cc4..1495dfa9b0 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractSAMLExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractSAMLExampleAdapterTest.java @@ -60,7 +60,8 @@ public abstract class AbstractSAMLExampleAdapterTest extends AbstractExampleAdap public void setDefaultPageUriParameters() { super.setDefaultPageUriParameters(); testRealmPage.setAuthRealm(SAMLDEMO); - testRealmSAMLLoginPage.setAuthRealm(SAMLDEMO); + testRealmSAMLRedirectLoginPage.setAuthRealm(SAMLDEMO); + testRealmSAMLPostLoginPage.setAuthRealm(SAMLDEMO); } @Deployment(name = SAMLPostSigExample.DEPLOYMENT_NAME) @@ -81,41 +82,41 @@ public abstract class AbstractSAMLExampleAdapterTest extends AbstractExampleAdap @Test public void samlPostWithSignatureExampleTest() { samlPostSigExamplePage.navigateTo(); - testRealmSAMLLoginPage.form().login(bburkeUser); + testRealmSAMLPostLoginPage.form().login(bburkeUser); assertTrue(driver.getPageSource().contains("Welcome to the Sales Tool, " + bburkeUser.getUsername())); samlPostSigExamplePage.logout(); samlPostSigExamplePage.navigateTo(); - URLAssert.assertCurrentUrlStartsWith(testRealmSAMLLoginPage); + URLAssert.assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage); } @Test public void samlPostWithEncryptionExampleTest() { samlPostEncExamplePage.navigateTo(); - testRealmSAMLLoginPage.form().login(bburkeUser); + testRealmSAMLPostLoginPage.form().login(bburkeUser); assertTrue(driver.getPageSource().contains("Welcome to the Sales Tool, " + bburkeUser.getUsername())); samlPostEncExamplePage.logout(); samlPostEncExamplePage.navigateTo(); - URLAssert.assertCurrentUrlStartsWith(testRealmSAMLLoginPage); + URLAssert.assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage); } @Test public void samlRedirectWithSignatureExampleTest() { samlRedirectSigExamplePage.navigateTo(); - testRealmSAMLLoginPage.form().login(bburkeUser); + testRealmSAMLRedirectLoginPage.form().login(bburkeUser); assertTrue(driver.getPageSource().contains("Welcome to the Employee Tool,")); samlRedirectSigExamplePage.logout(); samlRedirectSigExamplePage.navigateTo(); - URLAssert.assertCurrentUrlStartsWith(testRealmSAMLLoginPage); + URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); } } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractSAMLServletsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractSAMLServletsAdapterTest.java index dfee07aee5..8391207f94 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractSAMLServletsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractSAMLServletsAdapterTest.java @@ -33,9 +33,7 @@ import org.w3c.dom.Document; import javax.ws.rs.core.Response; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import static org.keycloak.testsuite.auth.page.AuthRealm.SAMLSERVLETDEMO; import static org.keycloak.testsuite.util.IOUtil.*; import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWith; @@ -157,7 +155,8 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd public void setDefaultPageUriParameters() { super.setDefaultPageUriParameters(); testRealmPage.setAuthRealm(SAMLSERVLETDEMO); - testRealmSAMLLoginPage.setAuthRealm(SAMLSERVLETDEMO); + testRealmSAMLRedirectLoginPage.setAuthRealm(SAMLSERVLETDEMO); + testRealmSAMLPostLoginPage.setAuthRealm(SAMLSERVLETDEMO); } @Test @@ -177,7 +176,7 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd @Test public void unauthorizedSSOTest() { salesPostServletPage.navigateTo(); - testRealmSAMLLoginPage.form().login("unauthorized", "password"); + testRealmSAMLRedirectLoginPage.form().login("unauthorized", "password"); assertFalse(driver.getPageSource().contains("principal=")); assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403")); @@ -200,7 +199,7 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd @Test public void singleLoginAndLogoutSAMLTest() { salesPostServletPage.navigateTo(); - testRealmSAMLLoginPage.form().login(bburkeUser); + testRealmSAMLRedirectLoginPage.form().login(bburkeUser); assertTrue(driver.getPageSource().contains("principal=bburke")); salesPostSigServletPage.navigateTo(); @@ -215,16 +214,16 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd employeeSigFrontServletPage.logout(); employeeSigFrontServletPage.navigateTo(); - assertCurrentUrlStartsWith(testRealmSAMLLoginPage); + assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); employeeSigServletPage.navigateTo(); - assertCurrentUrlStartsWith(testRealmSAMLLoginPage); + assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); salesPostPassiveServletPage.navigateTo(); assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("
"));
 
         salesPostSigEmailServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
     }
 
     @Test
@@ -236,7 +235,7 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void badRealmSalesPostSigTest() {
         badRealmSalesPostSigServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLRedirectLoginPage.form().login(bburkeUser);
 
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -245,14 +244,14 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void employee2Test() {
         employee2ServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLPostLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("principal=bburke"));
 
         employee2ServletPage.logout();
         employee2ServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLPostLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -262,14 +261,14 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void employeeSigTest() {
         employeeSigServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLRedirectLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("principal=bburke"));
 
         employeeSigServletPage.logout();
         employeeSigServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLRedirectLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -279,14 +278,14 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void employeeSigFrontTest() {
         employeeSigFrontServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLRedirectLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("principal=bburke"));
 
         employeeSigFrontServletPage.logout();
         employeeSigFrontServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLRedirectLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -301,19 +300,29 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
         modifyDocElementAttribute(doc, "AssertionConsumerService", "Location", "8080", System.getProperty("app.server.http.port", null));
 
         ClientRepresentation clientRep = testRealmResource().convertClientDescription(IOUtil.documentToString(doc));
+
+        String appServerUrl;
+        if (Boolean.parseBoolean(System.getProperty("app.server.ssl.required"))) {
+            appServerUrl = "https://localhost:" + System.getProperty("app.server.https.port", "8543") + "/";
+        } else {
+            appServerUrl = "http://localhost:" + System.getProperty("app.server.http.port", "8280") + "/";
+        }
+
+        clientRep.setAdminUrl(appServerUrl + "sales-metadata/saml");
+
         Response response = testRealmResource().clients().create(clientRep);
         assertEquals(201, response.getStatus());
         response.close();
 
         salesMetadataServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLPostLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("principal=bburke"));
 
         salesMetadataServletPage.logout();
         salesMetadataServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLPostLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -323,14 +332,14 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void salesPostTest() {
         salesPostServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLPostLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("principal=bburke"));
 
         salesPostServletPage.logout();
         salesPostServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLPostLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -340,14 +349,14 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void salesPostEncTest() {
         salesPostEncServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLPostLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("principal=bburke"));
 
         salesPostEncServletPage.logout();
         salesPostEncServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLPostLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -361,7 +370,7 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("
"));
 
         salesPostServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLRedirectLoginPage.form().login(bburkeUser);
 
         salesPostPassiveServletPage.navigateTo();
         assertTrue(driver.getPageSource().contains("principal=bburke"));
@@ -372,7 +381,7 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("
"));
 
         salesPostServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLRedirectLoginPage.form().login("unauthorized", "password");
         salesPostPassiveServletPage.navigateTo();
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
@@ -383,14 +392,14 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void salesPostSigTest() {
         salesPostEncServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLPostLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("principal=bburke"));
 
         salesPostEncServletPage.logout();
         salesPostEncServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLPostLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -400,14 +409,14 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void salesPostSigEmailTest() {
         salesPostSigEmailServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLPostLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("principal=bburke"));
 
         salesPostSigEmailServletPage.logout();
         salesPostSigEmailServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLPostLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -417,15 +426,15 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void salesPostSigPersistentTest() {
         salesPostSigPersistentServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLPostLoginPage.form().login(bburkeUser);
         assertFalse(driver.getPageSource().contains("bburke"));
         assertTrue(driver.getPageSource().contains("principal=G-"));
 
         salesPostSigPersistentServletPage.logout();
         salesPostSigPersistentServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLPostLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
@@ -435,15 +444,15 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     @Test
     public void salesPostSigTransientTest() {
         salesPostSigTransientServletPage.navigateTo();
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        testRealmSAMLPostLoginPage.form().login(bburkeUser);
         assertFalse(driver.getPageSource().contains("bburke"));
         assertTrue(driver.getPageSource().contains("principal=G-"));
 
         salesPostSigTransientServletPage.logout();
         salesPostSigTransientServletPage.navigateTo();
-        assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
 
-        testRealmSAMLLoginPage.form().login("unauthorized", "password");
+        testRealmSAMLPostLoginPage.form().login("unauthorized", "password");
         assertFalse(driver.getPageSource().contains("principal="));
         //Different 403 status page on EAP and Wildfly
         assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("Status 403"));
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/sp-metadata.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/sp-metadata.xml
index 77507eb9e3..59f88f6aca 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/sp-metadata.xml
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/sp-metadata.xml
@@ -24,9 +24,9 @@
                 protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.1:protocol http://schemas.xmlsoap.org/ws/2003/07/secext">
             urn:oasis:names:tc:SAML:2.0:nameid-format:transient
             
-            
+            
             
             
                 
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json
index f7e565c2ec..031edc7018 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json
@@ -172,8 +172,8 @@
             "enabled": true,
             "protocol": "saml",
             "fullScopeAllowed": true,
-            "baseUrl": "http://localhost:8080/bad-realm-sales-post-sig/",
-            "adminUrl": "http://localhost:8080/bad-realm-sales-post-sig/",
+            "baseUrl": "http://localhost:8080/bad-realm-sales-post-sig",
+            "adminUrl": "http://localhost:8080/bad-realm-sales-post-sig",
             "redirectUris": [
                 "http://localhost:8080/bad-realm-sales-post-sig/*"
             ],
@@ -189,8 +189,8 @@
             "enabled": true,
             "protocol": "saml",
             "fullScopeAllowed": true,
-            "baseUrl": "http://localhost:8080/bad-client-sales-post-sig/",
-            "adminUrl": "http://localhost:8080/bad-client-sales-post-sig/",
+            "baseUrl": "http://localhost:8080/bad-client-sales-post-sig",
+            "adminUrl": "http://localhost:8080/bad-client-sales-post-sig",
             "redirectUris": [
                 "http://localhost:8080/bad-client-sales-post-sig/*"
             ],
@@ -229,7 +229,7 @@
             "redirectUris": [
                 "http://localhost:8080/employee-sig/*"
             ],
-            "adminUrl": "http://localhost:8080/employee-sig/",
+            "adminUrl": "http://localhost:8080/employee-sig",
             "attributes": {
                 "saml.server.signature": "true",
                 "saml.client.signature": "true",
@@ -243,11 +243,11 @@
             "enabled": true,
             "protocol": "saml",
             "fullScopeAllowed": true,
-            "baseUrl": "http://localhost:8080/employee/",
+            "baseUrl": "http://localhost:8080/employee",
             "redirectUris": [
                 "http://localhost:8080/employee/*"
             ],
-            "adminUrl": "http://localhost:8080/employee/",
+            "adminUrl": "http://localhost:8080/employee",
             "attributes": {
                 "saml.authnstatement": "true"
             },
@@ -293,11 +293,11 @@
             "enabled": true,
             "protocol": "saml",
             "fullScopeAllowed": true,
-            "baseUrl": "http://localhost:8080/employee2/",
+            "baseUrl": "http://localhost:8080/employee2",
             "redirectUris": [
                 "http://localhost:8080/employee2/*"
             ],
-            "adminUrl": "http://localhost:8080/employee2/",
+            "adminUrl": "http://localhost:8080/employee2",
             "attributes": {
                 "saml.authnstatement": "true"
             },
@@ -344,7 +344,7 @@
             "protocol": "saml",
             "fullScopeAllowed": true,
             "frontchannelLogout": true,
-            "baseUrl": "http://localhost:8080/employee-sig-front/",
+            "baseUrl": "http://localhost:8080/employee-sig-front",
             "redirectUris": [
                 "http://localhost:8080/employee-sig-front/*"
             ],
diff --git a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/src/test/java/org/keycloak/testsuite/mod_auth_mellon/ModAuthMellonTest.java b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/src/test/java/org/keycloak/testsuite/mod_auth_mellon/ModAuthMellonTest.java
index 1e55cfdf0e..f19b57bd10 100644
--- a/testsuite/integration-arquillian/tests/other/mod_auth_mellon/src/test/java/org/keycloak/testsuite/mod_auth_mellon/ModAuthMellonTest.java
+++ b/testsuite/integration-arquillian/tests/other/mod_auth_mellon/src/test/java/org/keycloak/testsuite/mod_auth_mellon/ModAuthMellonTest.java
@@ -30,20 +30,20 @@ public class ModAuthMellonTest extends AbstractAuthTest {
     @Test
     public void modAuthMellonTest() throws TransformerException {
         testRealmPage.setAuthRealm("mellon-test");
-        testRealmSAMLLoginPage.setAuthRealm("mellon-test");
+        testRealmSAMLRedirectLoginPage.setAuthRealm("mellon-test");
 
         modAuthMellonUnprotectedResourcePage.navigateTo();
         assertTrue(driver.getPageSource().contains("Unprotected resource"));
 
         modAuthMellonProtectedResourcePage.navigateTo();
-        URLAssert.assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
-        testRealmSAMLLoginPage.form().login(bburkeUser);
+        URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage);
+        testRealmSAMLRedirectLoginPage.form().login(bburkeUser);
         assertTrue(driver.getPageSource().contains("Protected resource"));
 
         modAuthMellonProtectedResourcePage.logout();
         assertTrue(driver.getPageSource().contains("Unprotected resource"));
 
         modAuthMellonProtectedResourcePage.navigateTo();
-        URLAssert.assertCurrentUrlStartsWith(testRealmSAMLLoginPage);
+        URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage);
     }
 }