Merge pull request #2801 from mposolda/master
KEYCLOAK-2805 KEYCLOAK-2777 Fuse 6.3 support
This commit is contained in:
commit
ce450e3806
22 changed files with 650 additions and 111 deletions
|
@ -36,15 +36,32 @@
|
||||||
org.keycloak.adapters.osgi.*
|
org.keycloak.adapters.osgi.*
|
||||||
</keycloak.osgi.export>
|
</keycloak.osgi.export>
|
||||||
<keycloak.osgi.import>
|
<keycloak.osgi.import>
|
||||||
org.ops4j.pax.web.*;version="[3.0,4)",
|
org.ops4j.pax.web.*;version="[3.0,5)",
|
||||||
javax.servlet.*;version="[2.5,4)";resolution:=optional,
|
javax.servlet.*;version="[2.5,4)";resolution:=optional,
|
||||||
org.eclipse.jetty.*;version="[8.1,10)";resolution:=optional,
|
org.eclipse.jetty.*;version="[8.1,10)";resolution:=optional,
|
||||||
org.keycloak.*;version="${project.version}",
|
org.keycloak.*;version="${project.version}",
|
||||||
|
org.apache.cxf.transport.http;resolution:=optional;version="[3,4)",
|
||||||
|
org.apache.cxf.transport.servlet;resolution:=optional;version="[3,4)",
|
||||||
*;resolution:=optional
|
*;resolution:=optional
|
||||||
</keycloak.osgi.import>
|
</keycloak.osgi.import>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-core</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-adapter-core</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-adapter-spi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.logging</groupId>
|
<groupId>org.jboss.logging</groupId>
|
||||||
<artifactId>jboss-logging</artifactId>
|
<artifactId>jboss-logging</artifactId>
|
||||||
|
@ -65,12 +82,23 @@
|
||||||
<artifactId>pax-web-runtime</artifactId>
|
<artifactId>pax-web-runtime</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.ops4j.pax.web</groupId>
|
||||||
|
<artifactId>pax-web-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-security</artifactId>
|
<artifactId>jetty-security</artifactId>
|
||||||
<version>${jetty9.version}</version>
|
<version>${jetty9.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.cxf</groupId>
|
||||||
|
<artifactId>cxf-rt-transports-http</artifactId>
|
||||||
|
<version>${cxf.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
/*
|
||||||
|
* 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.osgi;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.keycloak.adapters.KeycloakConfigResolver;
|
||||||
|
import org.keycloak.adapters.KeycloakDeployment;
|
||||||
|
import org.keycloak.adapters.KeycloakDeploymentBuilder;
|
||||||
|
import org.keycloak.adapters.OIDCHttpFacade;
|
||||||
|
|
||||||
|
public class PathBasedKeycloakConfigResolver implements KeycloakConfigResolver {
|
||||||
|
|
||||||
|
private final Map<String, KeycloakDeployment> cache = new ConcurrentHashMap<String, KeycloakDeployment>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KeycloakDeployment resolve(OIDCHttpFacade.Request request) {
|
||||||
|
String path = request.getURI();
|
||||||
|
String[] urlTokens = path.split("/");
|
||||||
|
if (urlTokens.length < 4) {
|
||||||
|
throw new IllegalStateException("Not able to determine the web-context to load the correspondent keycloak.json file");
|
||||||
|
}
|
||||||
|
|
||||||
|
String webContext = urlTokens[3];
|
||||||
|
|
||||||
|
KeycloakDeployment deployment = cache.get(webContext);
|
||||||
|
if (null == deployment) {
|
||||||
|
// not found on the simple cache, try to load it from the file system
|
||||||
|
String keycloakConfig = (String) System.getProperties().get("keycloak.config");
|
||||||
|
if(keycloakConfig == null || "".equals(keycloakConfig.trim())){
|
||||||
|
String karafEtc = (String) System.getProperties().get("karaf.etc");
|
||||||
|
if(karafEtc == null || "".equals(karafEtc.trim())){
|
||||||
|
throw new IllegalStateException("Neither \"keycloak.config\" nor \"karaf.etc\" java properties are set. Please set one of them.");
|
||||||
|
}
|
||||||
|
keycloakConfig = karafEtc;
|
||||||
|
}
|
||||||
|
|
||||||
|
String absolutePath = keycloakConfig + File.separator + webContext + "-keycloak.json";
|
||||||
|
InputStream is = null;
|
||||||
|
try {
|
||||||
|
is = new FileInputStream(absolutePath);
|
||||||
|
} catch (FileNotFoundException e){
|
||||||
|
throw new IllegalStateException("Not able to find the file " + absolutePath);
|
||||||
|
}
|
||||||
|
deployment = KeycloakDeploymentBuilder.build(is);
|
||||||
|
cache.put(webContext, deployment);
|
||||||
|
}
|
||||||
|
|
||||||
|
return deployment;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -18,15 +18,22 @@
|
||||||
package org.keycloak.adapters.osgi;
|
package org.keycloak.adapters.osgi;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Dictionary;
|
||||||
|
import java.util.Enumeration;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
import javax.servlet.Servlet;
|
import javax.servlet.Servlet;
|
||||||
|
|
||||||
|
import org.apache.cxf.transport.http.DestinationRegistry;
|
||||||
|
import org.apache.cxf.transport.servlet.CXFNonSpringServlet;
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
import org.ops4j.pax.web.service.WebContainer;
|
import org.ops4j.pax.web.service.WebContainer;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
import org.osgi.framework.ServiceReference;
|
import org.osgi.framework.ServiceReference;
|
||||||
|
import org.osgi.service.cm.Configuration;
|
||||||
|
import org.osgi.service.cm.ConfigurationAdmin;
|
||||||
import org.osgi.service.http.HttpContext;
|
import org.osgi.service.http.HttpContext;
|
||||||
import org.osgi.util.tracker.ServiceTracker;
|
import org.osgi.util.tracker.ServiceTracker;
|
||||||
import org.osgi.util.tracker.ServiceTrackerCustomizer;
|
import org.osgi.util.tracker.ServiceTrackerCustomizer;
|
||||||
|
@ -42,13 +49,15 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
|
||||||
*/
|
*/
|
||||||
public class ServletReregistrationService {
|
public class ServletReregistrationService {
|
||||||
|
|
||||||
|
private static final String CXF_SERVLET_PREFIX = "org.apache.cxf.servlet.";
|
||||||
protected static final Logger log = Logger.getLogger(ServletReregistrationService.class);
|
protected static final Logger log = Logger.getLogger(ServletReregistrationService.class);
|
||||||
|
|
||||||
private static final List<String> FILTERED_PROPERTIES = Arrays.asList("objectClass", "service.id");
|
private static final List<String> FILTERED_PROPERTIES = Arrays.asList("objectClass", "service.id");
|
||||||
|
|
||||||
private BundleContext bundleContext;
|
private BundleContext bundleContext;
|
||||||
private ServiceReference servletReference;
|
private ServiceReference managedServiceReference;
|
||||||
private ServiceTracker webContainerTracker;
|
private ServiceTracker webContainerTracker;
|
||||||
|
private String alias;
|
||||||
|
|
||||||
public BundleContext getBundleContext() {
|
public BundleContext getBundleContext() {
|
||||||
return bundleContext;
|
return bundleContext;
|
||||||
|
@ -58,24 +67,18 @@ public class ServletReregistrationService {
|
||||||
this.bundleContext = bundleContext;
|
this.bundleContext = bundleContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServiceReference getServletReference() {
|
|
||||||
return servletReference;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setServletReference(ServiceReference servletReference) {
|
|
||||||
this.servletReference = servletReference;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ServiceTracker getWebContainerTracker() {
|
|
||||||
return webContainerTracker;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
if (servletReference == null) {
|
if ( managedServiceReference == null) {
|
||||||
throw new IllegalStateException("No servlet reference provided");
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary properties = obtainProperties();
|
||||||
|
alias = (String)getProp(properties, CXF_SERVLET_PREFIX + "context", "/cxf");
|
||||||
|
if(alias == null){
|
||||||
|
alias = "/cxf";
|
||||||
}
|
}
|
||||||
|
|
||||||
final Servlet servlet = (Servlet) bundleContext.getService(servletReference);
|
|
||||||
WebContainer externalWebContainer = findExternalWebContainer();
|
WebContainer externalWebContainer = findExternalWebContainer();
|
||||||
if (externalWebContainer == null) {
|
if (externalWebContainer == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -83,18 +86,19 @@ public class ServletReregistrationService {
|
||||||
|
|
||||||
// Unregister servlet from external container now
|
// Unregister servlet from external container now
|
||||||
try {
|
try {
|
||||||
externalWebContainer.unregisterServlet(servlet);
|
externalWebContainer.unregister(alias);
|
||||||
log.debug("Original servlet with alias " + getAlias() + " unregistered successfully from external web container.");
|
log.debug("Original servlet with alias " + getAlias() + " unregistered successfully from external web container.");
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
log.warn("Can't unregister servlet due to: " + e.getMessage());
|
log.warn("Can't unregister servlet due to: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Dictionary finalProperties = properties;
|
||||||
ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() {
|
ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object addingService(ServiceReference webContainerServiceReference) {
|
public Object addingService(ServiceReference webContainerServiceReference) {
|
||||||
WebContainer ourWebContainer = (WebContainer) bundleContext.getService(webContainerServiceReference);
|
WebContainer ourWebContainer = (WebContainer) bundleContext.getService(webContainerServiceReference);
|
||||||
registerServlet(ourWebContainer, servlet);
|
registerServlet(ourWebContainer, finalProperties);
|
||||||
log.debugv("Servlet with alias " + getAlias() + " registered to secured web container");
|
log.debugv("Servlet with alias " + getAlias() + " registered to secured web container");
|
||||||
return ourWebContainer;
|
return ourWebContainer;
|
||||||
}
|
}
|
||||||
|
@ -122,28 +126,82 @@ public class ServletReregistrationService {
|
||||||
|
|
||||||
// Re-register servlet back to original context
|
// Re-register servlet back to original context
|
||||||
WebContainer externalWebContainer = findExternalWebContainer();
|
WebContainer externalWebContainer = findExternalWebContainer();
|
||||||
Servlet servlet = (Servlet) bundleContext.getService(servletReference);
|
registerServlet(externalWebContainer, obtainProperties());
|
||||||
registerServlet(externalWebContainer, servlet);
|
|
||||||
log.debug("Servlet with alias " + getAlias() + " registered back to external web container");
|
log.debug("Servlet with alias " + getAlias() + " registered back to external web container");
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getAlias() {
|
private String getAlias() {
|
||||||
return (String) servletReference.getProperty("alias");
|
return alias;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void registerServlet(WebContainer webContainer, Servlet servlet) {
|
/**
|
||||||
|
* Code comes from org.apache.cxf.transport.http.osgi.ServletExporter#updated(java.util.Dictionary)
|
||||||
|
* @param webContainer
|
||||||
|
* @param properties
|
||||||
|
*/
|
||||||
|
protected void registerServlet(WebContainer webContainer, Dictionary properties) {
|
||||||
|
HttpContext httpContext = webContainer.createDefaultHttpContext();
|
||||||
|
|
||||||
|
ServiceReference destinationServiceServiceReference = bundleContext.getServiceReference("org.apache.cxf.transport.http.DestinationRegistry");
|
||||||
|
DestinationRegistry destinationRegistry = (DestinationRegistry) bundleContext.getService(destinationServiceServiceReference);
|
||||||
|
|
||||||
|
Servlet servlet = new CXFNonSpringServlet(destinationRegistry, false);
|
||||||
try {
|
try {
|
||||||
|
if (properties == null) {
|
||||||
|
properties = new Properties();
|
||||||
|
}
|
||||||
|
Properties sprops = new Properties();
|
||||||
|
sprops.put("init-prefix",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "init-prefix", ""));
|
||||||
|
sprops.put("servlet-name",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "name", "cxf-osgi-transport-servlet"));
|
||||||
|
sprops.put("hide-service-list-page",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "hide-service-list-page", "false"));
|
||||||
|
sprops.put("disable-address-updates",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "disable-address-updates", "true"));
|
||||||
|
sprops.put("base-address",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "base-address", ""));
|
||||||
|
sprops.put("service-list-path",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "service-list-path", ""));
|
||||||
|
sprops.put("static-resources-list",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "static-resources-list", ""));
|
||||||
|
sprops.put("redirects-list",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "redirects-list", ""));
|
||||||
|
sprops.put("redirect-servlet-name",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "redirect-servlet-name", ""));
|
||||||
|
sprops.put("redirect-servlet-path",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "redirect-servlet-path", ""));
|
||||||
|
sprops.put("service-list-all-contexts",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "service-list-all-contexts", ""));
|
||||||
|
sprops.put("service-list-page-authenticate",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "service-list-page-authenticate", "false"));
|
||||||
|
sprops.put("service-list-page-authenticate-realm",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "service-list-page-authenticate-realm", "karaf"));
|
||||||
|
sprops.put("use-x-forwarded-headers",
|
||||||
|
getProp(properties, CXF_SERVLET_PREFIX + "use-x-forwarded-headers", "false"));
|
||||||
|
|
||||||
|
// Accept extra properties by default, can be disabled if it is really needed
|
||||||
|
if (Boolean.valueOf(getProp(properties, CXF_SERVLET_PREFIX + "support.extra.properties", "true").toString())) {
|
||||||
|
Enumeration keys = properties.keys();
|
||||||
|
while (keys.hasMoreElements()) {
|
||||||
|
String nextKey = keys.nextElement().toString();
|
||||||
|
if (!nextKey.startsWith(CXF_SERVLET_PREFIX)) {
|
||||||
|
sprops.put(nextKey, properties.get(nextKey));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Hashtable<String, Object> servletInitParams = new Hashtable<String, Object>();
|
Hashtable<String, Object> servletInitParams = new Hashtable<String, Object>();
|
||||||
String[] propNames = servletReference.getPropertyKeys();
|
Enumeration keys = sprops.keys();
|
||||||
for (String propName : propNames) {
|
|
||||||
|
while(keys.hasMoreElements()){
|
||||||
|
String propName = (String) keys.nextElement();
|
||||||
if (!FILTERED_PROPERTIES.contains(propName)) {
|
if (!FILTERED_PROPERTIES.contains(propName)) {
|
||||||
servletInitParams.put(propName, servletReference.getProperty(propName));
|
servletInitParams.put(propName, sprops.getProperty(propName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to register servlet in given web container now
|
// Try to register servlet in given web container now
|
||||||
HttpContext httpContext = webContainer.createDefaultHttpContext();
|
|
||||||
String alias = (String) servletReference.getProperty("alias");
|
|
||||||
webContainer.registerServlet(alias, servlet, servletInitParams, httpContext);
|
webContainer.registerServlet(alias, servlet, servletInitParams, httpContext);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Can't register servlet in web container", e);
|
log.error("Can't register servlet in web container", e);
|
||||||
|
@ -156,7 +214,7 @@ public class ServletReregistrationService {
|
||||||
* @return web container or null
|
* @return web container or null
|
||||||
*/
|
*/
|
||||||
protected WebContainer findExternalWebContainer() {
|
protected WebContainer findExternalWebContainer() {
|
||||||
BundleContext servletBundleContext = servletReference.getBundle().getBundleContext();
|
BundleContext servletBundleContext = managedServiceReference.getBundle().getBundleContext();
|
||||||
ServiceReference webContainerReference = servletBundleContext.getServiceReference(WebContainer.class.getName());
|
ServiceReference webContainerReference = servletBundleContext.getServiceReference(WebContainer.class.getName());
|
||||||
if (webContainerReference == null) {
|
if (webContainerReference == null) {
|
||||||
log.warn("Not found webContainer reference for bundle " + servletBundleContext);
|
log.warn("Not found webContainer reference for bundle " + servletBundleContext);
|
||||||
|
@ -166,4 +224,32 @@ public class ServletReregistrationService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Dictionary obtainProperties(){
|
||||||
|
Dictionary properties = null;
|
||||||
|
ServiceReference reference = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
|
||||||
|
ConfigurationAdmin admin = (ConfigurationAdmin) bundleContext.getService(reference);
|
||||||
|
try {
|
||||||
|
Configuration configuration = admin.getConfiguration("org.apache.cxf.osgi");
|
||||||
|
properties = configuration.getProperties();
|
||||||
|
} catch (Exception e){
|
||||||
|
log.warn("Unable to obtain cxf osgi configadmin reference.", e);
|
||||||
|
}
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Object getProp(Dictionary properties, String key, Object defaultValue) {
|
||||||
|
Object value = null;
|
||||||
|
if(properties != null){
|
||||||
|
value = properties.get(key);
|
||||||
|
}
|
||||||
|
return value == null ? defaultValue : value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceReference getManagedServiceReference() {
|
||||||
|
return managedServiceReference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManagedServiceReference(ServiceReference managedServiceReference) {
|
||||||
|
this.managedServiceReference = managedServiceReference;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,12 +46,21 @@
|
||||||
<feature name="keycloak-jetty8-adapter" version="${project.version}" resolver="(obr)">
|
<feature name="keycloak-jetty8-adapter" version="${project.version}" resolver="(obr)">
|
||||||
<details>The keycloak Jetty8 adapter</details>
|
<details>The keycloak Jetty8 adapter</details>
|
||||||
<feature>keycloak-adapter-core</feature>
|
<feature>keycloak-adapter-core</feature>
|
||||||
<feature version="[8.1,9)">jetty</feature>
|
<feature version="[8,9)">jetty</feature>
|
||||||
<bundle>mvn:org.keycloak/keycloak-jetty-adapter-spi/${project.version}</bundle>
|
<bundle>mvn:org.keycloak/keycloak-jetty-adapter-spi/${project.version}</bundle>
|
||||||
<bundle>mvn:org.keycloak/keycloak-jetty-core/${project.version}</bundle>
|
<bundle>mvn:org.keycloak/keycloak-jetty-core/${project.version}</bundle>
|
||||||
<bundle>mvn:org.keycloak/keycloak-jetty81-adapter/${project.version}</bundle>
|
<bundle>mvn:org.keycloak/keycloak-jetty81-adapter/${project.version}</bundle>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
|
<feature name="keycloak-jetty9-adapter" version="${project.version}" resolver="(obr)">
|
||||||
|
<details>The keycloak Jetty9 adapter</details>
|
||||||
|
<feature>keycloak-adapter-core</feature>
|
||||||
|
<feature version="[9,10)">jetty</feature>
|
||||||
|
<bundle>mvn:org.keycloak/keycloak-jetty-adapter-spi/${project.version}</bundle>
|
||||||
|
<bundle>mvn:org.keycloak/keycloak-jetty-core/${project.version}</bundle>
|
||||||
|
<bundle>mvn:org.keycloak/keycloak-jetty92-adapter/${project.version}</bundle>
|
||||||
|
</feature>
|
||||||
|
|
||||||
<feature name="keycloak-jaas" version="${project.version}" resolver="(obr)">
|
<feature name="keycloak-jaas" version="${project.version}" resolver="(obr)">
|
||||||
<details>The keycloak JAAS configuration</details>
|
<details>The keycloak JAAS configuration</details>
|
||||||
<feature>keycloak-adapter-core</feature>
|
<feature>keycloak-adapter-core</feature>
|
||||||
|
@ -61,17 +70,7 @@
|
||||||
<feature name="keycloak" version="${project.version}" resolver="(obr)">
|
<feature name="keycloak" version="${project.version}" resolver="(obr)">
|
||||||
<details>The keycloak adapter core stuff</details>
|
<details>The keycloak adapter core stuff</details>
|
||||||
<feature>keycloak-osgi-adapter</feature>
|
<feature>keycloak-osgi-adapter</feature>
|
||||||
<feature>keycloak-jetty8-adapter</feature>
|
|
||||||
<feature>keycloak-jaas</feature>
|
<feature>keycloak-jaas</feature>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
<!-- This is just simplification to upgrade paxweb to 3.1.2 in JBoss Fuse 6.1 or Karaf 2.3.X environment -->
|
</features>
|
||||||
<feature name="keycloak-pax-web-upgrade" version="${project.version}" resolver="(obr)">
|
|
||||||
<details>This is just simplification to upgrade paxweb to 3.1.2 in JBoss Fuse 6.1 or Karaf 2.3.X environment</details>
|
|
||||||
<bundle>mvn:org.ow2.asm/asm-all/5.0</bundle>
|
|
||||||
<bundle>mvn:org.apache.xbean/xbean-bundleutils/3.18</bundle>
|
|
||||||
<bundle>mvn:org.apache.xbean/xbean-reflect/3.18</bundle>
|
|
||||||
<bundle>mvn:org.apache.xbean/xbean-finder/3.18</bundle>
|
|
||||||
</feature>
|
|
||||||
|
|
||||||
</features>
|
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
<title>JBoss Fuse and Apache Karaf Adapter</title>
|
<title>JBoss Fuse and Apache Karaf Adapter</title>
|
||||||
<para>
|
<para>
|
||||||
Currently Keycloak supports securing your web applications running inside <ulink url="http://www.jboss.org/products/fuse/overview/">JBoss Fuse</ulink>
|
Currently Keycloak supports securing your web applications running inside <ulink url="http://www.jboss.org/products/fuse/overview/">JBoss Fuse</ulink>
|
||||||
or <ulink url="http://karaf.apache.org/">Apache Karaf</ulink> . It leverages <link linkend="jetty8-adapter">Jetty 8 adapter</link> as both JBoss Fuse 6.1
|
or <ulink url="http://karaf.apache.org/">Apache Karaf</ulink> . It leverages <link linkend="jetty8-adapter">Jetty 8 adapter</link> as all of JBoss Fuse 6.2.1, JBoss Fuse 6.2.0
|
||||||
and Apache Karaf 3 are bundled with <ulink url="http://eclipse.org/jetty/">Jetty 8.1 server</ulink> under the covers and Jetty is used for running various kinds of web applications.
|
and Apache Karaf 3 are bundled with <ulink url="http://eclipse.org/jetty/">Jetty 8.1 server</ulink> under the covers and Jetty is used for running various kinds of web applications.
|
||||||
|
For JBoss Fuse 6.3 and Karaf 4, bundled with Jetty 9 server, it leverages <link linkend="jetty9-adapter">Jetty 9 adapter</link>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
What is supported for Fuse/Karaf is:
|
What is supported for Fuse/Karaf is:
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
Keycloak Fuse demo
|
Keycloak Fuse demo
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Currently Keycloak supports securing your web applications running inside [JBoss Fuse](http://www.jboss.org/products/fuse/overview/) or [Apache Karaf](http://karaf.apache.org/). It leverages Jetty8 adapter
|
Currently Keycloak supports securing your web applications running inside [JBoss Fuse](http://www.jboss.org/products/fuse/overview/) or [Apache Karaf](http://karaf.apache.org/). It leverages:
|
||||||
as both JBoss Fuse 6 and Apache Karaf 3 are bundled with [Jetty8](http://eclipse.org/jetty/) server under the covers and Jetty is used for running various kinds of web applications.
|
- Jetty8 adapter for both JBoss Fuse 6.2 and Apache Karaf 3, that include [Jetty8](http://eclipse.org/jetty/) server under the covers and Jetty is used for running various kinds of web applications
|
||||||
|
- Jetty9 adapter for both JBoss Fuse 6.3 and Apache Karaf 4, that include [Jetty9](http://eclipse.org/jetty/) server under the covers and Jetty is used for running various kinds of web applications
|
||||||
|
|
||||||
The Fuse example is slightly modified version of Keycloak base demo applications. The main difference among base demo is that for Fuse demo
|
The Fuse example is slightly modified version of Keycloak base demo applications. The main difference among base demo is that for Fuse demo
|
||||||
are applications running on separate Fuse/Karaf server. Keycloak server is supposed to run separately on Wildfly.
|
are applications running on separate Fuse/Karaf server. Keycloak server is supposed to run separately on Wildfly.
|
||||||
|
@ -19,12 +20,12 @@ more secure to use the separate Jetty Engine instead of the default one. The def
|
||||||
Fuse demo contains those basic applications:
|
Fuse demo contains those basic applications:
|
||||||
* **customer-app-fuse** A WAR application that is deployed with [pax-war extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War)
|
* **customer-app-fuse** A WAR application that is deployed with [pax-war extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War)
|
||||||
* **product-app-fuse** A servlet application deployed with [pax-whiteboard extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard)
|
* **product-app-fuse** A servlet application deployed with [pax-whiteboard extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard)
|
||||||
* **cxf-jaxws** [Apache CXF](http://cxf.apache.org/) JAX-WS endpoint running on separate Jetty engine on [http://localhost:8282/PersonServiceCF](http://localhost:8282/PersonServiceCF).
|
|
||||||
The product-app-fuse invokes the endpoint to get data.
|
|
||||||
* **camel** [Apache Camel](http://camel.apache.org/) endpoint running on separate Jetty engine on [http://localhost:8383/admin-camel-endpoint](http://localhost:8383/admin-camel-endpoint).
|
* **camel** [Apache Camel](http://camel.apache.org/) endpoint running on separate Jetty engine on [http://localhost:8383/admin-camel-endpoint](http://localhost:8383/admin-camel-endpoint).
|
||||||
The customer-app-fuse invokes the endpoint to get data.
|
The customer-app-fuse invokes the endpoint to get data.
|
||||||
* **cxf-jaxrs** [Apache CXF](http://cxf.apache.org/) JAX-RS endpoint running on default Jetty on [http://localhost:8181/cxf/customerservice](http://localhost:8181/cxf/customerservice).
|
* **cxf-jaxrs** [Apache CXF](http://cxf.apache.org/) JAX-RS endpoint running on default Jetty on [http://localhost:8181/cxf/customerservice](http://localhost:8181/cxf/customerservice).
|
||||||
The customer-app-fuse invokes the endpoint to get data
|
The customer-app-fuse invokes the endpoint to get data
|
||||||
|
* **cxf-jaxws** [Apache CXF](http://cxf.apache.org/) JAX-WS endpoint running on separate Jetty engine on [http://localhost:8282/PersonServiceCF](http://localhost:8282/PersonServiceCF).
|
||||||
|
The product-app-fuse invokes the endpoint to get data.
|
||||||
|
|
||||||
Running of demo consists of 2 steps. First you need to run separate Keycloak server and then Fuse/Karaf server with the applications
|
Running of demo consists of 2 steps. First you need to run separate Keycloak server and then Fuse/Karaf server with the applications
|
||||||
|
|
||||||
|
@ -42,14 +43,14 @@ cd keycloak-examples-<VERSION>/fuse
|
||||||
mvn clean install
|
mvn clean install
|
||||||
```
|
```
|
||||||
|
|
||||||
Running demo on JBoss Fuse 6.2
|
Running demo on JBoss Fuse 6.2.1 or JBoss Fuse 6.2.0
|
||||||
------------------------------
|
----------------------------------------------------
|
||||||
You just need to download and run JBoss Fuse and then run those commands from the karaf terminal to install the needed features and Keycloak fuse demo (Replace Keycloak versions with the current Keycloak version number):
|
You just need to download and run JBoss Fuse and then run those commands from the karaf terminal to install the needed features and Keycloak fuse demo (Replace Keycloak versions with the current Keycloak version number):
|
||||||
|
|
||||||
```
|
```
|
||||||
features:addurl mvn:org.keycloak/keycloak-osgi-features/1.2.0.Beta1/xml/features
|
features:addurl mvn:org.keycloak/keycloak-osgi-features/1.9.4.Final/xml/features
|
||||||
features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.2.0.Beta1/xml/features
|
features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.9.4.Final/xml/features
|
||||||
features:install keycloak-fuse-example
|
features:install keycloak-fuse-6.2-example
|
||||||
```
|
```
|
||||||
|
|
||||||
After that you can test running on [http://localhost:8181/customer-portal](http://localhost:8181/customer-portal) and login as "bburke@redhat.com" with password "password". Customer-portal is able to
|
After that you can test running on [http://localhost:8181/customer-portal](http://localhost:8181/customer-portal) and login as "bburke@redhat.com" with password "password". Customer-portal is able to
|
||||||
|
@ -61,6 +62,18 @@ From [http://localhost:8181/product-portal](http://localhost:8181/product-portal
|
||||||
Note that this demo also secures whole default CXF endpoint on [http://localhost:8181/cxf](http://localhost:8181/cxf) hence every application running under it is secured too.
|
Note that this demo also secures whole default CXF endpoint on [http://localhost:8181/cxf](http://localhost:8181/cxf) hence every application running under it is secured too.
|
||||||
|
|
||||||
|
|
||||||
|
Running demo on JBoss Fuse 6.3
|
||||||
|
------------------------------
|
||||||
|
Similar steps to the instructions for JBoss Fuse 6.2.1 but you need to install a different feature (due to the usage of Jetty9 instead of Jetty8): `keycloak-fuse-6.3-example`
|
||||||
|
|
||||||
|
You just need to download and run JBoss Fuse and then run those commands from the karaf terminal to install the needed features and Keycloak fuse demo (Replace Keycloak versions with the current Keycloak version number):
|
||||||
|
|
||||||
|
```
|
||||||
|
features:addurl mvn:org.keycloak/keycloak-osgi-features/1.9.4.Final/xml/features
|
||||||
|
features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.9.4.Final/xml/features
|
||||||
|
features:install keycloak-fuse-6.3-example
|
||||||
|
```
|
||||||
|
|
||||||
Running demo on Apache Karaf 3.0.3
|
Running demo on Apache Karaf 3.0.3
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
|
@ -73,54 +86,14 @@ Once you run Apache Karaf, you need to run these commands from Karaf console (Ma
|
||||||
```
|
```
|
||||||
feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.15.1/xml/features
|
feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.15.1/xml/features
|
||||||
feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/3.0.4/xml/features
|
feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/3.0.4/xml/features
|
||||||
feature:repo-add mvn:org.keycloak/keycloak-osgi-features/1.2.0.Beta1/xml/features
|
feature:repo-add mvn:org.keycloak/keycloak-osgi-features/1.9.4.Final/xml/features
|
||||||
feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.2.0.Beta1/xml/features
|
feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.9.4.Final/xml/features
|
||||||
feature:install keycloak-fuse-example
|
feature:install keycloak-fuse-example
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you can test example applications similarly like described for "JBoss Fuse 6.2" section.
|
Now you can test example applications similarly like described for "JBoss Fuse 6.2" section.
|
||||||
|
|
||||||
|
|
||||||
Running demo on JBoss Fuse 6.1.0.redhat-379
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
Securing your applications on JBoss Fuse 6.1 is a bit more tricky. There is bug [https://ops4j1.jira.com/browse/PAXWEB-666](https://ops4j1.jira.com/browse/PAXWEB-666)
|
|
||||||
, which doesn't easily allow to secure default Jetty engine on [http://localhost:8181](http://localhost:8181) as it's not possible to inject
|
|
||||||
custom Jetty authenticator provided by Keycloak Jetty adapter into underlying Jetty server. Hence first step is to upgrade pax-web
|
|
||||||
version from default 3.0.6 to newer 3.1.2 . Then you need to "refresh" cxf feature too. Final step is to install "keycloak-fuse-example" feature.
|
|
||||||
|
|
||||||
All the steps could be performed with these commands in Fuse console (Replace 1.2.0.Beta1 with the actual version number of Keycloak you are using):
|
|
||||||
|
|
||||||
```
|
|
||||||
features:uninstall pax-war
|
|
||||||
features:uninstall pax-http-whiteboard
|
|
||||||
features:uninstall pax-http
|
|
||||||
features:uninstall pax-jetty
|
|
||||||
features:removeurl mvn:org.ops4j.pax.web/pax-web-features/3.0.6/xml/features
|
|
||||||
```
|
|
||||||
|
|
||||||
Now restart fuse (use `osgi:shutdown` command and start it again from command line. You can ignore startup messages after restart
|
|
||||||
as pax-web is not installed at the moment. Then run those commands (replace 1.2.0.Beta1 with the actual version number of Keycloak you are using):
|
|
||||||
|
|
||||||
```
|
|
||||||
features:addurl mvn:org.ops4j.pax.web/pax-web-features/3.1.2/xml/features
|
|
||||||
features:addurl mvn:org.keycloak/keycloak-osgi-features/1.2.0.Beta1/xml/features
|
|
||||||
features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.2.0.Beta1/xml/features
|
|
||||||
features:install keycloak-pax-web-upgrade
|
|
||||||
features:install pax-http-whiteboard/3.1.2
|
|
||||||
features:install pax-war/3.1.2
|
|
||||||
```
|
|
||||||
|
|
||||||
Now it's recommended to restart again. After the start, you shouldn't see any error messages, which indicates that upgrade to pax-web 3.1.2 went fine.
|
|
||||||
So last step is to install the demo now:
|
|
||||||
|
|
||||||
```
|
|
||||||
features:install keycloak-fuse-example
|
|
||||||
```
|
|
||||||
|
|
||||||
Now you can test example applications similarly like described in "JBoss Fuse 6.2" section.
|
|
||||||
|
|
||||||
|
|
||||||
How to secure your own applications
|
How to secure your own applications
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
Most of the steps should be understandable from testing and understanding the demo. Basically all mentioned applications require to
|
Most of the steps should be understandable from testing and understanding the demo. Basically all mentioned applications require to
|
||||||
|
@ -154,6 +127,13 @@ original unsecured servlet on `/cxf` context is deployed back and hence context
|
||||||
|
|
||||||
It's recommended to use your own Jetty engine for your apps (similarly like `cxf-jaxws` application is doing).
|
It's recommended to use your own Jetty engine for your apps (similarly like `cxf-jaxws` application is doing).
|
||||||
|
|
||||||
|
|
||||||
|
How to secure WAR application with external keycloak.json configuration
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
It's possible to secure your WAR application with the `keycloak.json` configuration provided outside of the WAR bundle itself.
|
||||||
|
See [external-config](external-config/README.md) for more details. This is supported on JBoss Fuse 6.3.
|
||||||
|
|
||||||
|
|
||||||
How to secure Fuse admin services
|
How to secure Fuse admin services
|
||||||
---------------------------------
|
---------------------------------
|
||||||
It's possible to secure fuse admin services with Keycloak too. See [fuse-admin](fuse-admin/README.md) for info on how to secure
|
It's possible to secure fuse admin services with Keycloak too. See [fuse-admin](fuse-admin/README.md) for info on how to secure
|
||||||
|
|
|
@ -32,15 +32,21 @@
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<camel.version>2.15.1</camel.version>
|
|
||||||
<keycloak.osgi.export>
|
<keycloak.osgi.export>
|
||||||
</keycloak.osgi.export>
|
</keycloak.osgi.export>
|
||||||
<keycloak.osgi.import>
|
<keycloak.osgi.import>
|
||||||
org.eclipse.jetty.security;version="[8.1,10)",
|
javax.servlet;version="[3,4)",
|
||||||
org.eclipse.jetty.util.security;version="[8.1,10)",
|
javax.servlet.http;version="[3,4)",
|
||||||
org.apache.camel;version="[2.12,3)",
|
org.apache.camel.*,
|
||||||
|
org.apache.camel;version="[2.13,3)",
|
||||||
|
org.eclipse.jetty.security;version="[8,10)",
|
||||||
|
org.eclipse.jetty.server.nio;version="[8,10)",
|
||||||
|
org.eclipse.jetty.util.security;version="[8,10)",
|
||||||
org.keycloak.*;version="${project.version}",
|
org.keycloak.*;version="${project.version}",
|
||||||
*;resolution:=optional
|
org.osgi.service.blueprint,
|
||||||
|
org.osgi.service.blueprint.container,
|
||||||
|
org.osgi.service.event,
|
||||||
</keycloak.osgi.import>
|
</keycloak.osgi.import>
|
||||||
<keycloak.osgi.private>
|
<keycloak.osgi.private>
|
||||||
org.keycloak.example.*
|
org.keycloak.example.*
|
||||||
|
@ -63,7 +69,7 @@
|
||||||
<version>${camel.version}</version>
|
<version>${camel.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency><groupId>org.apache.camel</groupId>
|
<dependency><groupId>org.apache.camel</groupId>
|
||||||
<artifactId>camel-jetty</artifactId>
|
<artifactId>camel-jetty9</artifactId>
|
||||||
<version>${camel.version}</version>
|
<version>${camel.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
<name>CXF JAXRS Example - Secured in Karaf/Fuse</name>
|
<name>CXF JAXRS Example - Secured in Karaf/Fuse</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<cxf.version>3.0.4</cxf.version>
|
|
||||||
<keycloak.osgi.export>
|
<keycloak.osgi.export>
|
||||||
</keycloak.osgi.export>
|
</keycloak.osgi.export>
|
||||||
<keycloak.osgi.import>
|
<keycloak.osgi.import>
|
||||||
|
@ -40,9 +39,11 @@
|
||||||
org.apache.cxf.transport.http;version="[2.7,3.2)",
|
org.apache.cxf.transport.http;version="[2.7,3.2)",
|
||||||
org.apache.cxf.*;version="[2.7,3.2)",
|
org.apache.cxf.*;version="[2.7,3.2)",
|
||||||
com.fasterxml.jackson.jaxrs.json;version="${jackson.version}",
|
com.fasterxml.jackson.jaxrs.json;version="${jackson.version}",
|
||||||
|
org.eclipse.jetty.security;version="[8,10)",
|
||||||
|
org.eclipse.jetty.util.security;version="[8,10)",
|
||||||
|
org.keycloak.*;version="${project.version}",
|
||||||
org.keycloak.adapters.jetty;version="${project.version}",
|
org.keycloak.adapters.jetty;version="${project.version}",
|
||||||
org.keycloak.adapters;version="${project.version}",
|
*;resolution:=optional
|
||||||
*
|
|
||||||
</keycloak.osgi.import>
|
</keycloak.osgi.import>
|
||||||
<keycloak.osgi.private>
|
<keycloak.osgi.private>
|
||||||
org.keycloak.example.rs.*
|
org.keycloak.example.rs.*
|
||||||
|
|
|
@ -69,9 +69,9 @@
|
||||||
<bean id="defaultCxfReregistration" class="org.keycloak.adapters.osgi.ServletReregistrationService" depends-on="cxfKeycloakPaxWebIntegration"
|
<bean id="defaultCxfReregistration" class="org.keycloak.adapters.osgi.ServletReregistrationService" depends-on="cxfKeycloakPaxWebIntegration"
|
||||||
init-method="start" destroy-method="stop">
|
init-method="start" destroy-method="stop">
|
||||||
<property name="bundleContext" ref="blueprintBundleContext" />
|
<property name="bundleContext" ref="blueprintBundleContext" />
|
||||||
<property name="servletReference">
|
<property name="managedServiceReference">
|
||||||
<reference interface="javax.servlet.Servlet" filter="(alias=/cxf)" timeout="5000" />
|
<reference interface="org.osgi.service.cm.ManagedService" filter="(service.pid=org.apache.cxf.osgi)" timeout="5000" />
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
</blueprint>
|
</blueprint>
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<cxf.version>3.0.4</cxf.version>
|
|
||||||
<keycloak.osgi.export>
|
<keycloak.osgi.export>
|
||||||
</keycloak.osgi.export>
|
</keycloak.osgi.export>
|
||||||
<keycloak.osgi.import>
|
<keycloak.osgi.import>
|
||||||
|
@ -50,7 +49,9 @@
|
||||||
org.apache.cxf.transport.http;version="[2.7,3.2)",
|
org.apache.cxf.transport.http;version="[2.7,3.2)",
|
||||||
org.apache.cxf.*;version="[2.7,3.2)",
|
org.apache.cxf.*;version="[2.7,3.2)",
|
||||||
org.springframework.beans.factory.config,
|
org.springframework.beans.factory.config,
|
||||||
*;resolution:=optional
|
org.eclipse.jetty.security;version="[8,10)",
|
||||||
|
org.eclipse.jetty.util.security;version="[8,10)",
|
||||||
|
org.keycloak.*;version="${project.version}"
|
||||||
</keycloak.osgi.import>
|
</keycloak.osgi.import>
|
||||||
<keycloak.osgi.private>
|
<keycloak.osgi.private>
|
||||||
org.keycloak.example.ws.*
|
org.keycloak.example.ws.*
|
||||||
|
|
22
examples/fuse/external-config/README.md
Normal file
22
examples/fuse/external-config/README.md
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
Keycloak Example - Externalized keycloak.json
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
The following example was tested on JBoss Fuse 6.3 and shows a way to package an OSGi compatible .war file that does not
|
||||||
|
include keycloak.json file in the .war archive but that automatically loads it based on a naming convention.
|
||||||
|
|
||||||
|
To enable the functionality you need to add this section to your `web.xml`:
|
||||||
|
|
||||||
|
```
|
||||||
|
<context-param>
|
||||||
|
<param-name>keycloak.config.resolver</param-name>
|
||||||
|
<param-value>org.keycloak.adapters.osgi.PathBasedKeycloakConfigResolver</param-value>
|
||||||
|
</context-param>
|
||||||
|
```
|
||||||
|
|
||||||
|
That component will use `keycloak.config` or `karaf.etc` java properties to look for a base folder to look for the configuration.
|
||||||
|
|
||||||
|
Inside one of those folders it will look for a file called `<your_web_context>-keycloak.json`.
|
||||||
|
|
||||||
|
For this example you need to copy the file `external-config-keycloak.json` to your JBoss Fuse `etc/` folder.
|
||||||
|
|
||||||
|
Once you have done that and once you added feature `keycloak-fuse-6.3-example` (See [here](../README.md) for more details), you can try to access the endpoint: http://localhost:8181/external-config/index.html
|
10
examples/fuse/external-config/external-config-keycloak.json
Normal file
10
examples/fuse/external-config/external-config-keycloak.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"realm": "demo",
|
||||||
|
"resource": "external-config",
|
||||||
|
"realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB",
|
||||||
|
"auth-server-url": "http://localhost:8080/auth",
|
||||||
|
"ssl-required" : "external",
|
||||||
|
"credentials": {
|
||||||
|
"secret": "password"
|
||||||
|
}
|
||||||
|
}
|
123
examples/fuse/external-config/pom.xml
Executable file
123
examples/fuse/external-config/pom.xml
Executable file
|
@ -0,0 +1,123 @@
|
||||||
|
<!--
|
||||||
|
~ 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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-examples-fuse-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>2.0.0.CR1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<name>Keycloak Examples - External Config</name>
|
||||||
|
<artifactId>external-config</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<groupId>org.keycloak.example.demo</groupId>
|
||||||
|
<description>
|
||||||
|
Keycloak External Config Example
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<keycloak.osgi.export>
|
||||||
|
</keycloak.osgi.export>
|
||||||
|
<keycloak.osgi.import>
|
||||||
|
org.apache.http.*;version=${apache.httpcomponents.version},
|
||||||
|
javax.servlet.*;version="[2.5,4)",
|
||||||
|
org.keycloak.adapters.jetty;version="${project.version}",
|
||||||
|
org.keycloak.adapters;version="${project.version}",
|
||||||
|
org.keycloak.constants;version="${project.version}",
|
||||||
|
org.keycloak.adapters.osgi;version="${project.version}",
|
||||||
|
org.keycloak.util;version="${project.version}",
|
||||||
|
org.keycloak.*;version="${project.version}",
|
||||||
|
*;resolution:=optional
|
||||||
|
</keycloak.osgi.import>
|
||||||
|
<keycloak.osgi.private>
|
||||||
|
org.keycloak.example.*
|
||||||
|
</keycloak.osgi.private>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.spec.javax.servlet</groupId>
|
||||||
|
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Contains KeycloakDeployment and KeycloakConfigResolver -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-adapter-core</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-adapter-spi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Contains KeycloakPrincipal -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-core</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<finalName>external-config</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifestFile>${basedir}/target/classes/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>
|
||||||
|
<supportedProjectTypes>
|
||||||
|
<supportedProjectType>war</supportedProjectType>
|
||||||
|
</supportedProjectTypes>
|
||||||
|
<instructions>
|
||||||
|
<Webapp-Context>external-config</Webapp-Context>
|
||||||
|
<Web-ContextPath>external-config</Web-ContextPath>
|
||||||
|
<Embed-Directory>WEB-INF/lib</Embed-Directory>
|
||||||
|
<Bundle-Name>${project.name}</Bundle-Name>
|
||||||
|
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||||
|
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
||||||
|
<Private-Package>${keycloak.osgi.private}</Private-Package>
|
||||||
|
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
||||||
|
</instructions>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,58 @@
|
||||||
|
package org.keycloak.examples;/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.keycloak.KeycloakPrincipal;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.annotation.WebServlet;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
|
||||||
|
@WebServlet(urlPatterns = "/servlet")
|
||||||
|
public class ProtectedServlet extends HttpServlet {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||||
|
String realm = req.getPathInfo().split("/")[1];
|
||||||
|
if (realm.contains("?")) {
|
||||||
|
realm = realm.split("\\?")[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (req.getPathInfo().contains("logout")) {
|
||||||
|
req.logout();
|
||||||
|
resp.sendRedirect(req.getContextPath() + "/" + realm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
KeycloakPrincipal principal = (KeycloakPrincipal) req.getUserPrincipal();
|
||||||
|
|
||||||
|
resp.setContentType("text/html");
|
||||||
|
PrintWriter writer = resp.getWriter();
|
||||||
|
|
||||||
|
writer.write("Realm: ");
|
||||||
|
writer.write(principal.getKeycloakSecurityContext().getRealm());
|
||||||
|
|
||||||
|
writer.write("<br/>User: ");
|
||||||
|
writer.write(principal.getKeycloakSecurityContext().getIdToken().getPreferredUsername());
|
||||||
|
|
||||||
|
writer.write(String.format("<br/><a href=\"/multitenant/%s/logout\">Logout</a>", realm));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||||
|
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
|
||||||
|
<Get name="securityHandler">
|
||||||
|
<Set name="authenticator">
|
||||||
|
<New class="org.keycloak.adapters.jetty.KeycloakJettyAuthenticator">
|
||||||
|
</New>
|
||||||
|
</Set>
|
||||||
|
</Get>
|
||||||
|
</Configure>
|
|
@ -0,0 +1,55 @@
|
||||||
|
<!--
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
|
version="3.0">
|
||||||
|
<module-name>External Config Example</module-name>
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<param-name>keycloak.config.resolver</param-name>
|
||||||
|
<param-value>org.keycloak.adapters.osgi.PathBasedKeycloakConfigResolver</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>index.html</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
|
||||||
|
|
||||||
|
<security-constraint>
|
||||||
|
<web-resource-collection>
|
||||||
|
<web-resource-name>REST endpoints</web-resource-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</web-resource-collection>
|
||||||
|
<auth-constraint>
|
||||||
|
<role-name>user</role-name>
|
||||||
|
</auth-constraint>
|
||||||
|
</security-constraint>
|
||||||
|
|
||||||
|
<login-config>
|
||||||
|
<auth-method>BASIC</auth-method>
|
||||||
|
<realm-name>does-not-matter</realm-name>
|
||||||
|
</login-config>
|
||||||
|
|
||||||
|
<security-role>
|
||||||
|
<role-name>admin</role-name>
|
||||||
|
</security-role>
|
||||||
|
<security-role>
|
||||||
|
<role-name>user</role-name>
|
||||||
|
</security-role>
|
||||||
|
</web-app>
|
30
examples/fuse/external-config/src/main/webapp/index.html
Executable file
30
examples/fuse/external-config/src/main/webapp/index.html
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
<!--
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>External Config Example Karaf/Fuse</title>
|
||||||
|
</head>
|
||||||
|
<body bgcolor="#E3F6CE">
|
||||||
|
<h1>External configuration worked.</h1>
|
||||||
|
|
||||||
|
<p><a href="http://localhost:8080/auth/realms/demo/protocol/openid-connect/logout?redirect_uri=http%3A%2F%2Flocalhost%3A8181%2Fexternal-config%2Findex.html">Log out</a></p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -18,13 +18,33 @@
|
||||||
|
|
||||||
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="keycloak-${project.version}">
|
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="keycloak-${project.version}">
|
||||||
|
|
||||||
<feature name="keycloak-fuse-example" version="${project.version}">
|
<feature name="keycloak-fuse-6.3-example" version="${project.version}">
|
||||||
|
<details>The keycloak fuse example</details>
|
||||||
|
<feature>war</feature>
|
||||||
|
<feature>camel</feature>
|
||||||
|
<feature>camel-jetty9</feature>
|
||||||
|
<feature>cxf</feature>
|
||||||
|
<feature>keycloak</feature>
|
||||||
|
<feature>keycloak-jetty9-adapter</feature>
|
||||||
|
<bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version}</bundle>
|
||||||
|
<bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version}</bundle>
|
||||||
|
<bundle>mvn:org.keycloak.example.demo/product-portal-fuse-example/${project.version}</bundle>
|
||||||
|
<bundle>mvn:org.keycloak.example.demo/customer-portal-fuse-example/${project.version}/war</bundle>
|
||||||
|
<bundle>mvn:org.keycloak.example.demo/external-config/${project.version}/war</bundle>
|
||||||
|
<bundle>mvn:org.keycloak.example.demo/camel-endpoint-example/${project.version}</bundle>
|
||||||
|
<bundle>mvn:org.keycloak.example.demo/cxf-jaxws-example/${project.version}</bundle>
|
||||||
|
<bundle>mvn:org.keycloak.example.demo/cxf-jaxrs-example/${project.version}</bundle>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<!-- The difference are keycloak-jetty8-adapter and camel-jetty feature -->
|
||||||
|
<feature name="keycloak-fuse-6.2-example" version="${project.version}">
|
||||||
<details>The keycloak fuse example</details>
|
<details>The keycloak fuse example</details>
|
||||||
<feature>war</feature>
|
<feature>war</feature>
|
||||||
<feature>camel</feature>
|
<feature>camel</feature>
|
||||||
<feature>camel-jetty</feature>
|
<feature>camel-jetty</feature>
|
||||||
<feature>cxf</feature>
|
<feature>cxf</feature>
|
||||||
<feature>keycloak</feature>
|
<feature>keycloak</feature>
|
||||||
|
<feature>keycloak-jetty8-adapter</feature>
|
||||||
<bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version}</bundle>
|
<bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version}</bundle>
|
||||||
<bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version}</bundle>
|
<bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version}</bundle>
|
||||||
<bundle>mvn:org.keycloak.example.demo/product-portal-fuse-example/${project.version}</bundle>
|
<bundle>mvn:org.keycloak.example.demo/product-portal-fuse-example/${project.version}</bundle>
|
||||||
|
@ -34,4 +54,4 @@
|
||||||
<bundle>mvn:org.keycloak.example.demo/cxf-jaxrs-example/${project.version}</bundle>
|
<bundle>mvn:org.keycloak.example.demo/cxf-jaxrs-example/${project.version}</bundle>
|
||||||
</feature>
|
</feature>
|
||||||
|
|
||||||
</features>
|
</features>
|
||||||
|
|
|
@ -29,7 +29,9 @@
|
||||||
|
|
||||||
<artifactId>keycloak-examples-fuse-parent</artifactId>
|
<artifactId>keycloak-examples-fuse-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
<properties>
|
||||||
|
<camel.version>2.16.1</camel.version>
|
||||||
|
</properties>
|
||||||
<modules>
|
<modules>
|
||||||
<module>customer-app-fuse</module>
|
<module>customer-app-fuse</module>
|
||||||
<module>product-app-fuse</module>
|
<module>product-app-fuse</module>
|
||||||
|
@ -37,6 +39,7 @@
|
||||||
<module>cxf-jaxws</module>
|
<module>cxf-jaxws</module>
|
||||||
<module>camel</module>
|
<module>camel</module>
|
||||||
<module>features</module>
|
<module>features</module>
|
||||||
|
<module>external-config</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -186,7 +186,19 @@
|
||||||
"standardFlowEnabled": false,
|
"standardFlowEnabled": false,
|
||||||
"directAccessGrantsEnabled": true,
|
"directAccessGrantsEnabled": true,
|
||||||
"secret": "password"
|
"secret": "password"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clientId": "external-config",
|
||||||
|
"enabled": true,
|
||||||
|
"adminUrl": "http://localhost:8181/external-config",
|
||||||
|
"baseUrl": "http://localhost:8181/external-config",
|
||||||
|
"redirectUris": [
|
||||||
|
"http://localhost:8181/external-config",
|
||||||
|
"http://localhost:8181/external-config/*"
|
||||||
|
],
|
||||||
|
"secret": "password"
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
"scopeMappings": [
|
"scopeMappings": [
|
||||||
{
|
{
|
||||||
|
|
8
pom.xml
8
pom.xml
|
@ -50,6 +50,7 @@
|
||||||
<apache.httpcomponents.httpcore.version>4.4.1</apache.httpcomponents.httpcore.version>
|
<apache.httpcomponents.httpcore.version>4.4.1</apache.httpcomponents.httpcore.version>
|
||||||
<apache.mime4j.version>0.6</apache.mime4j.version>
|
<apache.mime4j.version>0.6</apache.mime4j.version>
|
||||||
<bouncycastle.version>1.52</bouncycastle.version>
|
<bouncycastle.version>1.52</bouncycastle.version>
|
||||||
|
<cxf.version>3.1.5</cxf.version>
|
||||||
<dom4j.version>1.6.1</dom4j.version>
|
<dom4j.version>1.6.1</dom4j.version>
|
||||||
<github.relaxng.version>2011.1</github.relaxng.version>
|
<github.relaxng.version>2011.1</github.relaxng.version>
|
||||||
<h2.version>1.3.173</h2.version>
|
<h2.version>1.3.173</h2.version>
|
||||||
|
@ -84,7 +85,7 @@
|
||||||
<mongo.driver.version>3.2.0</mongo.driver.version>
|
<mongo.driver.version>3.2.0</mongo.driver.version>
|
||||||
<mysql.version>5.1.29</mysql.version>
|
<mysql.version>5.1.29</mysql.version>
|
||||||
<osgi.version>4.2.0</osgi.version>
|
<osgi.version>4.2.0</osgi.version>
|
||||||
<pax.web.version>3.1.2</pax.web.version>
|
<pax.web.version>4.2.4</pax.web.version>
|
||||||
<postgresql.version>9.3-1100-jdbc41</postgresql.version>
|
<postgresql.version>9.3-1100-jdbc41</postgresql.version>
|
||||||
<mariadb.version>1.3.7</mariadb.version>
|
<mariadb.version>1.3.7</mariadb.version>
|
||||||
<servlet.api.30.version>1.0.2.Final</servlet.api.30.version>
|
<servlet.api.30.version>1.0.2.Final</servlet.api.30.version>
|
||||||
|
@ -621,6 +622,11 @@
|
||||||
<artifactId>pax-web-runtime</artifactId>
|
<artifactId>pax-web-runtime</artifactId>
|
||||||
<version>${pax.web.version}</version>
|
<version>${pax.web.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.ops4j.pax.web</groupId>
|
||||||
|
<artifactId>pax-web-api</artifactId>
|
||||||
|
<version>${pax.web.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.aesh</groupId>
|
<groupId>org.jboss.aesh</groupId>
|
||||||
<artifactId>aesh</artifactId>
|
<artifactId>aesh</artifactId>
|
||||||
|
|
Loading…
Reference in a new issue