jetty saml fixes

This commit is contained in:
Bill Burke 2015-09-28 16:30:03 -04:00
parent 3ebbe96786
commit b1a23a13d6
9 changed files with 32 additions and 9 deletions

View file

@ -270,7 +270,7 @@ public abstract class SamlAuthenticator {
if (attributeValues != null) { if (attributeValues != null) {
for (Object attrValue : attributeValues) { for (Object attrValue : attributeValues) {
String role = getAttributeValue(attrValue); String role = getAttributeValue(attrValue);
log.info("Add role: " + role); log.debugv("Add role: {0}", role);
roles.add(role); roles.add(role);
} }
} }

View file

@ -179,7 +179,7 @@ public abstract class AbstractSamlAuthenticatorValve extends FormAuthenticator i
} }
protected boolean authenticateInternal(Request request, HttpServletResponse response, Object loginConfig) throws IOException { protected boolean authenticateInternal(Request request, HttpServletResponse response, Object loginConfig) throws IOException {
log.info("authenticateInternal"); log.fine("authenticateInternal");
CatalinaHttpFacade facade = new CatalinaHttpFacade(response, request); CatalinaHttpFacade facade = new CatalinaHttpFacade(response, request);
SamlDeployment deployment = deploymentContext.resolveDeployment(facade); SamlDeployment deployment = deploymentContext.resolveDeployment(facade);
if (deployment == null || !deployment.isConfigured()) { if (deployment == null || !deployment.isConfigured()) {

View file

@ -26,10 +26,6 @@
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId> <artifactId>keycloak-admin-client</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-jetty81-saml-adapter</artifactId>
</dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
@ -110,6 +106,10 @@
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<artifactId>keycloak-undertow-adapter</artifactId> <artifactId>keycloak-undertow-adapter</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-jetty81-saml-adapter</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<artifactId>keycloak-jetty81-adapter</artifactId> <artifactId>keycloak-jetty81-adapter</artifactId>

View file

@ -87,6 +87,7 @@ public class Jetty8Test {
public static void shutdownJetty() throws Exception { public static void shutdownJetty() throws Exception {
server.stop(); server.stop();
server.destroy(); server.destroy();
Thread.sleep(1000);
} }
@Rule @Rule

View file

@ -99,6 +99,7 @@ public class JettySamlTest {
public static void shutdownJetty() throws Exception { public static void shutdownJetty() throws Exception {
server.stop(); server.stop();
server.destroy(); server.destroy();
Thread.sleep(1000);
} }
@Test @Test

View file

@ -87,6 +87,7 @@ public class Jetty9Test {
public static void shutdownJetty() throws Exception { public static void shutdownJetty() throws Exception {
server.stop(); server.stop();
server.destroy(); server.destroy();
Thread.sleep(1000);
} }
@Rule @Rule

View file

@ -98,6 +98,7 @@ public class JettySamlTest {
public static void shutdownJetty() throws Exception { public static void shutdownJetty() throws Exception {
server.stop(); server.stop();
server.destroy(); server.destroy();
Thread.sleep(1000);
} }
@Test @Test

21
testsuite/jetty/pom.xml Executable file
View file

@ -0,0 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>keycloak-testsuite-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.6.0.Final-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Keycloak SAML Jetty Testsuite Integration</name>
<description/>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-jetty-testsuite-integration-pom</artifactId>
<packaging>pom</packaging>
<modules>
<module>jetty81</module>
<module>jetty91</module>
<module>jetty92</module>
</modules>
</project>

View file

@ -69,9 +69,7 @@
<module>tomcat6</module> <module>tomcat6</module>
<module>tomcat7</module> <module>tomcat7</module>
<module>tomcat8</module> <module>tomcat8</module>
<module>jetty/jetty81</module> <module>jetty</module>
<module>jetty/jetty92</module>
<module>jetty/jetty91</module>
<module>performance</module> <module>performance</module>
<!--<module>docker-cluster</module>--> <!--<module>docker-cluster</module>-->
</modules> </modules>