parent
3bcdb44d6a
commit
491b3262de
56 changed files with 6 additions and 2715 deletions
|
@ -88,21 +88,21 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-server</artifactId>
|
<artifactId>jetty-server</artifactId>
|
||||||
<version>${jetty92.version}</version>
|
<version>${jetty94.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-util</artifactId>
|
<artifactId>jetty-util</artifactId>
|
||||||
<version>${jetty92.version}</version>
|
<version>${jetty94.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-security</artifactId>
|
<artifactId>jetty-security</artifactId>
|
||||||
<version>${jetty92.version}</version>
|
<version>${jetty94.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ public abstract class AbstractKeycloakJettyAuthenticator extends LoginAuthentica
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserIdentity login(String username, Object credentials) {
|
public UserIdentity login(String username, Object credentials, ServletRequest var3) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,147 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>keycloak-jetty92-adapter</artifactId>
|
|
||||||
<name>Keycloak Jetty 9.2.x Integration</name>
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
|
||||||
<keycloak.osgi.export>
|
|
||||||
org.keycloak.adapters.jetty.*
|
|
||||||
</keycloak.osgi.export>
|
|
||||||
<keycloak.osgi.import>
|
|
||||||
org.eclipse.jetty.*;resolution:=optional,
|
|
||||||
javax.servlet.*;version="[3.0,4)";resolution:=optional,
|
|
||||||
org.keycloak.*;version="${project.version}",
|
|
||||||
*;resolution:=optional
|
|
||||||
</keycloak.osgi.import>
|
|
||||||
</properties>
|
|
||||||
<description />
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.logging</groupId>
|
|
||||||
<artifactId>jboss-logging</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-adapter-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpclient</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-databind</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
<version>${jetty92.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-util</artifactId>
|
|
||||||
<version>${jetty92.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-security</artifactId>
|
|
||||||
<version>${jetty92.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.felix</groupId>
|
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>bundle-manifest</id>
|
|
||||||
<phase>process-classes</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>manifest</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<instructions>
|
|
||||||
<Bundle-ClassPath>.</Bundle-ClassPath>
|
|
||||||
<Bundle-Name>${project.name}</Bundle-Name>
|
|
||||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
|
||||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
|
||||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
|
||||||
</instructions>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,47 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.keycloak.adapters.AdapterTokenStore;
|
|
||||||
import org.keycloak.adapters.KeycloakDeployment;
|
|
||||||
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
|
|
||||||
import org.keycloak.adapters.spi.HttpFacade;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class Jetty92RequestAuthenticator extends JettyRequestAuthenticator {
|
|
||||||
public Jetty92RequestAuthenticator(HttpFacade facade, KeycloakDeployment deployment, AdapterTokenStore tokenStore, int sslRedirectPort, Request request) {
|
|
||||||
super(facade, deployment, tokenStore, sslRedirectPort, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String changeHttpSessionId(boolean create) {
|
|
||||||
Request request = this.request;
|
|
||||||
HttpSession session = request.getSession(false);
|
|
||||||
if (session == null) {
|
|
||||||
return request.getSession(true).getId();
|
|
||||||
}
|
|
||||||
if (!deployment.isTurnOffChangeSessionIdOnLogin()) return request.changeSessionId();
|
|
||||||
else return session.getId();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.SessionManager;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettySessionManager;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class Jetty92SessionManager implements JettySessionManager {
|
|
||||||
protected SessionManager sessionManager;
|
|
||||||
|
|
||||||
public Jetty92SessionManager(SessionManager sessionManager) {
|
|
||||||
this.sessionManager = sessionManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HttpSession getHttpSession(String id) {
|
|
||||||
return sessionManager.getHttpSession(id);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,112 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.http.HttpMethod;
|
|
||||||
import org.eclipse.jetty.security.authentication.FormAuthenticator;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.eclipse.jetty.util.MultiMap;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
|
|
||||||
import org.keycloak.adapters.spi.AdapterSessionStore;
|
|
||||||
import org.keycloak.common.util.MultivaluedHashMap;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class JettyAdapterSessionStore implements AdapterSessionStore {
|
|
||||||
public static final String CACHED_FORM_PARAMETERS = "__CACHED_FORM_PARAMETERS";
|
|
||||||
protected Request myRequest;
|
|
||||||
|
|
||||||
public JettyAdapterSessionStore(Request request) {
|
|
||||||
this.myRequest = request; // for IDE/compilation purposes
|
|
||||||
}
|
|
||||||
|
|
||||||
protected MultiMap<String> extractFormParameters(Request base_request) {
|
|
||||||
MultiMap<String> formParameters = new MultiMap<String>();
|
|
||||||
base_request.extractFormParameters(formParameters);
|
|
||||||
return formParameters;
|
|
||||||
}
|
|
||||||
protected void restoreFormParameters(MultiMap<String> j_post, Request base_request) {
|
|
||||||
base_request.setContentParameters(j_post);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean restoreRequest() {
|
|
||||||
HttpSession session = myRequest.getSession(false);
|
|
||||||
if (session == null) return false;
|
|
||||||
synchronized (session) {
|
|
||||||
String j_uri = (String) session.getAttribute(FormAuthenticator.__J_URI);
|
|
||||||
if (j_uri != null) {
|
|
||||||
// check if the request is for the same url as the original and restore
|
|
||||||
// params if it was a post
|
|
||||||
StringBuffer buf = myRequest.getRequestURL();
|
|
||||||
if (myRequest.getQueryString() != null)
|
|
||||||
buf.append("?").append(myRequest.getQueryString());
|
|
||||||
if (j_uri.equals(buf.toString())) {
|
|
||||||
String method = (String)session.getAttribute(JettyHttpFacade.__J_METHOD);
|
|
||||||
myRequest.setMethod(HttpMethod.valueOf(method.toUpperCase()), method);
|
|
||||||
MultivaluedHashMap<String, String> j_post = (MultivaluedHashMap<String, String>) session.getAttribute(CACHED_FORM_PARAMETERS);
|
|
||||||
if (j_post != null) {
|
|
||||||
myRequest.setContentType("application/x-www-form-urlencoded");
|
|
||||||
MultiMap<String> map = new MultiMap<String>();
|
|
||||||
for (String key : j_post.keySet()) {
|
|
||||||
for (String val : j_post.getList(key)) {
|
|
||||||
map.add(key, val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
restoreFormParameters(map, myRequest);
|
|
||||||
}
|
|
||||||
session.removeAttribute(FormAuthenticator.__J_URI);
|
|
||||||
session.removeAttribute(JettyHttpFacade.__J_METHOD);
|
|
||||||
session.removeAttribute(FormAuthenticator.__J_POST);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void saveRequest() {
|
|
||||||
// remember the current URI
|
|
||||||
HttpSession session = myRequest.getSession();
|
|
||||||
synchronized (session) {
|
|
||||||
// But only if it is not set already, or we save every uri that leads to a login form redirect
|
|
||||||
if (session.getAttribute(FormAuthenticator.__J_URI) == null) {
|
|
||||||
StringBuffer buf = myRequest.getRequestURL();
|
|
||||||
if (myRequest.getQueryString() != null)
|
|
||||||
buf.append("?").append(myRequest.getQueryString());
|
|
||||||
session.setAttribute(FormAuthenticator.__J_URI, buf.toString());
|
|
||||||
session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod());
|
|
||||||
|
|
||||||
if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) {
|
|
||||||
MultiMap<String> formParameters = extractFormParameters(myRequest);
|
|
||||||
MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>();
|
|
||||||
for (String key : formParameters.keySet()) {
|
|
||||||
for (Object value : formParameters.getValues(key)) {
|
|
||||||
map.add(key, (String) value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
session.setAttribute(CACHED_FORM_PARAMETERS, map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,76 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Authentication;
|
|
||||||
import org.eclipse.jetty.server.HttpChannel;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.eclipse.jetty.server.UserIdentity;
|
|
||||||
import org.keycloak.adapters.AdapterTokenStore;
|
|
||||||
import org.keycloak.adapters.KeycloakDeployment;
|
|
||||||
import org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator;
|
|
||||||
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
|
|
||||||
import org.keycloak.adapters.jetty.core.JettySessionTokenStore;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
|
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class KeycloakJettyAuthenticator extends AbstractKeycloakJettyAuthenticator {
|
|
||||||
|
|
||||||
public KeycloakJettyAuthenticator() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Request resolveRequest(ServletRequest req) {
|
|
||||||
return (req instanceof Request) ? (Request)req : HttpChannel.getCurrentHttpChannel().getRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Authentication createAuthentication(UserIdentity userIdentity, Request request) {
|
|
||||||
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
|
|
||||||
@Override
|
|
||||||
public void logout() {
|
|
||||||
logoutCurrent(HttpChannel.getCurrentHttpChannel().getRequest());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdapterTokenStore createSessionTokenStore(Request request, KeycloakDeployment resolvedDeployment) {
|
|
||||||
return new JettySessionTokenStore(request, resolvedDeployment, new JettyAdapterSessionStore(request));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JettyUserSessionManagement createSessionManagement(Request request) {
|
|
||||||
return new JettyUserSessionManagement(new Jetty92SessionManager(request.getSessionManager()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected JettyRequestAuthenticator createRequestAuthenticator(Request request, JettyHttpFacade facade,
|
|
||||||
KeycloakDeployment deployment, AdapterTokenStore tokenStore) {
|
|
||||||
return new Jetty92RequestAuthenticator(facade, deployment, tokenStore, -1, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,145 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>keycloak-jetty93-adapter</artifactId>
|
|
||||||
<name>Keycloak Jetty 9.3.x Integration</name>
|
|
||||||
<properties>
|
|
||||||
<keycloak.osgi.export>
|
|
||||||
org.keycloak.adapters.jetty.*
|
|
||||||
</keycloak.osgi.export>
|
|
||||||
<keycloak.osgi.import>
|
|
||||||
org.eclipse.jetty.*;resolution:=optional,
|
|
||||||
javax.servlet.*;version="[3.0,4)";resolution:=optional,
|
|
||||||
org.keycloak.*;version="${project.version}",
|
|
||||||
*;resolution:=optional
|
|
||||||
</keycloak.osgi.import>
|
|
||||||
</properties>
|
|
||||||
<description />
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.logging</groupId>
|
|
||||||
<artifactId>jboss-logging</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-adapter-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpclient</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-databind</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
<version>${jetty93.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-util</artifactId>
|
|
||||||
<version>${jetty93.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-security</artifactId>
|
|
||||||
<version>${jetty93.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.felix</groupId>
|
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>bundle-manifest</id>
|
|
||||||
<phase>process-classes</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>manifest</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<instructions>
|
|
||||||
<Bundle-ClassPath>.</Bundle-ClassPath>
|
|
||||||
<Bundle-Name>${project.name}</Bundle-Name>
|
|
||||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
|
||||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
|
||||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
|
||||||
</instructions>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,47 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.keycloak.adapters.AdapterTokenStore;
|
|
||||||
import org.keycloak.adapters.KeycloakDeployment;
|
|
||||||
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
|
|
||||||
import org.keycloak.adapters.spi.HttpFacade;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class Jetty93RequestAuthenticator extends JettyRequestAuthenticator {
|
|
||||||
public Jetty93RequestAuthenticator(HttpFacade facade, KeycloakDeployment deployment, AdapterTokenStore tokenStore, int sslRedirectPort, Request request) {
|
|
||||||
super(facade, deployment, tokenStore, sslRedirectPort, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String changeHttpSessionId(boolean create) {
|
|
||||||
Request request = this.request;
|
|
||||||
HttpSession session = request.getSession(false);
|
|
||||||
if (session == null) {
|
|
||||||
return request.getSession(true).getId();
|
|
||||||
}
|
|
||||||
if (!deployment.isTurnOffChangeSessionIdOnLogin()) return request.changeSessionId();
|
|
||||||
else return session.getId();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.SessionManager;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettySessionManager;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class Jetty93SessionManager implements JettySessionManager {
|
|
||||||
protected SessionManager sessionManager;
|
|
||||||
|
|
||||||
public Jetty93SessionManager(SessionManager sessionManager) {
|
|
||||||
this.sessionManager = sessionManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HttpSession getHttpSession(String id) {
|
|
||||||
return sessionManager.getHttpSession(id);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,111 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.security.authentication.FormAuthenticator;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.eclipse.jetty.util.MultiMap;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
|
|
||||||
import org.keycloak.adapters.spi.AdapterSessionStore;
|
|
||||||
import org.keycloak.common.util.MultivaluedHashMap;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class JettyAdapterSessionStore implements AdapterSessionStore {
|
|
||||||
public static final String CACHED_FORM_PARAMETERS = "__CACHED_FORM_PARAMETERS";
|
|
||||||
protected Request myRequest;
|
|
||||||
|
|
||||||
public JettyAdapterSessionStore(Request request) {
|
|
||||||
this.myRequest = request; // for IDE/compilation purposes
|
|
||||||
}
|
|
||||||
|
|
||||||
protected MultiMap<String> extractFormParameters(Request base_request) {
|
|
||||||
MultiMap<String> formParameters = new MultiMap<String>();
|
|
||||||
base_request.extractFormParameters(formParameters);
|
|
||||||
return formParameters;
|
|
||||||
}
|
|
||||||
protected void restoreFormParameters(MultiMap<String> j_post, Request base_request) {
|
|
||||||
base_request.setContentParameters(j_post);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean restoreRequest() {
|
|
||||||
HttpSession session = myRequest.getSession(false);
|
|
||||||
if (session == null) return false;
|
|
||||||
synchronized (session) {
|
|
||||||
String j_uri = (String) session.getAttribute(FormAuthenticator.__J_URI);
|
|
||||||
if (j_uri != null) {
|
|
||||||
// check if the request is for the same url as the original and restore
|
|
||||||
// params if it was a post
|
|
||||||
StringBuffer buf = myRequest.getRequestURL();
|
|
||||||
if (myRequest.getQueryString() != null)
|
|
||||||
buf.append("?").append(myRequest.getQueryString());
|
|
||||||
if (j_uri.equals(buf.toString())) {
|
|
||||||
String method = (String)session.getAttribute(JettyHttpFacade.__J_METHOD);
|
|
||||||
myRequest.setMethod(method);
|
|
||||||
MultivaluedHashMap<String, String> j_post = (MultivaluedHashMap<String, String>) session.getAttribute(CACHED_FORM_PARAMETERS);
|
|
||||||
if (j_post != null) {
|
|
||||||
myRequest.setContentType("application/x-www-form-urlencoded");
|
|
||||||
MultiMap<String> map = new MultiMap<String>();
|
|
||||||
for (String key : j_post.keySet()) {
|
|
||||||
for (String val : j_post.getList(key)) {
|
|
||||||
map.add(key, val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
restoreFormParameters(map, myRequest);
|
|
||||||
}
|
|
||||||
session.removeAttribute(FormAuthenticator.__J_URI);
|
|
||||||
session.removeAttribute(JettyHttpFacade.__J_METHOD);
|
|
||||||
session.removeAttribute(FormAuthenticator.__J_POST);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void saveRequest() {
|
|
||||||
// remember the current URI
|
|
||||||
HttpSession session = myRequest.getSession();
|
|
||||||
synchronized (session) {
|
|
||||||
// But only if it is not set already, or we save every uri that leads to a login form redirect
|
|
||||||
if (session.getAttribute(FormAuthenticator.__J_URI) == null) {
|
|
||||||
StringBuffer buf = myRequest.getRequestURL();
|
|
||||||
if (myRequest.getQueryString() != null)
|
|
||||||
buf.append("?").append(myRequest.getQueryString());
|
|
||||||
session.setAttribute(FormAuthenticator.__J_URI, buf.toString());
|
|
||||||
session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod());
|
|
||||||
|
|
||||||
if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) {
|
|
||||||
MultiMap<String> formParameters = extractFormParameters(myRequest);
|
|
||||||
MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>();
|
|
||||||
for (String key : formParameters.keySet()) {
|
|
||||||
for (Object value : formParameters.getValues(key)) {
|
|
||||||
map.add(key, (String) value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
session.setAttribute(CACHED_FORM_PARAMETERS, map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,75 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Authentication;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.eclipse.jetty.server.UserIdentity;
|
|
||||||
import org.keycloak.adapters.AdapterTokenStore;
|
|
||||||
import org.keycloak.adapters.KeycloakDeployment;
|
|
||||||
import org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator;
|
|
||||||
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
|
|
||||||
import org.keycloak.adapters.jetty.core.JettySessionTokenStore;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
|
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class KeycloakJettyAuthenticator extends AbstractKeycloakJettyAuthenticator {
|
|
||||||
|
|
||||||
public KeycloakJettyAuthenticator() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Request resolveRequest(ServletRequest req) {
|
|
||||||
return Request.getBaseRequest(req);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Authentication createAuthentication(UserIdentity userIdentity, final Request request) {
|
|
||||||
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
|
|
||||||
@Override
|
|
||||||
public void logout() {
|
|
||||||
logoutCurrent(request);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdapterTokenStore createSessionTokenStore(Request request, KeycloakDeployment resolvedDeployment) {
|
|
||||||
return new JettySessionTokenStore(request, resolvedDeployment, new JettyAdapterSessionStore(request));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JettyUserSessionManagement createSessionManagement(Request request) {
|
|
||||||
return new JettyUserSessionManagement(new Jetty93SessionManager(request.getSessionManager()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected JettyRequestAuthenticator createRequestAuthenticator(Request request, JettyHttpFacade facade,
|
|
||||||
KeycloakDeployment deployment, AdapterTokenStore tokenStore) {
|
|
||||||
return new Jetty93RequestAuthenticator(facade, deployment, tokenStore, -1, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -32,8 +32,6 @@
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>jetty-core</module>
|
<module>jetty-core</module>
|
||||||
<module>jetty9.2</module>
|
|
||||||
<module>jetty9.3</module>
|
|
||||||
<module>jetty9.4</module>
|
<module>jetty9.4</module>
|
||||||
</modules>
|
</modules>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,155 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>keycloak-saml-jetty92-adapter</artifactId>
|
|
||||||
<name>Keycloak Jetty 9.2.x SAML Integration</name>
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
|
||||||
|
|
||||||
<jetty9.version>9.2.4.v20141103</jetty9.version>
|
|
||||||
<keycloak.osgi.export>
|
|
||||||
org.keycloak.adapters.jetty.*
|
|
||||||
</keycloak.osgi.export>
|
|
||||||
<keycloak.osgi.import>
|
|
||||||
org.eclipse.jetty.*;resolution:=optional,
|
|
||||||
javax.servlet.*;version="[3.0,4)";resolution:=optional,
|
|
||||||
org.keycloak.*;version="${project.version}",
|
|
||||||
*;resolution:=optional
|
|
||||||
</keycloak.osgi.import>
|
|
||||||
</properties>
|
|
||||||
<description />
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.logging</groupId>
|
|
||||||
<artifactId>jboss-logging</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-adapter-api-public</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-adapter-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-adapter-spi</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty-adapter-core</artifactId>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-util</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-security</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
<version>${jetty9.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-util</artifactId>
|
|
||||||
<version>${jetty9.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-security</artifactId>
|
|
||||||
<version>${jetty9.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.felix</groupId>
|
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>bundle-manifest</id>
|
|
||||||
<phase>process-classes</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>manifest</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<instructions>
|
|
||||||
<Bundle-ClassPath>.</Bundle-ClassPath>
|
|
||||||
<Bundle-Name>${project.name}</Bundle-Name>
|
|
||||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
|
||||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
|
||||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
|
||||||
</instructions>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,44 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
|
|
||||||
import org.keycloak.adapters.saml.SamlDeployment;
|
|
||||||
import org.keycloak.adapters.spi.AdapterSessionStore;
|
|
||||||
import org.keycloak.adapters.spi.HttpFacade;
|
|
||||||
import org.keycloak.adapters.spi.SessionIdMapper;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class Jetty9SamlSessionStore extends JettySamlSessionStore {
|
|
||||||
public Jetty9SamlSessionStore(Request request, AdapterSessionStore sessionStore, HttpFacade facade, SessionIdMapper idMapper, JettyUserSessionManagement sessionManagement, SamlDeployment deployment) {
|
|
||||||
super(request, sessionStore, facade, idMapper, sessionManagement, deployment);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String changeSessionId(HttpSession session) {
|
|
||||||
Request request = this.request;
|
|
||||||
if (!deployment.turnOffChangeSessionIdOnLogin()) return request.changeSessionId();
|
|
||||||
else return session.getId();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.SessionManager;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettySessionManager;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class Jetty9SessionManager implements JettySessionManager {
|
|
||||||
protected SessionManager sessionManager;
|
|
||||||
|
|
||||||
public Jetty9SessionManager(SessionManager sessionManager) {
|
|
||||||
this.sessionManager = sessionManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HttpSession getHttpSession(String id) {
|
|
||||||
return sessionManager.getHttpSession(id);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,112 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.http.HttpMethod;
|
|
||||||
import org.eclipse.jetty.security.authentication.FormAuthenticator;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.eclipse.jetty.util.MultiMap;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
|
|
||||||
import org.keycloak.adapters.spi.AdapterSessionStore;
|
|
||||||
import org.keycloak.common.util.MultivaluedHashMap;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class JettyAdapterSessionStore implements AdapterSessionStore {
|
|
||||||
public static final String CACHED_FORM_PARAMETERS = "__CACHED_FORM_PARAMETERS";
|
|
||||||
protected Request myRequest;
|
|
||||||
|
|
||||||
public JettyAdapterSessionStore(Request request) {
|
|
||||||
this.myRequest = request; // for IDE/compilation purposes
|
|
||||||
}
|
|
||||||
|
|
||||||
protected MultiMap<String> extractFormParameters(Request base_request) {
|
|
||||||
MultiMap<String> formParameters = new MultiMap<String>();
|
|
||||||
base_request.extractFormParameters(formParameters);
|
|
||||||
return formParameters;
|
|
||||||
}
|
|
||||||
protected void restoreFormParameters(MultiMap<String> j_post, Request base_request) {
|
|
||||||
base_request.setContentParameters(j_post);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean restoreRequest() {
|
|
||||||
HttpSession session = myRequest.getSession(false);
|
|
||||||
if (session == null) return false;
|
|
||||||
synchronized (session) {
|
|
||||||
String j_uri = (String) session.getAttribute(FormAuthenticator.__J_URI);
|
|
||||||
if (j_uri != null) {
|
|
||||||
// check if the request is for the same url as the original and restore
|
|
||||||
// params if it was a post
|
|
||||||
StringBuffer buf = myRequest.getRequestURL();
|
|
||||||
if (myRequest.getQueryString() != null)
|
|
||||||
buf.append("?").append(myRequest.getQueryString());
|
|
||||||
if (j_uri.equals(buf.toString())) {
|
|
||||||
String method = (String)session.getAttribute(JettyHttpFacade.__J_METHOD);
|
|
||||||
myRequest.setMethod(HttpMethod.valueOf(method.toUpperCase()), method);
|
|
||||||
MultivaluedHashMap<String, String> j_post = (MultivaluedHashMap<String, String>) session.getAttribute(CACHED_FORM_PARAMETERS);
|
|
||||||
if (j_post != null) {
|
|
||||||
myRequest.setContentType("application/x-www-form-urlencoded");
|
|
||||||
MultiMap<String> map = new MultiMap<String>();
|
|
||||||
for (String key : j_post.keySet()) {
|
|
||||||
for (String val : j_post.getList(key)) {
|
|
||||||
map.add(key, val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
restoreFormParameters(map, myRequest);
|
|
||||||
}
|
|
||||||
session.removeAttribute(FormAuthenticator.__J_URI);
|
|
||||||
session.removeAttribute(JettyHttpFacade.__J_METHOD);
|
|
||||||
session.removeAttribute(FormAuthenticator.__J_POST);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void saveRequest() {
|
|
||||||
// remember the current URI
|
|
||||||
HttpSession session = myRequest.getSession();
|
|
||||||
synchronized (session) {
|
|
||||||
// But only if it is not set already, or we save every uri that leads to a login form redirect
|
|
||||||
if (session.getAttribute(FormAuthenticator.__J_URI) == null) {
|
|
||||||
StringBuffer buf = myRequest.getRequestURL();
|
|
||||||
if (myRequest.getQueryString() != null)
|
|
||||||
buf.append("?").append(myRequest.getQueryString());
|
|
||||||
session.setAttribute(FormAuthenticator.__J_URI, buf.toString());
|
|
||||||
session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod());
|
|
||||||
|
|
||||||
if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) {
|
|
||||||
MultiMap<String> formParameters = extractFormParameters(myRequest);
|
|
||||||
MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>();
|
|
||||||
for (String key : formParameters.keySet()) {
|
|
||||||
for (Object value : formParameters.getValues(key)) {
|
|
||||||
map.add(key, (String) value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
session.setAttribute(CACHED_FORM_PARAMETERS, map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,73 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Authentication;
|
|
||||||
import org.eclipse.jetty.server.HttpChannel;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.eclipse.jetty.server.UserIdentity;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
|
|
||||||
import org.keycloak.adapters.saml.SamlDeployment;
|
|
||||||
import org.keycloak.adapters.spi.AdapterSessionStore;
|
|
||||||
import org.keycloak.adapters.spi.HttpFacade;
|
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class KeycloakSamlAuthenticator extends AbstractSamlAuthenticator {
|
|
||||||
|
|
||||||
public KeycloakSamlAuthenticator() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Request resolveRequest(ServletRequest req) {
|
|
||||||
return (req instanceof Request) ? (Request)req : HttpChannel.getCurrentHttpChannel().getRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Authentication createAuthentication(UserIdentity userIdentity, Request request) {
|
|
||||||
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
|
|
||||||
@Override
|
|
||||||
public void logout() {
|
|
||||||
logoutCurrent(HttpChannel.getCurrentHttpChannel().getRequest());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdapterSessionStore createSessionTokenStore(Request request, SamlDeployment resolvedDeployment) {
|
|
||||||
return new JettyAdapterSessionStore(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JettyUserSessionManagement createSessionManagement(Request request) {
|
|
||||||
return new JettyUserSessionManagement(new Jetty9SessionManager(request.getSessionManager()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected JettySamlSessionStore createJettySamlSessionStore(Request request, HttpFacade facade, SamlDeployment resolvedDeployment) {
|
|
||||||
JettySamlSessionStore store;
|
|
||||||
store = new Jetty9SamlSessionStore(request, createSessionTokenStore(request, resolvedDeployment), facade, idMapper, createSessionManagement(request), resolvedDeployment);
|
|
||||||
return store;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,151 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>keycloak-saml-jetty93-adapter</artifactId>
|
|
||||||
<name>Keycloak Jetty 9.3.x SAML Integration</name>
|
|
||||||
<properties>
|
|
||||||
<jetty9.version>9.3.29.v20201019</jetty9.version>
|
|
||||||
<keycloak.osgi.export>
|
|
||||||
org.keycloak.adapters.jetty.*
|
|
||||||
</keycloak.osgi.export>
|
|
||||||
<keycloak.osgi.import>
|
|
||||||
org.eclipse.jetty.*;resolution:=optional,
|
|
||||||
javax.servlet.*;version="[3.0,4)";resolution:=optional,
|
|
||||||
org.keycloak.*;version="${project.version}",
|
|
||||||
*;resolution:=optional
|
|
||||||
</keycloak.osgi.import>
|
|
||||||
</properties>
|
|
||||||
<description />
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.logging</groupId>
|
|
||||||
<artifactId>jboss-logging</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-adapter-api-public</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-adapter-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-adapter-spi</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty-adapter-core</artifactId>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-util</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-security</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
<version>${jetty9.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-util</artifactId>
|
|
||||||
<version>${jetty9.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-security</artifactId>
|
|
||||||
<version>${jetty9.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.felix</groupId>
|
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>bundle-manifest</id>
|
|
||||||
<phase>process-classes</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>manifest</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<instructions>
|
|
||||||
<Bundle-ClassPath>.</Bundle-ClassPath>
|
|
||||||
<Bundle-Name>${project.name}</Bundle-Name>
|
|
||||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
|
||||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
|
||||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
|
||||||
</instructions>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,44 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
|
|
||||||
import org.keycloak.adapters.saml.SamlDeployment;
|
|
||||||
import org.keycloak.adapters.spi.AdapterSessionStore;
|
|
||||||
import org.keycloak.adapters.spi.HttpFacade;
|
|
||||||
import org.keycloak.adapters.spi.SessionIdMapper;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class Jetty9SamlSessionStore extends JettySamlSessionStore {
|
|
||||||
public Jetty9SamlSessionStore(Request request, AdapterSessionStore sessionStore, HttpFacade facade, SessionIdMapper idMapper, JettyUserSessionManagement sessionManagement, SamlDeployment deployment) {
|
|
||||||
super(request, sessionStore, facade, idMapper, sessionManagement, deployment);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String changeSessionId(HttpSession session) {
|
|
||||||
Request request = this.request;
|
|
||||||
if (!deployment.turnOffChangeSessionIdOnLogin()) return request.changeSessionId();
|
|
||||||
else return session.getId();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.SessionManager;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettySessionManager;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class Jetty9SessionManager implements JettySessionManager {
|
|
||||||
protected SessionManager sessionManager;
|
|
||||||
|
|
||||||
public Jetty9SessionManager(SessionManager sessionManager) {
|
|
||||||
this.sessionManager = sessionManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HttpSession getHttpSession(String id) {
|
|
||||||
return sessionManager.getHttpSession(id);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,111 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.security.authentication.FormAuthenticator;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.eclipse.jetty.util.MultiMap;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
|
|
||||||
import org.keycloak.adapters.spi.AdapterSessionStore;
|
|
||||||
import org.keycloak.common.util.MultivaluedHashMap;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class JettyAdapterSessionStore implements AdapterSessionStore {
|
|
||||||
public static final String CACHED_FORM_PARAMETERS = "__CACHED_FORM_PARAMETERS";
|
|
||||||
protected Request myRequest;
|
|
||||||
|
|
||||||
public JettyAdapterSessionStore(Request request) {
|
|
||||||
this.myRequest = request; // for IDE/compilation purposes
|
|
||||||
}
|
|
||||||
|
|
||||||
protected MultiMap<String> extractFormParameters(Request base_request) {
|
|
||||||
MultiMap<String> formParameters = new MultiMap<String>();
|
|
||||||
base_request.extractFormParameters(formParameters);
|
|
||||||
return formParameters;
|
|
||||||
}
|
|
||||||
protected void restoreFormParameters(MultiMap<String> j_post, Request base_request) {
|
|
||||||
base_request.setContentParameters(j_post);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean restoreRequest() {
|
|
||||||
HttpSession session = myRequest.getSession(false);
|
|
||||||
if (session == null) return false;
|
|
||||||
synchronized (session) {
|
|
||||||
String j_uri = (String) session.getAttribute(FormAuthenticator.__J_URI);
|
|
||||||
if (j_uri != null) {
|
|
||||||
// check if the request is for the same url as the original and restore
|
|
||||||
// params if it was a post
|
|
||||||
StringBuffer buf = myRequest.getRequestURL();
|
|
||||||
if (myRequest.getQueryString() != null)
|
|
||||||
buf.append("?").append(myRequest.getQueryString());
|
|
||||||
if (j_uri.equals(buf.toString())) {
|
|
||||||
String method = (String)session.getAttribute(JettyHttpFacade.__J_METHOD);
|
|
||||||
myRequest.setMethod(method);
|
|
||||||
MultivaluedHashMap<String, String> j_post = (MultivaluedHashMap<String, String>) session.getAttribute(CACHED_FORM_PARAMETERS);
|
|
||||||
if (j_post != null) {
|
|
||||||
myRequest.setContentType("application/x-www-form-urlencoded");
|
|
||||||
MultiMap<String> map = new MultiMap<String>();
|
|
||||||
for (String key : j_post.keySet()) {
|
|
||||||
for (String val : j_post.getList(key)) {
|
|
||||||
map.add(key, val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
restoreFormParameters(map, myRequest);
|
|
||||||
}
|
|
||||||
session.removeAttribute(FormAuthenticator.__J_URI);
|
|
||||||
session.removeAttribute(JettyHttpFacade.__J_METHOD);
|
|
||||||
session.removeAttribute(FormAuthenticator.__J_POST);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void saveRequest() {
|
|
||||||
// remember the current URI
|
|
||||||
HttpSession session = myRequest.getSession();
|
|
||||||
synchronized (session) {
|
|
||||||
// But only if it is not set already, or we save every uri that leads to a login form redirect
|
|
||||||
if (session.getAttribute(FormAuthenticator.__J_URI) == null) {
|
|
||||||
StringBuffer buf = myRequest.getRequestURL();
|
|
||||||
if (myRequest.getQueryString() != null)
|
|
||||||
buf.append("?").append(myRequest.getQueryString());
|
|
||||||
session.setAttribute(FormAuthenticator.__J_URI, buf.toString());
|
|
||||||
session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod());
|
|
||||||
|
|
||||||
if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) {
|
|
||||||
MultiMap<String> formParameters = extractFormParameters(myRequest);
|
|
||||||
MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>();
|
|
||||||
for (String key : formParameters.keySet()) {
|
|
||||||
for (Object value : formParameters.getValues(key)) {
|
|
||||||
map.add(key, (String) value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
session.setAttribute(CACHED_FORM_PARAMETERS, map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,72 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
* and other contributors as indicated by the @author tags.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Authentication;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
|
||||||
import org.eclipse.jetty.server.UserIdentity;
|
|
||||||
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
|
|
||||||
import org.keycloak.adapters.saml.SamlDeployment;
|
|
||||||
import org.keycloak.adapters.spi.AdapterSessionStore;
|
|
||||||
import org.keycloak.adapters.spi.HttpFacade;
|
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class KeycloakSamlAuthenticator extends AbstractSamlAuthenticator {
|
|
||||||
|
|
||||||
public KeycloakSamlAuthenticator() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Request resolveRequest(ServletRequest req) {
|
|
||||||
return Request.getBaseRequest(req);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Authentication createAuthentication(UserIdentity userIdentity, final Request request) {
|
|
||||||
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
|
|
||||||
@Override
|
|
||||||
public void logout() {
|
|
||||||
logoutCurrent(request);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AdapterSessionStore createSessionTokenStore(Request request, SamlDeployment resolvedDeployment) {
|
|
||||||
return new JettyAdapterSessionStore(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JettyUserSessionManagement createSessionManagement(Request request) {
|
|
||||||
return new JettyUserSessionManagement(new Jetty9SessionManager(request.getSessionManager()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected JettySamlSessionStore createJettySamlSessionStore(Request request, HttpFacade facade, SamlDeployment resolvedDeployment) {
|
|
||||||
JettySamlSessionStore store;
|
|
||||||
store = new Jetty9SamlSessionStore(request, createSessionTokenStore(request, resolvedDeployment), facade, idMapper, createSessionManagement(request), resolvedDeployment);
|
|
||||||
return store;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -32,8 +32,6 @@
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>jetty-core</module>
|
<module>jetty-core</module>
|
||||||
<module>jetty9.2</module>
|
|
||||||
<module>jetty9.3</module>
|
|
||||||
<module>jetty9.4</module>
|
<module>jetty9.4</module>
|
||||||
</modules>
|
</modules>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -64,16 +64,6 @@
|
||||||
<artifactId>keycloak-tomcat-adapter</artifactId>
|
<artifactId>keycloak-tomcat-adapter</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty92-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty93-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-undertow-adapter</artifactId>
|
<artifactId>keycloak-undertow-adapter</artifactId>
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<assembly>
|
|
||||||
<id>war-dist</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory></directory>
|
|
||||||
<includes>
|
|
||||||
<include>keycloak.mod</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory>modules</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/modules</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
<dependencySets>
|
|
||||||
<dependencySet>
|
|
||||||
<unpack>false</unpack>
|
|
||||||
<useTransitiveDependencies>true</useTransitiveDependencies>
|
|
||||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
|
||||||
<includes>
|
|
||||||
<include>org.keycloak:keycloak-jetty92-adapter</include>
|
|
||||||
</includes>
|
|
||||||
<excludes>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-server</exclude>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-util</exclude>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-security</exclude>
|
|
||||||
</excludes>
|
|
||||||
<outputDirectory>lib/keycloak</outputDirectory>
|
|
||||||
</dependencySet>
|
|
||||||
</dependencySets>
|
|
||||||
</assembly>
|
|
|
@ -1,28 +0,0 @@
|
||||||
#
|
|
||||||
# Keycloak Jetty Adapter
|
|
||||||
#
|
|
||||||
|
|
||||||
[depend]
|
|
||||||
server
|
|
||||||
security
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
lib/keycloak/*.jar
|
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>keycloak-jetty92-adapter-dist</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>Keycloak Jetty 9.2.x Adapter Distro</name>
|
|
||||||
<description/>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty92-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>assemble</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>assembly.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
<outputDirectory>
|
|
||||||
target
|
|
||||||
</outputDirectory>
|
|
||||||
<workDirectory>
|
|
||||||
target/assembly/work
|
|
||||||
</workDirectory>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,56 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<assembly>
|
|
||||||
<id>war-dist</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory></directory>
|
|
||||||
<includes>
|
|
||||||
<include>keycloak.mod</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory>modules</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/modules</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
<dependencySets>
|
|
||||||
<dependencySet>
|
|
||||||
<unpack>false</unpack>
|
|
||||||
<useTransitiveDependencies>true</useTransitiveDependencies>
|
|
||||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
|
||||||
<includes>
|
|
||||||
<include>org.keycloak:keycloak-jetty93-adapter</include>
|
|
||||||
</includes>
|
|
||||||
<excludes>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-server</exclude>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-util</exclude>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-security</exclude>
|
|
||||||
</excludes>
|
|
||||||
<outputDirectory>lib/keycloak</outputDirectory>
|
|
||||||
</dependencySet>
|
|
||||||
</dependencySets>
|
|
||||||
</assembly>
|
|
|
@ -1,28 +0,0 @@
|
||||||
#
|
|
||||||
# Keycloak Jetty Adapter
|
|
||||||
#
|
|
||||||
|
|
||||||
[depend]
|
|
||||||
server
|
|
||||||
security
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
lib/keycloak/*.jar
|
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>keycloak-jetty93-adapter-dist</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>Keycloak Jetty 9.3.x Adapter Distro</name>
|
|
||||||
<description/>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty93-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>assemble</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>assembly.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
<outputDirectory>
|
|
||||||
target
|
|
||||||
</outputDirectory>
|
|
||||||
<workDirectory>
|
|
||||||
target/assembly/work
|
|
||||||
</workDirectory>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -45,8 +45,6 @@
|
||||||
</activation>
|
</activation>
|
||||||
<modules>
|
<modules>
|
||||||
<module>tomcat-adapter-zip</module>
|
<module>tomcat-adapter-zip</module>
|
||||||
<module>jetty92-adapter-zip</module>
|
|
||||||
<module>jetty93-adapter-zip</module>
|
|
||||||
<module>jetty94-adapter-zip</module>
|
<module>jetty94-adapter-zip</module>
|
||||||
<module>js-adapter-npm-zip</module>
|
<module>js-adapter-npm-zip</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
|
@ -3,15 +3,11 @@
|
||||||
keycloak-quarkus-dist:keycloak
|
keycloak-quarkus-dist:keycloak
|
||||||
keycloak-api-docs-dist:keycloak-api-docs
|
keycloak-api-docs-dist:keycloak-api-docs
|
||||||
|
|
||||||
keycloak-jetty92-adapter-dist:keycloak-oidc-jetty92-adapter
|
|
||||||
keycloak-jetty93-adapter-dist:keycloak-oidc-jetty93-adapter
|
|
||||||
keycloak-jetty94-adapter-dist:keycloak-oidc-jetty94-adapter
|
keycloak-jetty94-adapter-dist:keycloak-oidc-jetty94-adapter
|
||||||
keycloak-js-adapter-npm-dist:keycloak-oidc-js-adapter
|
keycloak-js-adapter-npm-dist:keycloak-oidc-js-adapter
|
||||||
keycloak-tomcat-adapter-dist:keycloak-oidc-tomcat-adapter
|
keycloak-tomcat-adapter-dist:keycloak-oidc-tomcat-adapter
|
||||||
keycloak-wildfly-adapter-dist:keycloak-oidc-wildfly-adapter
|
keycloak-wildfly-adapter-dist:keycloak-oidc-wildfly-adapter
|
||||||
|
|
||||||
keycloak-saml-jetty92-adapter-dist:keycloak-saml-jetty92-adapter
|
|
||||||
keycloak-saml-jetty93-adapter-dist:keycloak-saml-jetty93-adapter
|
|
||||||
keycloak-saml-jetty94-adapter-dist:keycloak-saml-jetty94-adapter
|
keycloak-saml-jetty94-adapter-dist:keycloak-saml-jetty94-adapter
|
||||||
keycloak-saml-tomcat-adapter-dist:keycloak-saml-tomcat-adapter
|
keycloak-saml-tomcat-adapter-dist:keycloak-saml-tomcat-adapter
|
||||||
keycloak-saml-wildfly-adapter-dist:keycloak-saml-wildfly-adapter
|
keycloak-saml-wildfly-adapter-dist:keycloak-saml-wildfly-adapter
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<assembly>
|
|
||||||
<id>war-dist</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory></directory>
|
|
||||||
<includes>
|
|
||||||
<include>keycloak.mod</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory>modules</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/modules</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
<dependencySets>
|
|
||||||
<dependencySet>
|
|
||||||
<unpack>false</unpack>
|
|
||||||
<useTransitiveDependencies>true</useTransitiveDependencies>
|
|
||||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
|
||||||
<includes>
|
|
||||||
<include>org.keycloak:keycloak-saml-jetty92-adapter</include>
|
|
||||||
</includes>
|
|
||||||
<excludes>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-server</exclude>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-util</exclude>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-security</exclude>
|
|
||||||
</excludes>
|
|
||||||
<outputDirectory>lib/keycloak</outputDirectory>
|
|
||||||
</dependencySet>
|
|
||||||
</dependencySets>
|
|
||||||
</assembly>
|
|
|
@ -1,28 +0,0 @@
|
||||||
#
|
|
||||||
# Keycloak Jetty Adapter
|
|
||||||
#
|
|
||||||
|
|
||||||
[depend]
|
|
||||||
server
|
|
||||||
security
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
lib/keycloak/*.jar
|
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>keycloak-saml-jetty92-adapter-dist</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>Keycloak SAML Jetty 9.2.x Adapter Distro</name>
|
|
||||||
<description/>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty92-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>assemble</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>assembly.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
<outputDirectory>
|
|
||||||
target
|
|
||||||
</outputDirectory>
|
|
||||||
<workDirectory>
|
|
||||||
target/assembly/work
|
|
||||||
</workDirectory>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,56 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<assembly>
|
|
||||||
<id>war-dist</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory></directory>
|
|
||||||
<includes>
|
|
||||||
<include>keycloak.mod</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory>modules</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/modules</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
<dependencySets>
|
|
||||||
<dependencySet>
|
|
||||||
<unpack>false</unpack>
|
|
||||||
<useTransitiveDependencies>true</useTransitiveDependencies>
|
|
||||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
|
||||||
<includes>
|
|
||||||
<include>org.keycloak:keycloak-saml-jetty93-adapter</include>
|
|
||||||
</includes>
|
|
||||||
<excludes>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-server</exclude>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-util</exclude>
|
|
||||||
<exclude>org.eclipse.jetty:jetty-security</exclude>
|
|
||||||
</excludes>
|
|
||||||
<outputDirectory>lib/keycloak</outputDirectory>
|
|
||||||
</dependencySet>
|
|
||||||
</dependencySets>
|
|
||||||
</assembly>
|
|
|
@ -1,28 +0,0 @@
|
||||||
#
|
|
||||||
# Keycloak Jetty Adapter
|
|
||||||
#
|
|
||||||
|
|
||||||
[depend]
|
|
||||||
server
|
|
||||||
security
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
lib/keycloak/*.jar
|
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>keycloak-saml-jetty93-adapter-dist</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>Keycloak SAML Jetty 9.3.x Adapter Distro</name>
|
|
||||||
<description/>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty93-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>assemble</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>assembly.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
<outputDirectory>
|
|
||||||
target
|
|
||||||
</outputDirectory>
|
|
||||||
<workDirectory>
|
|
||||||
target/assembly/work
|
|
||||||
</workDirectory>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -43,8 +43,6 @@
|
||||||
</property>
|
</property>
|
||||||
</activation>
|
</activation>
|
||||||
<modules>
|
<modules>
|
||||||
<module>jetty92-adapter-zip</module>
|
|
||||||
<module>jetty93-adapter-zip</module>
|
|
||||||
<module>jetty94-adapter-zip</module>
|
<module>jetty94-adapter-zip</module>
|
||||||
<module>tomcat-adapter-zip</module>
|
<module>tomcat-adapter-zip</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
|
@ -623,8 +623,6 @@ _keycloakSpecificProperties = [
|
||||||
"resteasy.undertow.version",
|
"resteasy.undertow.version",
|
||||||
"owasp.html.sanitizer.version",
|
"owasp.html.sanitizer.version",
|
||||||
"sun.xml.ws.version",
|
"sun.xml.ws.version",
|
||||||
"jetty92.version",
|
|
||||||
"jetty93.version",
|
|
||||||
"jetty94.version",
|
"jetty94.version",
|
||||||
"ua-parser.version",
|
"ua-parser.version",
|
||||||
"version.com.openshift.openshift-restclient-java",
|
"version.com.openshift.openshift-restclient-java",
|
||||||
|
@ -720,7 +718,6 @@ _keycloakToWildflyProperties = {
|
||||||
"undertow.version" : "version.io.undertow",
|
"undertow.version" : "version.io.undertow",
|
||||||
"elytron.version" : "version.org.wildfly.security.elytron",
|
"elytron.version" : "version.org.wildfly.security.elytron",
|
||||||
"elytron.undertow-server.version" : "version.org.wildfly.security.elytron-web",
|
"elytron.undertow-server.version" : "version.org.wildfly.security.elytron-web",
|
||||||
# Skip "jetty92.version", "jetty93.version", and "jetty94.version" since Keycloak specific
|
|
||||||
"woodstox.version" : "version.org.codehaus.woodstox.woodstox-core",
|
"woodstox.version" : "version.org.codehaus.woodstox.woodstox-core",
|
||||||
"xmlsec.version" : "version.org.apache.santuario",
|
"xmlsec.version" : "version.org.apache.santuario",
|
||||||
"glassfish.json.version" : "version.org.glassfish.jakarta.json",
|
"glassfish.json.version" : "version.org.glassfish.jakarta.json",
|
||||||
|
|
48
pom.xml
48
pom.xml
|
@ -113,8 +113,6 @@
|
||||||
<undertow.version>2.2.5.Final</undertow.version>
|
<undertow.version>2.2.5.Final</undertow.version>
|
||||||
<elytron.version>1.18.3.Final</elytron.version>
|
<elytron.version>1.18.3.Final</elytron.version>
|
||||||
<elytron.undertow-server.version>1.9.0.Final</elytron.undertow-server.version>
|
<elytron.undertow-server.version>1.9.0.Final</elytron.undertow-server.version>
|
||||||
<jetty92.version>9.2.4.v20141103</jetty92.version>
|
|
||||||
<jetty93.version>9.3.29.v20201019</jetty93.version>
|
|
||||||
<jetty94.version>9.4.40.v20210413</jetty94.version>
|
<jetty94.version>9.4.40.v20210413</jetty94.version>
|
||||||
<woodstox.version>6.0.3</woodstox.version>
|
<woodstox.version>6.0.3</woodstox.version>
|
||||||
<xmlsec.version>2.2.3</xmlsec.version>
|
<xmlsec.version>2.2.3</xmlsec.version>
|
||||||
|
@ -136,7 +134,7 @@
|
||||||
<google.zxing.version>3.4.0</google.zxing.version>
|
<google.zxing.version>3.4.0</google.zxing.version>
|
||||||
<freemarker.version>2.3.31</freemarker.version>
|
<freemarker.version>2.3.31</freemarker.version>
|
||||||
|
|
||||||
<jetty9.version>${jetty92.version}</jetty9.version>
|
<jetty9.version>${jetty94.version}</jetty9.version>
|
||||||
<liquibase.version>4.8.0</liquibase.version>
|
<liquibase.version>4.8.0</liquibase.version>
|
||||||
<osgi.version>4.2.0</osgi.version>
|
<osgi.version>4.2.0</osgi.version>
|
||||||
<pax.web.version>7.1.0</pax.web.version>
|
<pax.web.version>7.1.0</pax.web.version>
|
||||||
|
@ -1128,16 +1126,6 @@
|
||||||
<artifactId>keycloak-jetty-core</artifactId>
|
<artifactId>keycloak-jetty-core</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty92-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty93-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-jetty94-adapter</artifactId>
|
<artifactId>keycloak-jetty94-adapter</artifactId>
|
||||||
|
@ -1338,16 +1326,6 @@
|
||||||
<artifactId>keycloak-saml-wildfly-subsystem</artifactId>
|
<artifactId>keycloak-saml-wildfly-subsystem</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty92-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty93-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-saml-jetty94-adapter</artifactId>
|
<artifactId>keycloak-saml-jetty94-adapter</artifactId>
|
||||||
|
@ -1494,18 +1472,6 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty92-adapter-dist</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty93-adapter-dist</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-jetty94-adapter-dist</artifactId>
|
<artifactId>keycloak-jetty94-adapter-dist</artifactId>
|
||||||
|
@ -1542,18 +1508,6 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty92-adapter-dist</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty93-adapter-dist</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-saml-jetty94-adapter-dist</artifactId>
|
<artifactId>keycloak-saml-jetty94-adapter-dist</artifactId>
|
||||||
|
|
|
@ -225,10 +225,9 @@ where ${HOST} is url of keycloak, for example: `keycloak-keycloak.192.168.42.91.
|
||||||
|
|
||||||
### Jetty
|
### Jetty
|
||||||
|
|
||||||
At the moment we can run the testsuite with Jetty `9.2` and `9.4`.
|
At the moment we can run the testsuite with Jetty `9.4`.
|
||||||
Each version has its corresponding profile:
|
Each version has its corresponding profile:
|
||||||
|
|
||||||
* Jetty `9.2`: `app-server-jetty92`
|
|
||||||
* Jetty `9.4`: `app-server-jetty94`
|
* Jetty `9.4`: `app-server-jetty94`
|
||||||
|
|
||||||
Here's how to run the tests with Jetty `9.4`:
|
Here's how to run the tests with Jetty `9.4`:
|
||||||
|
@ -367,8 +366,6 @@ mvn -f testsuite/integration-arquillian/tests/other/springboot-tests/pom.xml \
|
||||||
[-Pspringboot26]
|
[-Pspringboot26]
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** Spring Boot 2.x doesn't work with `jetty92` and `jetty93`, only `jetty94` is tested.
|
|
||||||
|
|
||||||
## Base UI tests
|
## Base UI tests
|
||||||
Similarly to Admin Console tests, these tests are focused on UI, specifically on the parts of the server that are accessed by an end user (like Login page, or Account Console).
|
Similarly to Admin Console tests, these tests are focused on UI, specifically on the parts of the server that are accessed by an end user (like Login page, or Account Console).
|
||||||
They are designed to work with mobile browsers (alongside the standard desktop browsers). For details on the supported browsers and their configuration please refer to [Different Browsers chapter](#different-browsers).
|
They are designed to work with mobile browsers (alongside the standard desktop browsers). For details on the supported browsers and their configuration please refer to [Different Browsers chapter](#different-browsers).
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!--
|
|
||||||
~ Copyright 2018 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
<parent>
|
|
||||||
<groupId>org.keycloak.testsuite</groupId>
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty</artifactId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty-92</artifactId>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak.testsuite</groupId>
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty-common</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty92-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty92-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.container</groupId>
|
|
||||||
<artifactId>arquillian-jetty-embedded-9</artifactId>
|
|
||||||
<version>${arquillian-jetty9-container.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- Server support -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
<version>${jetty92.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- Deployer support -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-deploy</artifactId>
|
|
||||||
<version>${jetty92.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- KeycloakJettyAuthenticator support -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-jaas</artifactId>
|
|
||||||
<version>${jetty92.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- Web application annotations support -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-annotations</artifactId>
|
|
||||||
<version>${jetty92.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak.testsuite</groupId>
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty-common</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<classifier>tests</classifier>
|
|
||||||
<type>test-jar</type>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<name>App Server - Jetty 9.2</name>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,5 +0,0 @@
|
||||||
package org.keycloak.testsuite.arquillian.jetty;
|
|
||||||
|
|
||||||
public class Jetty92AppServerTest extends AbstractJettyAppServerTest {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,87 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!--
|
|
||||||
~ Copyright 2018 Red Hat, Inc. and/or its affiliates
|
|
||||||
~ and other contributors as indicated by the @author tags.
|
|
||||||
~
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
<parent>
|
|
||||||
<groupId>org.keycloak.testsuite</groupId>
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty</artifactId>
|
|
||||||
<version>999-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty-93</artifactId>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak.testsuite</groupId>
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty-common</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty93-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-saml-jetty93-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.container</groupId>
|
|
||||||
<artifactId>arquillian-jetty-embedded-9</artifactId>
|
|
||||||
<version>${arquillian-jetty9-container.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- Server support -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
<version>${jetty93.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- Deployer support -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-deploy</artifactId>
|
|
||||||
<version>${jetty93.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- KeycloakJettyAuthenticator support -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-jaas</artifactId>
|
|
||||||
<version>${jetty93.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- Web application annotations support -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-annotations</artifactId>
|
|
||||||
<version>${jetty93.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak.testsuite</groupId>
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty-common</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<classifier>tests</classifier>
|
|
||||||
<type>test-jar</type>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<name>App Server - Jetty 9.3</name>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,5 +0,0 @@
|
||||||
package org.keycloak.testsuite.arquillian.jetty;
|
|
||||||
|
|
||||||
public class Jetty93AppServerTest extends AbstractJettyAppServerTest {
|
|
||||||
|
|
||||||
}
|
|
|
@ -42,32 +42,6 @@
|
||||||
<module>94</module>
|
<module>94</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
|
||||||
<id>app-server-jetty93</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>app.server</name>
|
|
||||||
<value>jetty93</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>common</module>
|
|
||||||
<module>93</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>app-server-jetty92</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>app.server</name>
|
|
||||||
<value>jetty92</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>common</module>
|
|
||||||
<module>92</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -124,69 +124,6 @@
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>spring-boot-adapter-jetty92</id>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<jetty.version>${jetty92.version}</jetty.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty92-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-jetty</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>spring-boot-adapter-jetty93</id>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<jetty.version>${jetty93.version}</jetty.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jetty93-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-jetty</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>spring-boot-adapter-jetty94</id>
|
<id>spring-boot-adapter-jetty94</id>
|
||||||
|
|
||||||
|
|
|
@ -486,64 +486,6 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
|
||||||
<id>app-server-jetty93</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>app.server</name>
|
|
||||||
<value>jetty93</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<properties>
|
|
||||||
<app.server>jetty93</app.server> <!--in case the profile is called directly-->
|
|
||||||
<app.server.skip.unpack>true</app.server.skip.unpack>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak.testsuite</groupId>
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty-93</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.commonjava.maven.plugins</groupId>
|
|
||||||
<artifactId>directory-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>app-server-jetty92</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>app.server</name>
|
|
||||||
<value>jetty92</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<properties>
|
|
||||||
<app.server>jetty92</app.server> <!--in case the profile is called directly-->
|
|
||||||
<app.server.skip.unpack>true</app.server.skip.unpack>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak.testsuite</groupId>
|
|
||||||
<artifactId>integration-arquillian-servers-app-server-jetty-92</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.commonjava.maven.plugins</groupId>
|
|
||||||
<artifactId>directory-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>app-server-wildfly</id>
|
<id>app-server-wildfly</id>
|
||||||
<activation>
|
<activation>
|
||||||
|
|
|
@ -50,8 +50,6 @@ import static org.keycloak.testsuite.util.SamlClient.Binding.POST;
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_EAP)
|
@AppServerContainer(ContainerConstants.APP_SERVER_EAP)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
|
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_EAP71)
|
@AppServerContainer(ContainerConstants.APP_SERVER_EAP71)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY92)
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY93)
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
||||||
public class SAMLClockSkewAdapterTest extends AbstractSAMLServletAdapterTest {
|
public class SAMLClockSkewAdapterTest extends AbstractSAMLServletAdapterTest {
|
||||||
|
|
||||||
|
@ -143,8 +141,6 @@ public class SAMLClockSkewAdapterTest extends AbstractSAMLServletAdapterTest {
|
||||||
@AppServerContainer(value = ContainerConstants.APP_SERVER_EAP, skip = true)
|
@AppServerContainer(value = ContainerConstants.APP_SERVER_EAP, skip = true)
|
||||||
@AppServerContainer(value = ContainerConstants.APP_SERVER_EAP6, skip = true)
|
@AppServerContainer(value = ContainerConstants.APP_SERVER_EAP6, skip = true)
|
||||||
@AppServerContainer(value = ContainerConstants.APP_SERVER_EAP71, skip = true)
|
@AppServerContainer(value = ContainerConstants.APP_SERVER_EAP71, skip = true)
|
||||||
@AppServerContainer(value = ContainerConstants.APP_SERVER_JETTY92, skip = true)
|
|
||||||
@AppServerContainer(value = ContainerConstants.APP_SERVER_JETTY93, skip = true)
|
|
||||||
@AppServerContainer(value = ContainerConstants.APP_SERVER_JETTY94, skip = true)
|
@AppServerContainer(value = ContainerConstants.APP_SERVER_JETTY94, skip = true)
|
||||||
public void testClockSkewTomcat() throws Exception {
|
public void testClockSkewTomcat() throws Exception {
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,6 @@ import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement;
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_EAP71)
|
@AppServerContainer(ContainerConstants.APP_SERVER_EAP71)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8)
|
@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9)
|
@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY92)
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY93)
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
||||||
public class SAMLLoginResponseHandlingTest extends AbstractSAMLServletAdapterTest {
|
public class SAMLLoginResponseHandlingTest extends AbstractSAMLServletAdapterTest {
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,6 @@ import static org.keycloak.testsuite.util.Matchers.bodyHC;
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_EAP71)
|
@AppServerContainer(ContainerConstants.APP_SERVER_EAP71)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8)
|
@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9)
|
@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY92)
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY93)
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
||||||
public class SAMLServletSessionTimeoutTest extends AbstractSAMLServletAdapterTest {
|
public class SAMLServletSessionTimeoutTest extends AbstractSAMLServletAdapterTest {
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@ import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
|
||||||
import org.keycloak.testsuite.utils.arquillian.ContainerConstants;
|
import org.keycloak.testsuite.utils.arquillian.ContainerConstants;
|
||||||
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY93)
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY92)
|
|
||||||
public class JettyDemoServletAdapterTest extends DemoServletsAdapterTest {
|
public class JettyDemoServletAdapterTest extends DemoServletsAdapterTest {
|
||||||
|
|
||||||
@Ignore("KEYCLOAK-9614")
|
@Ignore("KEYCLOAK-9614")
|
||||||
|
|
|
@ -6,8 +6,6 @@ import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
|
||||||
import org.keycloak.testsuite.utils.arquillian.ContainerConstants;
|
import org.keycloak.testsuite.utils.arquillian.ContainerConstants;
|
||||||
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94)
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY93)
|
|
||||||
@AppServerContainer(ContainerConstants.APP_SERVER_JETTY92)
|
|
||||||
public class JettySAMLServletAdapterTest extends SAMLServletAdapterTest {
|
public class JettySAMLServletAdapterTest extends SAMLServletAdapterTest {
|
||||||
|
|
||||||
@Ignore("KEYCLOAK-9687")
|
@Ignore("KEYCLOAK-9687")
|
||||||
|
|
|
@ -36,8 +36,6 @@ public interface ContainerConstants {
|
||||||
public static final String APP_SERVER_EAP6_CLUSTER = APP_SERVER_EAP6 + "-ha-node-1;" + APP_SERVER_EAP6 + "-ha-node-2";
|
public static final String APP_SERVER_EAP6_CLUSTER = APP_SERVER_EAP6 + "-ha-node-1;" + APP_SERVER_EAP6 + "-ha-node-2";
|
||||||
|
|
||||||
public static final String APP_SERVER_JETTY94 = APP_SERVER_PREFIX + "jetty94";
|
public static final String APP_SERVER_JETTY94 = APP_SERVER_PREFIX + "jetty94";
|
||||||
public static final String APP_SERVER_JETTY93 = APP_SERVER_PREFIX + "jetty93";
|
|
||||||
public static final String APP_SERVER_JETTY92 = APP_SERVER_PREFIX + "jetty92";
|
|
||||||
|
|
||||||
public static final String APP_SERVER_TOMCAT8 = APP_SERVER_PREFIX + "tomcat8";
|
public static final String APP_SERVER_TOMCAT8 = APP_SERVER_PREFIX + "tomcat8";
|
||||||
public static final String APP_SERVER_TOMCAT9 = APP_SERVER_PREFIX + "tomcat9";
|
public static final String APP_SERVER_TOMCAT9 = APP_SERVER_PREFIX + "tomcat9";
|
||||||
|
|
Loading…
Reference in a new issue