From b1a23a13d68b2c53400aa2ecc5091b269bca4bf9 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Mon, 28 Sep 2015 16:30:03 -0400 Subject: [PATCH] jetty saml fixes --- .../adapters/saml/SamlAuthenticator.java | 2 +- .../saml/AbstractSamlAuthenticatorValve.java | 2 +- testsuite/jetty/jetty81/pom.xml | 8 +++---- .../org/keycloak/testsuite/Jetty8Test.java | 1 + .../org/keycloak/testsuite/JettySamlTest.java | 1 + .../org/keycloak/testsuite/Jetty9Test.java | 1 + .../org/keycloak/testsuite/JettySamlTest.java | 1 + testsuite/jetty/pom.xml | 21 +++++++++++++++++++ testsuite/pom.xml | 4 +--- 9 files changed, 32 insertions(+), 9 deletions(-) create mode 100755 testsuite/jetty/pom.xml diff --git a/saml/client-adapter/core/src/main/java/org/keycloak/adapters/saml/SamlAuthenticator.java b/saml/client-adapter/core/src/main/java/org/keycloak/adapters/saml/SamlAuthenticator.java index f95bb5d650..ae7eb4baf6 100755 --- a/saml/client-adapter/core/src/main/java/org/keycloak/adapters/saml/SamlAuthenticator.java +++ b/saml/client-adapter/core/src/main/java/org/keycloak/adapters/saml/SamlAuthenticator.java @@ -270,7 +270,7 @@ public abstract class SamlAuthenticator { if (attributeValues != null) { for (Object attrValue : attributeValues) { String role = getAttributeValue(attrValue); - log.info("Add role: " + role); + log.debugv("Add role: {0}", role); roles.add(role); } } diff --git a/saml/client-adapter/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/saml/AbstractSamlAuthenticatorValve.java b/saml/client-adapter/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/saml/AbstractSamlAuthenticatorValve.java index 2032488f89..af5a8c683f 100755 --- a/saml/client-adapter/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/saml/AbstractSamlAuthenticatorValve.java +++ b/saml/client-adapter/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/saml/AbstractSamlAuthenticatorValve.java @@ -179,7 +179,7 @@ public abstract class AbstractSamlAuthenticatorValve extends FormAuthenticator i } protected boolean authenticateInternal(Request request, HttpServletResponse response, Object loginConfig) throws IOException { - log.info("authenticateInternal"); + log.fine("authenticateInternal"); CatalinaHttpFacade facade = new CatalinaHttpFacade(response, request); SamlDeployment deployment = deploymentContext.resolveDeployment(facade); if (deployment == null || !deployment.isConfigured()) { diff --git a/testsuite/jetty/jetty81/pom.xml b/testsuite/jetty/jetty81/pom.xml index 2925c5450c..d079952132 100755 --- a/testsuite/jetty/jetty81/pom.xml +++ b/testsuite/jetty/jetty81/pom.xml @@ -26,10 +26,6 @@ org.keycloak keycloak-admin-client - - org.keycloak - keycloak-jetty81-saml-adapter - log4j log4j @@ -110,6 +106,10 @@ org.keycloak keycloak-undertow-adapter + + org.keycloak + keycloak-jetty81-saml-adapter + org.keycloak keycloak-jetty81-adapter diff --git a/testsuite/jetty/jetty81/src/test/java/org/keycloak/testsuite/Jetty8Test.java b/testsuite/jetty/jetty81/src/test/java/org/keycloak/testsuite/Jetty8Test.java index 2453aaba25..a2e4b42b6a 100755 --- a/testsuite/jetty/jetty81/src/test/java/org/keycloak/testsuite/Jetty8Test.java +++ b/testsuite/jetty/jetty81/src/test/java/org/keycloak/testsuite/Jetty8Test.java @@ -87,6 +87,7 @@ public class Jetty8Test { public static void shutdownJetty() throws Exception { server.stop(); server.destroy(); + Thread.sleep(1000); } @Rule diff --git a/testsuite/jetty/jetty81/src/test/java/org/keycloak/testsuite/JettySamlTest.java b/testsuite/jetty/jetty81/src/test/java/org/keycloak/testsuite/JettySamlTest.java index b64fae56fa..644435a7c7 100755 --- a/testsuite/jetty/jetty81/src/test/java/org/keycloak/testsuite/JettySamlTest.java +++ b/testsuite/jetty/jetty81/src/test/java/org/keycloak/testsuite/JettySamlTest.java @@ -99,6 +99,7 @@ public class JettySamlTest { public static void shutdownJetty() throws Exception { server.stop(); server.destroy(); + Thread.sleep(1000); } @Test diff --git a/testsuite/jetty/jetty91/src/test/java/org/keycloak/testsuite/Jetty9Test.java b/testsuite/jetty/jetty91/src/test/java/org/keycloak/testsuite/Jetty9Test.java index ba6b2e9afa..fcf75ca465 100755 --- a/testsuite/jetty/jetty91/src/test/java/org/keycloak/testsuite/Jetty9Test.java +++ b/testsuite/jetty/jetty91/src/test/java/org/keycloak/testsuite/Jetty9Test.java @@ -87,6 +87,7 @@ public class Jetty9Test { public static void shutdownJetty() throws Exception { server.stop(); server.destroy(); + Thread.sleep(1000); } @Rule diff --git a/testsuite/jetty/jetty91/src/test/java/org/keycloak/testsuite/JettySamlTest.java b/testsuite/jetty/jetty91/src/test/java/org/keycloak/testsuite/JettySamlTest.java index ac096188d0..c9323c4cd4 100755 --- a/testsuite/jetty/jetty91/src/test/java/org/keycloak/testsuite/JettySamlTest.java +++ b/testsuite/jetty/jetty91/src/test/java/org/keycloak/testsuite/JettySamlTest.java @@ -98,6 +98,7 @@ public class JettySamlTest { public static void shutdownJetty() throws Exception { server.stop(); server.destroy(); + Thread.sleep(1000); } @Test diff --git a/testsuite/jetty/pom.xml b/testsuite/jetty/pom.xml new file mode 100755 index 0000000000..c1f4f4ffc2 --- /dev/null +++ b/testsuite/jetty/pom.xml @@ -0,0 +1,21 @@ + + + keycloak-testsuite-pom + org.keycloak + 1.6.0.Final-SNAPSHOT + ../pom.xml + + Keycloak SAML Jetty Testsuite Integration + + 4.0.0 + + keycloak-jetty-testsuite-integration-pom + pom + + + jetty81 + jetty91 + jetty92 + + diff --git a/testsuite/pom.xml b/testsuite/pom.xml index beae79ed8b..5f4274e99f 100755 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -69,9 +69,7 @@ tomcat6 tomcat7 tomcat8 - jetty/jetty81 - jetty/jetty92 - jetty/jetty91 + jetty performance