JBossWS SVN: r18097 - in stack/cxf/branches/jaspi: modules/addons and 33 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-11-20 05:11:39 -0500 (Wed, 20 Nov 2013)
New Revision: 18097
Added:
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthConfig.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthContext.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientAuthenticator.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientInInterceptor.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientOutInterceptor.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/SecurityActions.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/SOAPClientAuthModule.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/WSS4JOutInterceptor.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/META-INF/
Removed:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiClientInInterceptor.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiClientOutInterceptor.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/JaspiClientAuthenticator.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/SOAPClientAuthModule.java
Modified:
stack/cxf/branches/jaspi/
stack/cxf/branches/jaspi/modules/addons/pom.xml
stack/cxf/branches/jaspi/modules/addons/transports/http/httpserver/pom.xml
stack/cxf/branches/jaspi/modules/addons/transports/udp/pom.xml
stack/cxf/branches/jaspi/modules/client/pom.xml
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
stack/cxf/branches/jaspi/modules/dist/pom.xml
stack/cxf/branches/jaspi/modules/dist/src/main/distro/ReleaseNotes.txt
stack/cxf/branches/jaspi/modules/endorsed/pom.xml
stack/cxf/branches/jaspi/modules/resources/pom.xml
stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/jboss710/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/branches/jaspi/modules/server/pom.xml
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/pom.xml
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/pom.xml
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/BusCounter.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientBusStrategyTests.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/Helper.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/HelperUsignThreadLocal.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/TestClient.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java
stack/cxf/branches/jaspi/modules/testsuite/pom.xml
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/pom.xml
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/LogicalSimpleHandler.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl2.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3293/JBWS3293DispatchTestCase.java
stack/cxf/branches/jaspi/modules/testsuite/test-utils/pom.xml
stack/cxf/branches/jaspi/pom.xml
Log:
Synch branch with trunk;more work on client jaspi
Property changes on: stack/cxf/branches/jaspi
___________________________________________________________________
Modified: svn:mergeinfo
- /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/branches/ropalka:16301-16305,16966-17008
/stack/cxf/branches/ropalka_JBWS-3550:16747-16757
+ /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/branches/ropalka:16301-16305,16966-17008
/stack/cxf/branches/ropalka_JBWS-3550:16747-16757
/stack/cxf/trunk:18054-18096
Modified: stack/cxf/branches/jaspi/modules/addons/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/addons/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/addons/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/addons/transports/http/httpserver/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/addons/transports/http/httpserver/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/addons/transports/http/httpserver/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-addons</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/addons/transports/udp/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/addons/transports/udp/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/addons/transports/udp/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-addons</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/client/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/client/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/client/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -220,6 +220,11 @@
<groupId>org.jboss.spec.javax.xml.soap</groupId>
<artifactId>jboss-saaj-api_1.3_spec</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.security.auth.message</groupId>
+ <artifactId>jboss-jaspi-api_1.1_spec</artifactId>
+ </dependency>
+
<!-- jboss provided -->
<dependency>
@@ -227,6 +232,10 @@
<artifactId>jboss-common-core</artifactId>
</dependency>
<dependency>
+ <groupId>org.picketbox</groupId>
+ <artifactId>picketbox</artifactId>
+ </dependency>
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
Modified: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -43,6 +43,7 @@
public static final String CXF_MANAGEMENT_ENABLED = "cxf.management.enabled";
public static final String CXF_MANAGEMENT_INSTALL_RESPONSE_TIME_INTERCEPTORS = "cxf.management.installResponseTimeInterceptors";
public static final String CXF_WS_DISCOVERY_ENABLED = "cxf.ws-discovery.enabled";
+ public static final String JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS = "org.jboss.ws.cxf.disableHandlerAuthChecks";
public static final String JBWS_CXF_JAXWS_CLIENT_BUS_STRATEGY = "org.jboss.ws.cxf.jaxws-client.bus.strategy";
public static final String THREAD_BUS_STRATEGY = "THREAD_BUS";
Modified: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -32,8 +32,13 @@
import java.security.PrivilegedAction;
import java.util.List;
import java.util.Map;
+import java.util.Properties;
import java.util.concurrent.Executor;
+import javax.security.auth.message.config.AuthConfigFactory;
+import javax.security.auth.message.config.AuthConfigProvider;
+import javax.security.auth.message.config.ClientAuthConfig;
+import javax.security.auth.message.config.ServerAuthConfig;
import javax.xml.bind.JAXBContext;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
@@ -55,10 +60,17 @@
import org.apache.cxf.jaxws.DispatchImpl;
import org.apache.cxf.jaxws.ServiceImpl;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.jboss.security.auth.callback.JBossCallbackHandler;
+import org.jboss.security.auth.login.AuthenticationInfo;
+import org.jboss.security.auth.login.BaseAuthenticationInfo;
+import org.jboss.security.auth.login.JASPIAuthenticationInfo;
+import org.jboss.security.config.ApplicationPolicy;
+import org.jboss.security.config.SecurityConfiguration;
import org.jboss.ws.api.configuration.AbstractClientFeature;
import org.jboss.ws.common.utils.DelegateClassLoader;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.config.ClientConfig;
@@ -67,13 +79,102 @@
import org.jboss.wsf.stack.cxf.client.configuration.CXFClientConfigurer;
import org.jboss.wsf.stack.cxf.client.configuration.HandlerChainSortInterceptor;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
+import org.jboss.wsf.stack.cxf.client.jaspi.JaspiClientAuthenticator;
+import org.jboss.wsf.stack.cxf.client.jaspi.JaspiClientInInterceptor;
+import org.jboss.wsf.stack.cxf.client.jaspi.JaspiClientOutInterceptor;
+import org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator;
+import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConfigProvider;
+import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConstants;
import org.w3c.dom.Element;
/**
* A custom javax.xml.ws.spi.Provider implementation
* extending the CXF one while adding few customizations.
+ *
+ * The most important customization is on the CXF Bus used
+ * the Endpoint.publish() or client.
+ * In particular, when a client is created, the thread
+ * default bus, thread context classloader bus and the
+ * bus used for the client being created depend on the
+ * selected strategy:
+ *
+ * * THREAD_BUS strategy
+ *
+ * Bus used for client
+ * =======================================
+ * | | Client Bus |
+ * =======================================
+ * | Default | NULL | New bus (Z) |
+ * | Thread |-------------------------|
+ * | Bus | Bus X | Bus X |
+ * =======================================
+ *
+ * State of buses before and after client creation
+ * =======================================
+ * | Bus | BEFORE | AFTER |
+ * =======================================
+ * | Default | NULL | New bus (Z) |
+ * | Thread |--------------------------|
+ * | Bus | Bus X | Bus X |
+ * =======================================
+ * | TCCL | NULL | NULL |
+ * | Bus |--------------------------|
+ * | | Bus Y | Bus Y |
+ * =======================================
+ *
+ *
+ * * NEW_BUS strategy
+ *
+ * Bus used for client
+ * =======================================
+ * | | Client Bus |
+ * =======================================
+ * | Default | NULL | New bus |
+ * | Thread |-------------------------|
+ * | Bus | Bus X | New bus |
+ * =======================================
+ *
+ * State of buses before and after client creation
+ * =======================================
+ * | Bus | BEFORE | AFTER |
+ * =======================================
+ * | Default | NULL | NULL |
+ * | Thread |--------------------------|
+ * | Bus | Bus X | Bus X |
+ * =======================================
+ * | TCCL | NULL | NULL |
+ * | Bus |--------------------------|
+ * | | Bus Y | Bus Y |
+ * =======================================
+ *
+ *
+ * * TCCL_BUS strategy
+ *
+ * Bus used for client
+ * =======================================
+ * | | Client Bus |
+ * =======================================
+ * | TCCL | NULL | New bus (Z) |
+ * | Bus |-------------------------|
+ * | | Bus Y | Bus Y |
+ * =======================================
+ *
+ * State of buses before and after client creation
+ * =======================================
+ * | Bus | BEFORE | AFTER |
+ * =======================================
+ * | Default | NULL | NULL |
+ * | Thread |--------------------------|
+ * | Bus | Bus X | Bus X |
+ * =======================================
+ * | TCCL | NULL | New bus (Z) |
+ * | Bus |--------------------------|
+ * | | Bus Y | Bus Y |
+ * =======================================
+ *
+ *
*
- * This also ensures a proper context classloader is set
+ * This class also ensures a proper context classloader is set
* (required on JBoss AS 7, as the TCCL does not include
* implementation classes by default)
*
@@ -222,16 +323,24 @@
else if (NEW_BUS_STRATEGY.equals(strategy))
{
bus = new JBossWSBusFactory().createBus();
+ //to prevent issues with CXF code using the default thread bus instead of the one returned here,
+ //set the new bus as thread one, given the line above could have not done this if the current
+ //thread is already assigned a bus
+ BusFactory.setThreadDefaultBus(bus);
}
else if (TCCL_BUS_STRATEGY.equals(strategy))
{
bus = JBossWSBusFactory.getClassLoaderDefaultBus(threadContextClassLoader);
+ //to prevent issues with CXF code using the default thread bus instead of the one returned here,
+ //set the bus as thread one, given the line above could have not done this if we already had a
+ //bus for the classloader and hence we did not create a new one
+ BusFactory.setThreadDefaultBus(bus);
}
return bus;
}
private static void restoreThreadDefaultBus(final String busStrategy, final Bus origBus) {
- if (origBus != null && !busStrategy.equals(Constants.THREAD_BUS_STRATEGY))
+ if (origBus != null || !busStrategy.equals(Constants.THREAD_BUS_STRATEGY))
{
BusFactory.setThreadDefaultBus(origBus);
}
@@ -494,7 +603,14 @@
protected void setupClient(Object obj, WebServiceFeature... features) {
Binding binding = ((BindingProvider)obj).getBinding();
Client client = obj instanceof DispatchImpl<?> ? ((DispatchImpl<?>)obj).getClient() : ClientProxy.getClient(obj);
+
client.getOutInterceptors().add(new HandlerChainSortInterceptor(binding));
+ JaspiClientAuthenticator clientAuthenticator = getJaspiAuthenticator(client) ;
+ if (clientAuthenticator != null) {
+ client.getInInterceptors().add(new JaspiClientInInterceptor(clientAuthenticator));
+ client.getOutInterceptors().add(new JaspiClientOutInterceptor(clientAuthenticator));
+ }
+
if (jbossModulesEnv) { //optimization for avoiding checking for a server config when we know for sure we're out-of-container
ServerConfig sc = getServerConfig();
if (sc != null) {
@@ -515,6 +631,43 @@
}
}
}
+
+ private JaspiClientAuthenticator getJaspiAuthenticator(Client client) {
+ //TODO:Decide where to get the client jaspi security domain
+ String securityDomain = "jaspi-client";
+ ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
+ if (appPolicy == null) {
+ Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
+ return null;
+ }
+ BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
+ if (bai == null || bai instanceof AuthenticationInfo) {
+ Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
+ return null;
+ }
+ JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;
+
+ String contextRoot = client.getEndpoint().getEndpointInfo().getName().toString();
+ String appId = "localhost " + contextRoot;
+ AuthConfigFactory factory = AuthConfigFactory.getFactory();
+ AuthConfigProvider provider = factory.getConfigProvider("soap", appId, null);;
+
+ JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
+ try
+ {
+ ClientAuthConfig clientConfig = provider.getClientAuthConfig("soap", appId, callbackHandler);
+ return new JaspiClientAuthenticator(clientConfig, securityDomain, jai);
+ }
+ catch (Exception e)
+ {
+ //ignore
+ }
+
+ return null;
+
+ }
+
+
}
//lazy get the server config (and try once per classloader only)
@@ -533,5 +686,7 @@
}
return serverConfig;
}
+
+
}
Added: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthConfig.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthConfig.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthConfig.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.jaspi;
+
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.config.ClientAuthContext;
+import javax.security.auth.message.module.ClientAuthModule;
+
+import org.jboss.security.auth.container.config.AuthModuleEntry;
+import org.jboss.security.auth.login.JASPIAuthenticationInfo;
+import org.jboss.security.auth.message.config.JBossClientAuthConfig;
+import org.jboss.security.config.ControlFlag;
+import org.jboss.security.plugins.ClassLoaderLocator;
+import org.jboss.security.plugins.ClassLoaderLocatorFactory;
+
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JBossWSClientAuthConfig extends JBossClientAuthConfig
+{
+
+ @SuppressWarnings("rawtypes")
+ private List modules = new ArrayList();
+ private CallbackHandler callbackHandler;
+
+ @SuppressWarnings("rawtypes")
+ public JBossWSClientAuthConfig(String layer, String appContext, CallbackHandler handler, Map properties)
+ {
+ super(layer, appContext, handler, properties);
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public ClientAuthContext getAuthContext(String authContextID, Subject clientSubject, Map properties) throws AuthException
+ {
+ List<ControlFlag> controlFlags = new ArrayList<ControlFlag>();
+
+ Map<String, Map> mapOptionsByName = new HashMap<String, Map>();
+
+ String secDomain = (String)properties.get("security-domain");
+
+ JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo)properties.get("jaspi-policy");
+ AuthModuleEntry[] amearr = jai.getAuthModuleEntry();
+
+ ClassLoader moduleCL = null;
+ String jbossModule = jai.getJBossModuleName();
+ if (jbossModule != null && !jbossModule.isEmpty())
+ {
+ ClassLoaderLocator locator = ClassLoaderLocatorFactory.get();
+ if (locator != null)
+ moduleCL = locator.get(jbossModule);
+ }
+
+ for (AuthModuleEntry ame : amearr)
+ {
+
+ try
+ {
+ mapOptionsByName.put(ame.getAuthModuleName(), ame.getOptions());
+ controlFlags.add(ame.getControlFlag());
+ ClientAuthModule sam = this.createCAM(moduleCL, ame.getAuthModuleName());
+
+ Map options = new HashMap();
+ sam.initialize(null, null, callbackHandler, options);
+ modules.add(sam);
+ }
+ catch (Exception e)
+ {
+ throw new AuthException(e.getLocalizedMessage());
+ }
+ }
+
+ JBossWSClientAuthContext clientAuthContext = new JBossWSClientAuthContext(modules, mapOptionsByName, this.callbackHandler);
+ clientAuthContext.setControlFlags(controlFlags);
+ return clientAuthContext;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ private ClientAuthModule createCAM(ClassLoader moduleCL, String name) throws Exception
+ {
+ Class clazz = SecurityActions.loadClass(moduleCL, name);
+ Constructor ctr = clazz.getConstructor(new Class[0]);
+ return (ClientAuthModule)ctr.newInstance(new Object[0]);
+ }
+
+ @SuppressWarnings({ "rawtypes" })
+ public List getClientAuthModules()
+ {
+ return modules;
+ }
+
+}
\ No newline at end of file
Property changes on: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthConfig.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthContext.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthContext.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthContext.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.jaspi;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.AuthStatus;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.config.ClientAuthContext;
+import javax.security.auth.message.module.ClientAuthModule;
+
+import org.jboss.security.config.ControlFlag;
+
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JBossWSClientAuthContext implements ClientAuthContext {
+ private List<ClientAuthModule> modules = new ArrayList<ClientAuthModule>();
+ @SuppressWarnings("rawtypes")
+ private Map<String, Map> moduleOptionsByName = new HashMap<String, Map>();
+ protected List<ControlFlag> controlFlags = new ArrayList<ControlFlag>();
+
+ @SuppressWarnings("rawtypes")
+ public JBossWSClientAuthContext(List<ClientAuthModule> modules,
+ Map<String, Map> moduleNameToOptions, CallbackHandler cbh)
+ throws AuthException {
+ this.modules = modules;
+ this.moduleOptionsByName = moduleNameToOptions;
+ for (ClientAuthModule cam : modules) {
+ cam.initialize(null, null, cbh,
+ moduleOptionsByName.get(cam.getClass().getName()));
+ }
+ }
+
+ @Override
+ public void cleanSubject(MessageInfo messageInfo, Subject subject)
+ throws AuthException {
+ for (ClientAuthModule cam : modules) {
+ cam.cleanSubject(messageInfo, subject);
+ }
+
+ }
+
+ public void setControlFlags(List<ControlFlag> controlFlags) {
+ this.controlFlags = controlFlags;
+ }
+
+ @Override
+ public AuthStatus secureRequest(MessageInfo messageInfo,
+ Subject clientSubject) throws AuthException {
+ AuthStatus status = null;
+ for (ClientAuthModule sam : modules) {
+ status = sam.secureRequest(messageInfo, clientSubject);
+ if (status == AuthStatus.FAILURE) {
+ break;
+ }
+ }
+ return status;
+ }
+
+ @Override
+ public AuthStatus validateResponse(MessageInfo messageInfo,
+ Subject clientSubject, Subject serviceSubject) throws AuthException {
+ AuthStatus status = null;
+ for (ClientAuthModule sam : modules) {
+ status = sam.secureRequest(messageInfo, clientSubject);
+ if (status == AuthStatus.FAILURE) {
+ break;
+ }
+ }
+ return status;
+ }
+
+}
\ No newline at end of file
Property changes on: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JBossWSClientAuthContext.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientAuthenticator.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientAuthenticator.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientAuthenticator.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,117 @@
+package org.jboss.wsf.stack.cxf.client.jaspi;
+
+import java.util.Properties;
+
+import javax.security.auth.Subject;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.AuthStatus;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.config.ClientAuthConfig;
+import javax.security.auth.message.config.ClientAuthContext;
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.binding.soap.Soap12;
+import org.apache.cxf.binding.soap.SoapBinding;
+import org.apache.cxf.binding.soap.SoapFault;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.message.Message;
+import org.jboss.security.auth.login.JASPIAuthenticationInfo;
+import org.jboss.security.auth.message.GenericMessageInfo;
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JaspiClientAuthenticator
+{
+ private ClientAuthConfig clientConfig;
+ private String securityDomain;
+ private JASPIAuthenticationInfo jpi;
+
+ public JaspiClientAuthenticator(ClientAuthConfig clientConfig, String securityDomain, JASPIAuthenticationInfo jpi)
+ {
+
+ this.clientConfig = clientConfig;
+ this.securityDomain = securityDomain;
+ this.jpi = jpi;
+ }
+
+ public void secureRequest(SoapMessage message)
+ {
+ SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
+ MessageInfo messageInfo = new GenericMessageInfo(soapMessage, null);
+ String authContextID = clientConfig.getAuthContextID(messageInfo);
+
+ Properties serverContextProperties = new Properties();
+ serverContextProperties.put("security-domain", securityDomain);
+ serverContextProperties.put("jaspi-policy", jpi);
+ Subject clientSubject = new Subject();
+ AuthStatus authStatus = null;
+ try
+ {
+ ClientAuthContext cctx = clientConfig.getAuthContext(authContextID, clientSubject, serverContextProperties);
+ authStatus = cctx.secureRequest(messageInfo, clientSubject);
+ }
+ catch (AuthException e)
+ {
+ if (isSOAP12(message))
+ {
+ SoapFault soap12Fault = new SoapFault(e.getMessage(), Soap12.getInstance().getSender());
+ throw soap12Fault;
+ }
+ else
+ {
+ throw new SoapFault(e.getMessage(), new QName("", "japsi AuthException"));
+ }
+ }
+ //TODO:look at how to handle AuthStatus
+
+ }
+
+ public void validateResponse(SoapMessage message)
+ {
+ SOAPMessage request = message.getExchange().getInMessage().get(SOAPMessage.class);
+ SOAPMessage response = message.getContent(SOAPMessage.class);
+ MessageInfo messageInfo = new GenericMessageInfo(request, response);
+ String authContextID = clientConfig.getAuthContextID(messageInfo);
+
+ Properties serverContextProperties = new Properties();
+ serverContextProperties.put("security-domain", securityDomain);
+ serverContextProperties.put("jaspi-policy", jpi);
+ Subject clientSubject = new Subject();
+ AuthStatus authStatus = null;
+ try
+ {
+ ClientAuthContext sctx = clientConfig.getAuthContext(authContextID, clientSubject, serverContextProperties);
+ authStatus = sctx.validateResponse(messageInfo, new Subject(), new Subject());
+ }
+ catch (AuthException e)
+ {
+ if (isSOAP12(message))
+ {
+ SoapFault soap12Fault = new SoapFault(e.getMessage(), Soap12.getInstance().getSender());
+ throw soap12Fault;
+ }
+ else
+ {
+ throw new SoapFault(e.getMessage(), new QName("", "japsi AuthException"));
+ }
+ }
+ //TODO:handle AuthStatus
+
+ }
+
+ private boolean isSOAP12(Message message)
+ {
+ if (message.getExchange().getBinding() instanceof SoapBinding)
+ {
+ SoapBinding binding = (SoapBinding)message.getExchange().getBinding();
+ if (binding.getSoapVersion() == Soap12.getInstance())
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
+
Property changes on: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientAuthenticator.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientInInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientInInterceptor.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientInInterceptor.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.jaspi;
+
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.Phase;
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JaspiClientInInterceptor extends AbstractSoapInterceptor
+{
+ private JaspiClientAuthenticator authManager;
+ public JaspiClientInInterceptor(JaspiClientAuthenticator authManager)
+ {
+ super(Phase.POST_PROTOCOL_ENDING);
+ addAfter(SAAJOutInterceptor.SAAJOutEndingInterceptor.class.getName());
+ this.authManager = authManager;
+ }
+
+ @Override
+ public void handleMessage(SoapMessage message) throws Fault
+ {
+
+ if (message.getContent(SOAPMessage.class) == null)
+ {
+ SAAJOutInterceptor saajout = new SAAJOutInterceptor();
+ saajout.handleMessage(message);
+ }
+ authManager.validateResponse(message);
+ }
+
+}
Property changes on: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientInInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientOutInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientOutInterceptor.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientOutInterceptor.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.jaspi;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.SAAJPreInInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.Phase;
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JaspiClientOutInterceptor extends AbstractSoapInterceptor
+{
+ private JaspiClientAuthenticator authManager;
+ public JaspiClientOutInterceptor(JaspiClientAuthenticator authManager)
+ {
+ super(Phase.PRE_PROTOCOL);
+ addAfter(SAAJInInterceptor.class.getName());
+ this.authManager = authManager;
+ }
+
+ @Override
+ public void handleMessage(SoapMessage message) throws Fault
+ {
+ if (message.getContent(SOAPMessage.class) == null)
+ {
+ SAAJInInterceptor saajIn = new SAAJInInterceptor();
+ saajIn.handleMessage(message);
+ }
+ SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
+ if (soapMessage == null)
+ {
+ return;
+ }
+
+ SOAPMessage copyMessage = null;
+ try
+ {
+ MessageFactory messageFactory = SAAJPreInInterceptor.INSTANCE.getFactory(message);
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ soapMessage.writeTo(bout);
+ copyMessage = messageFactory.createMessage(soapMessage.getMimeHeaders(), new ByteArrayInputStream(bout.toByteArray()));
+ }
+ catch (SOAPException e)
+ {
+ throw new Fault(e);
+ }
+ catch (IOException e)
+ {
+ throw new Fault(e);
+ }
+ if (copyMessage != null) {
+ message.put(SOAPMessage.class, copyMessage);
+ }
+ try
+ {
+ authManager.secureRequest(message);
+ }
+ finally
+ {
+ message.put(SOAPMessage.class, soapMessage);
+ }
+
+ }
+
+}
Property changes on: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/JaspiClientOutInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/SecurityActions.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/SecurityActions.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/SecurityActions.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.jaspi;
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextAssociation;
+
+class SecurityActions
+{
+ static ClassLoader getContextClassLoader()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+
+ }
+
+ static SecurityContext getSecurityContext()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<SecurityContext>()
+ {
+
+ public SecurityContext run()
+ {
+ return SecurityContextAssociation.getSecurityContext();
+ }
+ });
+ }
+
+ static Class<?> loadClass(final ClassLoader cl, final String name) throws PrivilegedActionException
+ {
+ return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>()
+ {
+ public Class<?> run() throws PrivilegedActionException
+ {
+ if (cl == null)
+ {
+ return loadClass(name);
+ }
+ try
+ {
+ return cl.loadClass(name);
+ }
+ catch (Exception ignore)
+ {
+ return loadClass(name);
+ }
+ }
+ });
+ }
+
+ static Class<?> loadClass(final String name) throws PrivilegedActionException
+ {
+ return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>()
+ {
+ public Class<?> run() throws PrivilegedActionException
+ {
+ try
+ {
+ return getClass().getClassLoader().loadClass(name);
+ }
+ catch (Exception ignore)
+ {
+ try
+ {
+ return getContextClassLoader().loadClass(name);
+ }
+ catch (Exception e)
+ {
+ throw new PrivilegedActionException(e);
+ }
+ }
+ }
+ });
+ }
+}
\ No newline at end of file
Property changes on: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/SecurityActions.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/SOAPClientAuthModule.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/SOAPClientAuthModule.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/SOAPClientAuthModule.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.jaspi.module;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.AuthStatus;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.MessagePolicy;
+import javax.security.auth.message.module.ClientAuthModule;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.SoapVersion;
+import org.apache.cxf.binding.soap.SoapVersionFactory;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.ws.security.WSSConfig;
+import org.jboss.security.SimplePrincipal;
+
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class SOAPClientAuthModule implements ClientAuthModule
+{
+
+ @SuppressWarnings("rawtypes")
+ private List<Class> supportedTypes = new ArrayList<Class>();
+ private SimplePrincipal principal = null;
+ private Object credential = null;
+
+ @SuppressWarnings("unused")
+ private MessagePolicy requestPolicy = null;
+ @SuppressWarnings("unused")
+ private MessagePolicy responsePolicy = null;
+ @SuppressWarnings("unused")
+ private CallbackHandler handler = null;
+ @SuppressWarnings({ "rawtypes" })
+ private Map options = null;
+
+ public SOAPClientAuthModule()
+ {
+ this.supportedTypes.add(Object.class);
+ this.supportedTypes.add(SOAPMessage.class);
+ }
+
+ @SuppressWarnings("rawtypes")
+ public SOAPClientAuthModule(List<Class> supportedTypes)
+ {
+ this.supportedTypes = supportedTypes;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws AuthException
+ {
+ this.requestPolicy = requestPolicy;
+ this.responsePolicy = responsePolicy;
+ this.handler = handler;
+ this.options = options;
+ }
+
+ @SuppressWarnings({ "unchecked" })
+ public AuthStatus secureRequest(MessageInfo messageInfo, Subject source) throws AuthException
+ {
+
+ SOAPMessage soapMessage = (SOAPMessage)messageInfo.getRequestMessage();
+ SoapVersion soapVersion = null;
+ try
+ {
+ String ns = soapMessage.getSOAPBody().getNamespaceURI();
+ soapVersion = SoapVersionFactory.getInstance().getSoapVersion(ns);
+ }
+ catch (SOAPException e)
+ {
+ throw new AuthException(e.getMessage());
+ }
+ if (soapVersion == null)
+ {
+ throw new AuthException("Invalid soap message");
+ }
+
+ Exchange exchange = new ExchangeImpl();
+ MessageImpl messageImpl = new MessageImpl();
+ messageImpl.setExchange(exchange);
+ SoapMessage cxfSoapMessage = new SoapMessage(messageImpl);
+ cxfSoapMessage.setVersion(soapVersion);
+ cxfSoapMessage.setContent(SOAPMessage.class, soapMessage);
+
+ WSSConfig wssConfig = WSSConfig.getNewInstance();
+ cxfSoapMessage.put(WSSConfig.class.getName(), wssConfig);
+
+ WSS4JOutInterceptor wss4jOutInterceptor = new WSS4JOutInterceptor(options);
+ wss4jOutInterceptor.createEndingInterceptor().handleMessage(cxfSoapMessage);
+ return AuthStatus.SUCCESS;
+ }
+
+ public AuthStatus validateResponse(MessageInfo messageInfo, Subject source, Subject recipient) throws AuthException
+ {
+ return AuthStatus.SUCCESS;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Class[] getSupportedMessageTypes()
+ {
+ Class[] clsarr = new Class[this.supportedTypes.size()];
+ supportedTypes.toArray(clsarr);
+ return clsarr;
+ }
+
+ public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
+ {
+ subject.getPrincipals().remove(principal);
+ subject.getPublicCredentials().remove(credential);
+ }
+
+}
Property changes on: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/SOAPClientAuthModule.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/WSS4JOutInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/WSS4JOutInterceptor.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/WSS4JOutInterceptor.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,360 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.jaspi.module;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.binding.soap.SoapFault;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.SoapVersion;
+import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.Phase;
+import org.apache.cxf.phase.PhaseInterceptor;
+import org.apache.cxf.ws.security.wss4j.AbstractWSS4JInterceptor;
+
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSSConfig;
+import org.apache.ws.security.WSSecurityException;
+import org.apache.ws.security.action.Action;
+import org.apache.ws.security.handler.RequestData;
+import org.apache.ws.security.handler.WSHandlerConstants;
+import org.apache.ws.security.util.WSSecurityUtil;
+import org.w3c.dom.Document;
+/**
+ * This is a copy of WSS4JOutInterceptor and public WSS4JOutInterceptorInternal
+ * We need to refactor the WSS4JOutInterceptor and directly use it
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ *
+ */
+public class WSS4JOutInterceptor extends AbstractWSS4JInterceptor {
+
+ /**
+ * Property name for a map of action IDs ({@link Integer}) to action
+ * class names. Values can be either {@link Class}) or Objects
+- * implementing {@link Action}.
+ */
+ public static final String WSS4J_ACTION_MAP = "wss4j.action.map";
+
+ private static final Logger LOG = LogUtils
+ .getL7dLogger(WSS4JOutInterceptor.class);
+
+ private static final Logger TIME_LOG = LogUtils
+ .getL7dLogger(WSS4JOutInterceptor.class,
+ null,
+ WSS4JOutInterceptor.class.getName() + "-Time");
+
+ private WSS4JOutInterceptorInternal ending;
+ private SAAJOutInterceptor saajOut = new SAAJOutInterceptor();
+ private boolean mtomEnabled;
+
+
+
+ public WSS4JOutInterceptor() {
+ super();
+ setPhase(Phase.PRE_PROTOCOL);
+ getAfter().add(SAAJOutInterceptor.class.getName());
+
+ ending = createEndingInterceptor();
+ }
+
+ public WSS4JOutInterceptor(Map<String, Object> props) {
+ this();
+ setProperties(props);
+ }
+
+ public boolean isAllowMTOM() {
+ return mtomEnabled;
+ }
+ /**
+ * Enable or disable mtom with WS-Security. By default MTOM is disabled as
+ * attachments would not get encrypted or be part of the signature.
+ * @param mtomEnabled
+ */
+ public void setAllowMTOM(boolean allowMTOM) {
+ this.mtomEnabled = allowMTOM;
+ }
+
+
+ @Override
+ public Object getProperty(Object msgContext, String key) {
+ // use the superclass first
+ Object result = super.getProperty(msgContext, key);
+
+ // handle the special case of the RECV_RESULTS
+ if (result == null
+ && WSHandlerConstants.RECV_RESULTS.equals(key)
+ && !this.isRequestor((SoapMessage)msgContext)) {
+ result = ((SoapMessage)msgContext).getExchange().getInMessage().get(key);
+ }
+ return result;
+ }
+
+ public void handleMessage(SoapMessage mc) throws Fault {
+ //must turn off mtom when using WS-Sec so binary is inlined so it can
+ //be properly signed/encrypted/etc...
+ if (!mtomEnabled) {
+ mc.put(org.apache.cxf.message.Message.MTOM_ENABLED, false);
+ }
+
+ if (mc.getContent(SOAPMessage.class) == null) {
+ saajOut.handleMessage(mc);
+ }
+
+ mc.getInterceptorChain().add(ending);
+ }
+ public void handleFault(SoapMessage message) {
+ saajOut.handleFault(message);
+ }
+
+ public final WSS4JOutInterceptorInternal createEndingInterceptor() {
+ return new WSS4JOutInterceptorInternal();
+ }
+
+ public class WSS4JOutInterceptorInternal
+ implements PhaseInterceptor<SoapMessage> {
+ public WSS4JOutInterceptorInternal() {
+ super();
+ }
+
+ public void handleMessage(SoapMessage mc) throws Fault {
+
+ boolean doDebug = LOG.isLoggable(Level.FINE);
+ boolean doTimeDebug = TIME_LOG.isLoggable(Level.FINE);
+
+ long t0 = 0;
+ long t1 = 0;
+ long t2 = 0;
+
+ if (doTimeDebug) {
+ t0 = System.currentTimeMillis();
+ }
+
+ if (doDebug) {
+ LOG.fine("WSS4JOutInterceptor: enter handleMessage()");
+ }
+ /**
+ * There is nothing to send...Usually happens when the provider
+ * needs to send a HTTP 202 message (with no content)
+ */
+ if (mc == null) {
+ return;
+ }
+ SoapVersion version = mc.getVersion();
+ RequestData reqData = new RequestData();
+ translateProperties(mc);
+
+ reqData.setMsgContext(mc);
+
+ /*
+ * The overall try, just to have a finally at the end to perform some
+ * housekeeping.
+ */
+ try {
+ WSSConfig config = WSSConfig.getNewInstance();
+ reqData.setWssConfig(config);
+
+ /*
+ * Setup any custom actions first by processing the input properties
+ * and reconfiguring the WSSConfig with the user defined properties.
+ */
+ this.configureActions(mc, doDebug, version, config);
+
+ /*
+ * Get the action first.
+ */
+ List<Integer> actions = new ArrayList<Integer>();
+ String action = getString(WSHandlerConstants.ACTION, mc);
+ if (action == null) {
+ throw new SoapFault(new Message("NO_ACTION", LOG), version
+ .getReceiver());
+ }
+
+ int doAction = WSSecurityUtil.decodeAction(action, actions, config);
+ if (doAction == WSConstants.NO_SECURITY && actions.isEmpty()) {
+ return;
+ }
+
+ /*
+ * For every action we need a username, so get this now. The
+ * username defined in the deployment descriptor takes precedence.
+ */
+ reqData.setUsername((String) getOption(WSHandlerConstants.USER));
+ if (reqData.getUsername() == null
+ || reqData.getUsername().equals("")) {
+ String username = (String) getProperty(reqData.getMsgContext(),
+ WSHandlerConstants.USER);
+ if (username != null) {
+ reqData.setUsername(username);
+ }
+ }
+
+ /*
+ * Now we perform some set-up for UsernameToken and Signature
+ * functions. No need to do it for encryption only. Check if
+ * username is available and then get a passowrd.
+ */
+ if ((doAction & (WSConstants.SIGN | WSConstants.UT | WSConstants.UT_SIGN)) != 0
+ && (reqData.getUsername() == null
+ || reqData.getUsername().equals(""))) {
+ /*
+ * We need a username - if none throw an SoapFault. For
+ * encryption there is a specific parameter to get a username.
+ */
+ throw new SoapFault(new Message("NO_USERNAME", LOG), version
+ .getReceiver());
+ }
+ if (doDebug) {
+ LOG.fine("Action: " + doAction);
+ LOG.fine("Actor: " + reqData.getActor());
+ }
+ /*
+ * Now get the SOAP part from the request message and convert it
+ * into a Document. This forces CXF to serialize the SOAP request
+ * into FORM_STRING. This string is converted into a document.
+ * During the FORM_STRING serialization CXF performs multi-ref of
+ * complex data types (if requested), generates and inserts
+ * references for attachements and so on. The resulting Document
+ * MUST be the complete and final SOAP request as CXF would send it
+ * over the wire. Therefore this must shall be the last (or only)
+ * handler in a chain. Now we can perform our security operations on
+ * this request.
+ */
+
+ SOAPMessage saaj = mc.getContent(SOAPMessage.class);
+
+ if (saaj == null) {
+ LOG.warning("SAAJOutHandler must be enabled for WS-Security!");
+ throw new SoapFault(new Message("NO_SAAJ_DOC", LOG), version
+ .getReceiver());
+ }
+
+ Document doc = saaj.getSOAPPart();
+
+ if (doTimeDebug) {
+ t1 = System.currentTimeMillis();
+ }
+
+ doSenderAction(doAction, doc, reqData, actions, Boolean.TRUE
+ .equals(getProperty(mc, org.apache.cxf.message.Message.REQUESTOR_ROLE)));
+
+ if (doTimeDebug) {
+ t2 = System.currentTimeMillis();
+ TIME_LOG.fine("Send request: total= " + (t2 - t0)
+ + " request preparation= " + (t1 - t0)
+ + " request processing= " + (t2 - t1)
+ + "\n");
+ }
+
+ if (doDebug) {
+ LOG.fine("WSS4JOutInterceptor: exit handleMessage()");
+ }
+ } catch (WSSecurityException e) {
+ throw new SoapFault(new Message("SECURITY_FAILED", LOG), e, version
+ .getSender());
+ } finally {
+ reqData.clear();
+ reqData = null;
+ }
+ }
+
+ public Set<String> getAfter() {
+ return Collections.emptySet();
+ }
+
+ public Set<String> getBefore() {
+ return Collections.emptySet();
+ }
+
+ public String getId() {
+ return WSS4JOutInterceptorInternal.class.getName();
+ }
+
+ public String getPhase() {
+ return Phase.POST_PROTOCOL;
+ }
+
+ public void handleFault(SoapMessage message) {
+ //nothing
+ }
+
+ private void configureActions(SoapMessage mc, boolean doDebug,
+ SoapVersion version, WSSConfig config) {
+
+ final Map<Integer, Object> actionMap = CastUtils.cast(
+ (Map<?, ?>)getProperty(mc, WSS4J_ACTION_MAP));
+ if (actionMap != null) {
+ for (Map.Entry<Integer, Object> entry : actionMap.entrySet()) {
+ Class<?> removedAction = null;
+
+ // Be defensive here since the cast above is slightly risky
+ // with the handler config options not being strongly typed.
+ try {
+ if (entry.getValue() instanceof Class<?>) {
+ removedAction = config.setAction(
+ entry.getKey().intValue(),
+ (Class<?>)entry.getValue());
+ } else if (entry.getValue() instanceof Action) {
+ removedAction = config.setAction(
+ entry.getKey().intValue(),
+ (Action)entry.getValue());
+ } else {
+ throw new SoapFault(new Message("BAD_ACTION", LOG), version
+ .getReceiver());
+ }
+ } catch (ClassCastException e) {
+ throw new SoapFault(new Message("BAD_ACTION", LOG), version
+ .getReceiver());
+ }
+
+ if (doDebug) {
+ if (removedAction != null) {
+ LOG.fine("Replaced Action: " + removedAction.getName()
+ + " with Action: " + entry.getValue()
+ + " for ID: " + entry.getKey());
+ } else {
+ LOG.fine("Added Action: " + entry.getValue()
+ + " with ID: " + entry.getKey());
+ }
+ }
+ }
+ }
+ }
+
+ public Collection<PhaseInterceptor<? extends org.apache.cxf.message.Message>>
+ getAdditionalInterceptors() {
+ return null;
+ }
+ }
+}
Property changes on: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/module/WSS4JOutInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/branches/jaspi/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/dist/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/dist/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/dist/src/main/distro/ReleaseNotes.txt
===================================================================
--- stack/cxf/branches/jaspi/modules/dist/src/main/distro/ReleaseNotes.txt 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/dist/src/main/distro/ReleaseNotes.txt 2013-11-20 10:11:39 UTC (rev 18097)
@@ -58,6 +58,34 @@
Previous Releases ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------
+jbossws-cxf-4.2.3.Final
+-----------------------
+
+Bug
+
+ * [JBWS-3727] - NPE in org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor
+
+Feature Request
+
+ * [JBWS-3730] - Allow disabling JAXWS handler authorization for EJB3 endpoints
+
+Task
+
+ * [JBWS-3663] - Remove eclipse warnings
+ * [JBWS-3723] - Remove io.netty:netty exclusion from jbossws-native dependency in jbossws-cxf main pom
+ * [JBWS-3725] - Set verify-client flag on htts listener in WSSecurityPolicyExamples23xTestCase
+ * [JBWS-3726] - Fix InContainerClientBusStrategyTestCase failures on IBM JDK
+ * [JBWS-3729] - Fix org.jboss.test.ws.jaxws.cxf.noIntegration.CXFEndpointServlet
+ * [JBWS-3731] - Control and document behavior regarding thread default bus changes depending on client bus selection strategy
+
+Errata
+
+ See: https://issues.jboss.org/browse/JBWS-3706
+
+This version of "JBoss Web Services - Stack CXF Distribution" is based on Apache CXF 2.7.7
+
+
+-----------------------
jbossws-cxf-4.2.2.Final
-----------------------
Modified: stack/cxf/branches/jaspi/modules/endorsed/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/endorsed/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/endorsed/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/resources/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/resources/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/resources/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/jboss710/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/jboss710/org/apache/santuario/xmlsec/main/module.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/jboss710/org/apache/santuario/xmlsec/main/module.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -23,6 +23,11 @@
-->
<module xmlns="urn:jboss:module:1.1" name="org.apache.santuario.xmlsec">
+
+ <exports>
+ <exclude path="javax/**"/>
+ </exports>
+
<properties>
<property name="jboss.api" value="private"/>
</properties>
Modified: stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -23,6 +23,11 @@
-->
<module xmlns="urn:jboss:module:1.1" name="org.apache.santuario.xmlsec">
+
+ <exports>
+ <exclude path="javax/**"/>
+ </exports>
+
<properties>
<property name="jboss.api" value="private"/>
</properties>
Modified: stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -23,6 +23,11 @@
-->
<module xmlns="urn:jboss:module:1.1" name="org.apache.santuario.xmlsec">
+
+ <exports>
+ <exclude path="javax/**"/>
+ </exports>
+
<properties>
<property name="jboss.api" value="private"/>
</properties>
Modified: stack/cxf/branches/jaspi/modules/server/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/server/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/server/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -107,16 +107,16 @@
{
bus.setExtension(configurer, Configurer.class);
}
- setInterceptors(bus);
+ Map<String, String> props = (wsmd == null) ? null : wsmd.getProperties();
+ setInterceptors(bus, props);
+
if (authenticator != null) {
bus.getInInterceptors().add(new JaspiSeverInInterceptor(authenticator));
}
setResourceResolver(bus, resolver);
- Map<String, String> props = (wsmd == null) ? null : wsmd.getProperties();
-
if (bus.getExtension(PolicyEngine.class) != null)
{
bus.getExtension(PolicyEngine.class).setAlternativeSelector(getAlternativeSelector(props));
@@ -159,14 +159,18 @@
public abstract Configurer createServerConfigurer(BindingCustomization customization,
WSDLFilePublisher wsdlPublisher, List<Endpoint> depEndpoints, UnifiedVirtualFile root, String epConfigName, String epConfigFile);
- protected static void setInterceptors(Bus bus)
+ protected static void setInterceptors(Bus bus, Map<String, String> props)
{
//Install the EndpointAssociationInterceptor for linking every message exchange
//with the proper spi Endpoint retrieved in CXFServletExt
bus.getInInterceptors().add(new EndpointAssociationInterceptor());
bus.getInInterceptors().add(new EnableDecoupledFaultInterceptor());
bus.getInInterceptors().add(new NsCtxSelectorStoreInterceptor());
- bus.getInInterceptors().add(new HandlerAuthInterceptor());
+
+ final String p = (props != null) ? props.get(Constants.JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS) : null;
+ if ((p == null || (!"true".equalsIgnoreCase(p) && !"1".equalsIgnoreCase(p))) && !Boolean.getBoolean(Constants.JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS)) {
+ bus.getInInterceptors().add(new HandlerAuthInterceptor());
+ }
}
protected static void setResourceResolver(Bus bus, ResourceResolver resourceResolver)
Modified: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -24,6 +24,7 @@
import static org.jboss.wsf.stack.cxf.Messages.MESSAGES;
import java.lang.reflect.Method;
+import java.security.Principal;
import java.util.List;
import javax.xml.ws.handler.Handler;
@@ -147,7 +148,8 @@
}
}
}
- throw MESSAGES.authorizationFailed(secCtx.getUserPrincipal().getName());
+ final Principal p = secCtx.getUserPrincipal();
+ throw MESSAGES.authorizationFailed(p != null ? p.getName() : null);
}
}
}
Deleted: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiClientInInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiClientInInterceptor.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiClientInInterceptor.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf.interceptor;
-
-import javax.xml.soap.SOAPMessage;
-
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
-import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.phase.Phase;
-import org.jboss.wsf.stack.cxf.jaspi.JaspiClientAuthenticator;
-import org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator;
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JaspiClientInInterceptor extends AbstractSoapInterceptor
-{
- private JaspiClientAuthenticator authManager;
- public JaspiClientInInterceptor(JaspiClientAuthenticator authManager)
- {
- super(Phase.POST_PROTOCOL_ENDING);
- addAfter(SAAJOutInterceptor.SAAJOutEndingInterceptor.class.getName());
- this.authManager = authManager;
- }
-
- @Override
- public void handleMessage(SoapMessage message) throws Fault
- {
-
- if (message.getContent(SOAPMessage.class) == null)
- {
- SAAJOutInterceptor saajout = new SAAJOutInterceptor();
- saajout.handleMessage(message);
- }
- authManager.validateResponse(message);
- }
-
-}
Deleted: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiClientOutInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiClientOutInterceptor.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiClientOutInterceptor.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf.interceptor;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
-import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
-import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.SAAJPreInInterceptor;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.phase.Phase;
-import org.jboss.wsf.stack.cxf.jaspi.JaspiClientAuthenticator;
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JaspiClientOutInterceptor extends AbstractSoapInterceptor
-{
- private JaspiClientAuthenticator authManager;
- public JaspiClientOutInterceptor(JaspiClientAuthenticator authManager)
- {
- super(Phase.PRE_PROTOCOL);
- addAfter(SAAJInInterceptor.class.getName());
- this.authManager = authManager;
- }
-
- @Override
- public void handleMessage(SoapMessage message) throws Fault
- {
- if (message.getContent(SOAPMessage.class) == null)
- {
- SAAJInInterceptor saajIn = new SAAJInInterceptor();
- saajIn.handleMessage(message);
- }
- SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
- if (soapMessage == null)
- {
- return;
- }
-
- SOAPMessage copyMessage = null;
- try
- {
- MessageFactory messageFactory = SAAJPreInInterceptor.INSTANCE.getFactory(message);
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- soapMessage.writeTo(bout);
- copyMessage = messageFactory.createMessage(soapMessage.getMimeHeaders(), new ByteArrayInputStream(bout.toByteArray()));
- }
- catch (SOAPException e)
- {
- throw new Fault(e);
- }
- catch (IOException e)
- {
- throw new Fault(e);
- }
- if (copyMessage != null) {
- message.put(SOAPMessage.class, copyMessage);
- }
- try
- {
- authManager.secureRequest(message);
- }
- finally
- {
- message.put(SOAPMessage.class, soapMessage);
- }
-
- }
-
-}
Deleted: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/JaspiClientAuthenticator.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/JaspiClientAuthenticator.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/JaspiClientAuthenticator.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -1,117 +0,0 @@
-package org.jboss.wsf.stack.cxf.jaspi;
-
-import java.util.Properties;
-
-import javax.security.auth.Subject;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthStatus;
-import javax.security.auth.message.MessageInfo;
-import javax.security.auth.message.config.ClientAuthConfig;
-import javax.security.auth.message.config.ClientAuthContext;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPMessage;
-
-import org.apache.cxf.binding.soap.Soap12;
-import org.apache.cxf.binding.soap.SoapBinding;
-import org.apache.cxf.binding.soap.SoapFault;
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.message.Message;
-import org.jboss.security.auth.login.JASPIAuthenticationInfo;
-import org.jboss.security.auth.message.GenericMessageInfo;
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JaspiClientAuthenticator
-{
- private ClientAuthConfig clientConfig;
- private String securityDomain;
- private JASPIAuthenticationInfo jpi;
-
- public JaspiClientAuthenticator(ClientAuthConfig clientConfig, String securityDomain, JASPIAuthenticationInfo jpi)
- {
-
- this.clientConfig = clientConfig;
- this.securityDomain = securityDomain;
- this.jpi = jpi;
- }
-
- public void secureRequest(SoapMessage message)
- {
- SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
- MessageInfo messageInfo = new GenericMessageInfo(soapMessage, null);
- String authContextID = clientConfig.getAuthContextID(messageInfo);
-
- Properties serverContextProperties = new Properties();
- serverContextProperties.put("security-domain", securityDomain);
- serverContextProperties.put("jaspi-policy", jpi);
- Subject clientSubject = new Subject();
- AuthStatus authStatus = null;
- try
- {
- ClientAuthContext cctx = clientConfig.getAuthContext(authContextID, clientSubject, serverContextProperties);
- authStatus = cctx.secureRequest(messageInfo, clientSubject);
- }
- catch (AuthException e)
- {
- if (isSOAP12(message))
- {
- SoapFault soap12Fault = new SoapFault(e.getMessage(), Soap12.getInstance().getSender());
- throw soap12Fault;
- }
- else
- {
- throw new SoapFault(e.getMessage(), new QName("", "japsi AuthException"));
- }
- }
- //TODO:look at how to handle AuthStatus
-
- }
-
- public void validateResponse(SoapMessage message)
- {
- SOAPMessage request = message.getExchange().getInMessage().get(SOAPMessage.class);
- SOAPMessage response = message.getContent(SOAPMessage.class);
- MessageInfo messageInfo = new GenericMessageInfo(request, response);
- String authContextID = clientConfig.getAuthContextID(messageInfo);
-
- Properties serverContextProperties = new Properties();
- serverContextProperties.put("security-domain", securityDomain);
- serverContextProperties.put("jaspi-policy", jpi);
- Subject clientSubject = new Subject();
- AuthStatus authStatus = null;
- try
- {
- ClientAuthContext sctx = clientConfig.getAuthContext(authContextID, clientSubject, serverContextProperties);
- authStatus = sctx.validateResponse(messageInfo, new Subject(), new Subject());
- }
- catch (AuthException e)
- {
- if (isSOAP12(message))
- {
- SoapFault soap12Fault = new SoapFault(e.getMessage(), Soap12.getInstance().getSender());
- throw soap12Fault;
- }
- else
- {
- throw new SoapFault(e.getMessage(), new QName("", "japsi AuthException"));
- }
- }
- //TODO:handle AuthStatus
-
- }
-
- private boolean isSOAP12(Message message)
- {
- if (message.getExchange().getBinding() instanceof SoapBinding)
- {
- SoapBinding binding = (SoapBinding)message.getExchange().getBinding();
- if (binding.getSoapVersion() == Soap12.getInstance())
- {
- return true;
- }
- }
- return false;
- }
-
-}
-
Deleted: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/SOAPClientAuthModule.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/SOAPClientAuthModule.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/SOAPClientAuthModule.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -1,143 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2013, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf.jaspi.module;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthStatus;
-import javax.security.auth.message.MessageInfo;
-import javax.security.auth.message.MessagePolicy;
-import javax.security.auth.message.module.ClientAuthModule;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.binding.soap.SoapVersion;
-import org.apache.cxf.binding.soap.SoapVersionFactory;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.ExchangeImpl;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.ws.security.WSSConfig;
-import org.jboss.security.SimplePrincipal;
-import org.jboss.wsf.stack.cxf.jaspi.interceptor.WSS4JOutInterceptor;
-
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class SOAPClientAuthModule implements ClientAuthModule
-{
-
- @SuppressWarnings("rawtypes")
- private List<Class> supportedTypes = new ArrayList<Class>();
- private SimplePrincipal principal = null;
- private Object credential = null;
-
- @SuppressWarnings("unused")
- private MessagePolicy requestPolicy = null;
- @SuppressWarnings("unused")
- private MessagePolicy responsePolicy = null;
- @SuppressWarnings("unused")
- private CallbackHandler handler = null;
- @SuppressWarnings({ "rawtypes" })
- private Map options = null;
-
- public SOAPClientAuthModule()
- {
- this.supportedTypes.add(Object.class);
- this.supportedTypes.add(SOAPMessage.class);
- }
-
- @SuppressWarnings("rawtypes")
- public SOAPClientAuthModule(List<Class> supportedTypes)
- {
- this.supportedTypes = supportedTypes;
- }
-
- @SuppressWarnings("rawtypes")
- public void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws AuthException
- {
- this.requestPolicy = requestPolicy;
- this.responsePolicy = responsePolicy;
- this.handler = handler;
- this.options = options;
- }
-
- @SuppressWarnings({ "unchecked" })
- public AuthStatus secureRequest(MessageInfo messageInfo, Subject source) throws AuthException
- {
-
- SOAPMessage soapMessage = (SOAPMessage)messageInfo.getRequestMessage();
- SoapVersion soapVersion = null;
- try
- {
- String ns = soapMessage.getSOAPBody().getNamespaceURI();
- soapVersion = SoapVersionFactory.getInstance().getSoapVersion(ns);
- }
- catch (SOAPException e)
- {
- throw new AuthException(e.getMessage());
- }
- if (soapVersion == null)
- {
- throw new AuthException("Invalid soap message");
- }
-
- Exchange exchange = new ExchangeImpl();
- MessageImpl messageImpl = new MessageImpl();
- messageImpl.setExchange(exchange);
- SoapMessage cxfSoapMessage = new SoapMessage(messageImpl);
- cxfSoapMessage.setVersion(soapVersion);
- cxfSoapMessage.setContent(SOAPMessage.class, soapMessage);
-
- WSSConfig wssConfig = WSSConfig.getNewInstance();
- cxfSoapMessage.put(WSSConfig.class.getName(), wssConfig);
-
- WSS4JOutInterceptor wss4jOutInterceptor = new WSS4JOutInterceptor(options);
- wss4jOutInterceptor.createEndingInterceptor().handleMessage(cxfSoapMessage);
- return AuthStatus.SUCCESS;
- }
-
- public AuthStatus validateResponse(MessageInfo messageInfo, Subject source, Subject recipient) throws AuthException
- {
- return AuthStatus.SUCCESS;
- }
-
- @SuppressWarnings("rawtypes")
- public Class[] getSupportedMessageTypes()
- {
- Class[] clsarr = new Class[this.supportedTypes.size()];
- supportedTypes.toArray(clsarr);
- return clsarr;
- }
-
- public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
- {
- subject.getPrincipals().remove(principal);
- subject.getPublicCredentials().remove(credential);
- }
-
-}
Modified: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -225,6 +225,7 @@
portName = name + "Port";
}
+ String annWsdlLocation;
if (anWebService != null && anWebService.endpointInterface().length() > 0)
{
seiName = anWebService.endpointInterface();
@@ -248,8 +249,12 @@
if (seiAnnotation.portName().length() > 0 || seiAnnotation.serviceName().length() > 0 || seiAnnotation.endpointInterface().length() > 0)
throw MESSAGES.webserviceAnnotationSEIAttributes(seiName);
+ annWsdlLocation = !"".equals(anWebService.wsdlLocation()) ? anWebService.wsdlLocation() : seiAnnotation.wsdlLocation();
}
- final String annWsdlLocation = (anWebService != null) ? anWebService.wsdlLocation() : anWebServiceProvider.wsdlLocation();
+ else
+ {
+ annWsdlLocation = (anWebService != null) ? anWebService.wsdlLocation() : anWebServiceProvider.wsdlLocation();
+ }
DDEndpoint result = new DDEndpoint();
@@ -286,7 +291,7 @@
String wsdlAddress = parser.filterSoapAddress(ddep.getServiceName(), ddep.getPortName(), SOAPAddressWSDLParser.SOAP_HTTP_NS);
String rewrittenWsdlAddress = SoapAddressRewriteHelper.getRewrittenPublishedEndpointUrl(wsdlAddress, ddep.getAddress(), sc);
- //If "auto rewrite", leave "publishedEndpointUrl" unset so that CXF do not force host/port values for
+ //If "auto rewrite", leave "publishedEndpointUrl" unset so that CXF does not force host/port values for
//wsdl imports and auto-rewrite them too; otherwise set the new address into "publishedEndpointUrl",
//which causes CXF to override any address in the published wsdl.
if (!SoapAddressRewriteHelper.isAutoRewriteOn(sc)) {
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -293,7 +293,7 @@
result = false;
}
if (!result) {
- System.out.println("Native libraries not available or not loadble, skipping test. " +
+ System.out.println("Native libraries not available or not loadable, skipping test. " +
"Check logs for more details and see https://github.com/adamfisk/LittleProxy/issues/110");
}
return result;
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/BusCounter.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/BusCounter.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/BusCounter.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -28,13 +28,13 @@
public class BusCounter
{
- private final Set<String> set = new HashSet<String>();
+ private final Set<Bus> set = new HashSet<Bus>();
public void count(final Bus bus)
{
synchronized (set)
{
- set.add(bus.getId());
+ set.add(bus);
}
}
@@ -44,4 +44,5 @@
return set.size();
}
}
+
}
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientBusStrategyTests.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientBusStrategyTests.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientBusStrategyTests.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -24,6 +24,7 @@
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.StringTokenizer;
@@ -68,17 +69,22 @@
final String command = javaCmd + props + " -jar " + f.getAbsolutePath() + " " + wsdlAddress + " " + threadPoolSize + " " + invocations;
ByteArrayOutputStream bout = new ByteArrayOutputStream();
executeCommand(command, bout);
- String res = null;
- if (bout.toByteArray() != null) {
- String output = new String(bout.toByteArray());
- BufferedReader reader = new BufferedReader(new java.io.StringReader(output));
- res = reader.readLine();
- }
- StringTokenizer st = new StringTokenizer(res, " ");
+ StringTokenizer st = new StringTokenizer(readFirstLine(bout), " ");
List<Integer> list = new LinkedList<Integer>();
while (st.hasMoreTokens()) {
list.add(Integer.parseInt(st.nextToken()));
}
return list;
}
+
+ private static String readFirstLine(ByteArrayOutputStream bout) throws IOException {
+ bout.flush();
+ final byte[] bytes = bout.toByteArray();
+ if (bytes != null) {
+ BufferedReader reader = new BufferedReader(new java.io.StringReader(new String(bytes)));
+ return reader.readLine();
+ } else {
+ return null;
+ }
+ }
}
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/Helper.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/Helper.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/Helper.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -29,6 +29,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -68,12 +69,12 @@
final BusCounter busCounter = new BusCounter();
final ThreadFactory threadFactory = new ThreadFactory()
{
- private volatile int i = 0;
+ private AtomicInteger i = new AtomicInteger(0);
@Override
public Thread newThread(Runnable r)
{
- return new Thread(r, "JBWS3373-thread-" + i++ + "-" + strategy);
+ return new Thread(r, "JBWS3373-thread-" + i.getAndIncrement() + "-" + strategy);
}
};
ExecutorService es = Executors.newFixedThreadPool(size, threadFactory);
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/HelperUsignThreadLocal.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/HelperUsignThreadLocal.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/HelperUsignThreadLocal.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -29,6 +29,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -69,12 +70,12 @@
final ThreadLocal<HelloWs> port = createPortThreadLocal(wsdlURL, feature, busCounter);
final ThreadFactory threadFactory = new ThreadFactory()
{
- private volatile int i = 0;
+ private AtomicInteger i = new AtomicInteger(0);
@Override
public Thread newThread(Runnable r)
{
- return new Thread(r, "JBWS3373-TL-thread-" + i++ + "-" + strategy);
+ return new Thread(r, "JBWS3373-TL-thread-" + i.getAndIncrement() + "-" + strategy);
}
};
ExecutorService es = Executors.newFixedThreadPool(size, threadFactory);
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/TestClient.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/TestClient.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/TestClient.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -33,5 +33,10 @@
int ret1 = new HelperUsignThreadLocal().run(new URL(wsdlAddress), Integer.parseInt(threadPoolSize), Integer.parseInt(invocations));
int ret2 = new Helper().run(new URL(wsdlAddress), Integer.parseInt(threadPoolSize), Integer.parseInt(invocations));
System.out.println(String.valueOf(ret1) + " " + String.valueOf(ret2));
+
+ //wait a bit before returning as the log processing can be aysnch, the test client
+ //relies on the log contents and the log streams are closed by the system when the
+ //process terminates
+ Thread.sleep(1000);
}
}
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -39,8 +39,16 @@
super.loadBus(servletConfig);
// You could add the endpoint publish codes here
- Bus bus = getBus();
- BusFactory.setThreadDefaultBus(bus);
- Endpoint.publish("/Echo1", new EchoImpl());
+ try {
+ //be sure to use the bus that's been created in loadBus..
+ Bus bus = getBus();
+ BusFactory.setThreadDefaultBus(bus);
+ Endpoint.publish("/Echo1", new EchoImpl());
+ } finally {
+ //free the thread default bus association in the current thread which
+ //is serving the servlet init, as it can have side effect on other
+ //servlet(s) deployed afterwards
+ BusFactory.setThreadDefaultBus(null);
+ }
}
}
Copied: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java (from rev 18096, stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java)
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.saaj.jbws3084;
+
+import java.net.URL;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPMessage;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * [JBWS-3084] Enable control of chunked encoding when using SOAPConnection.
+ *
+ * @author sberyozk(a)redhat.com
+ */
+public class JBWS3084CxfTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(JBWS3084CxfTestCase.class, "saaj-soap-connection.war");
+ }
+
+ public void testSoapConnectionGet() throws Exception
+ {
+ final String serviceURL = "http://" + getServerHost() + ":8080/saaj-soap-connection/greetMe";
+ SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
+
+ SOAPConnection con = conFac.createConnection();
+ URL endpoint = new URL(serviceURL);
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPMessage msg = msgFactory.createMessage();
+ msg.getSOAPBody().addBodyElement(new QName("http://www.jboss.org/jbossws/saaj", "greetMe"));
+ SOAPMessage response = con.call(msg, endpoint);
+ QName greetMeResp = new QName("http://www.jboss.org/jbossws/saaj", "greetMeResponse");
+
+ Iterator<?> sayHiRespIterator = response.getSOAPBody().getChildElements(greetMeResp);
+ SOAPElement soapElement = (SOAPElement) sayHiRespIterator.next();
+ assertNotNull(soapElement);
+
+ assertEquals(1, response.countAttachments());
+ }
+}
Modified: stack/cxf/branches/jaspi/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -193,6 +193,19 @@
</fileset>
</jar>
+ <!-- jaxws-handlerauth3 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-handlerauth3.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.class" />
+ <include name="org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.class" />
+ <include name="org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.class" />
+ <include name="org/jboss/test/ws/jaxws/handlerauth/handlers.xml" />
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/handlerauth/META-INF">
+ <include name="jboss-webservices.xml" />
+ </metainf>
+ </jar>
+
<!-- jaxws-handlerscope -->
<war warfile="${tests.output.dir}/test-libs/jaxws-handlerscope.war" webxml="${tests.output.dir}/test-resources/jaxws/handlerscope/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -44,7 +44,7 @@
{
public static Test suite()
{
- JBossWSTestSetup testSetup = new JBossWSTestSetup(HandlerAuthTestCase.class, "jaxws-handlerauth.jar,jaxws-handlerauth2.jar");
+ JBossWSTestSetup testSetup = new JBossWSTestSetup(HandlerAuthTestCase.class, "jaxws-handlerauth.jar,jaxws-handlerauth2.jar,jaxws-handlerauth3.jar");
Map<String, String> authenticationOptions = new HashMap<String, String>();
authenticationOptions.put("usersProperties",
getResourceFile("jaxws/handlerauth/jbossws-users.properties").getAbsolutePath());
@@ -68,6 +68,67 @@
testAuth(port);
}
+ public void testNoHandlerAuth() throws Exception {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/handlerauth3?wsdl");
+ Service service = Service.create(wsdlURL, new QName("http://ws/", "SecureEndpointImpl3Service"));
+ SecureEndpoint port = service.getPort(new QName("http://ws/", "SecureEndpoint3Port"), SecureEndpoint.class);
+ setUser((BindingProvider)port, "John", "foo");
+ int count = port.getHandlerCounter();
+ int newCount;
+
+ assertEquals("Hello, Mr. John", port.sayHello("John"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ assertEquals("Bye, Mr. John", port.sayBye("John"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ try {
+ port.deniedMethod();
+ fail("Exception expected!");
+ } catch (Exception e) {
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount); //verify count is increased
+ }
+
+ port.ping();
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ assertEquals("foo", port.echo("foo"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+
+ //Change user...
+ setUser((BindingProvider)port, "Bob", "bar");
+
+ assertEquals("Hello, Mr. Bob", port.sayHello("Bob"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ try {
+ port.sayBye("Bob");
+ fail("Exception expected!");
+ } catch (Exception e) {
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount); //verify count is increased
+ }
+
+ try {
+ port.deniedMethod();
+ fail("Exception expected!");
+ } catch (Exception e) {
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount); //verify count is increased
+ }
+
+ assertEquals("foo2", port.echo("foo2"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+ }
+
private void testAuth(final SecureEndpoint port) throws Exception
{
setUser((BindingProvider)port, "John", "foo");
@@ -84,6 +145,7 @@
try {
port.deniedMethod();
+ fail("Exception expected!");
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
@@ -108,6 +170,7 @@
try {
port.sayBye("Bob");
+ fail("Exception expected!");
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
@@ -116,6 +179,7 @@
try {
port.deniedMethod();
+ fail("Exception expected!");
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/LogicalSimpleHandler.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/LogicalSimpleHandler.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/LogicalSimpleHandler.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.ws.jaxws.handlerauth;
+import java.util.concurrent.atomic.AtomicInteger;
+
import javax.xml.namespace.QName;
import javax.xml.ws.handler.LogicalHandler;
import javax.xml.ws.handler.LogicalMessageContext;
@@ -28,7 +30,7 @@
public class LogicalSimpleHandler implements LogicalHandler<LogicalMessageContext>
{
- public static volatile int counter = 0;
+ public static AtomicInteger counter = new AtomicInteger(0);
@Override
public boolean handleMessage(LogicalMessageContext context)
@@ -36,7 +38,7 @@
Boolean isOutbound = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
String operation = ((QName) context.get(MessageContext.WSDL_OPERATION)).getLocalPart();
if (!isOutbound && !operation.equals("getHandlerCounter")) {
- counter++;
+ counter.incrementAndGet();
}
return true;
}
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -90,7 +90,7 @@
}
public int getHandlerCounter() {
- return SimpleHandler.counter;
+ return SimpleHandler.counter.get();
}
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl2.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl2.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl2.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -90,7 +90,7 @@
}
public int getHandlerCounter() {
- return LogicalSimpleHandler.counter;
+ return LogicalSimpleHandler.counter.get();
}
Copied: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java (from rev 18096, stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java)
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.handlerauth;
+
+import javax.jws.Oneway;
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.PermitAll;
+import javax.annotation.security.RolesAllowed;
+
+import javax.jws.WebMethod;
+
+import java.util.Enumeration;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.jws.HandlerChain;
+import javax.xml.soap.SOAPMessage;
+import javax.annotation.PostConstruct;
+
+import java.io.PrintStream;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.ws.api.annotation.WebContext;
+import org.jboss.ejb3.annotation.SecurityDomain;
+import org.jboss.logging.Logger;
+
+@WebService(name = "SecureEndpoint3", targetNamespace = "http://ws/")
+@HandlerChain(file = "handlers.xml")
+@WebContext(contextRoot = "/handlerauth3", urlPattern = "/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+@Stateless
+@SecurityDomain("handlerauth-security-domain")
+@RolesAllowed({"user", "friend"})
+@DeclareRoles({"user", "friend"})
+public class SecureEndpointImpl3 implements SecureEndpoint
+{
+ private Logger log = Logger.getLogger(this.getClass());
+
+ @Resource
+ WebServiceContext context;
+
+ @RolesAllowed("user")
+ public String sayHello(String name)
+ {
+ String principalName = context.getUserPrincipal().getName();
+ if (principalName.equals(name)) {
+ log.info("sayHello() invoked : Hello, Mr. " + name);
+ return "Hello, Mr. " + name;
+ } else {
+ return "Mr. " + name + ", you authenticated as \'" + principalName + "\'";
+ }
+ }
+
+ @RolesAllowed("friend")
+ public String sayBye(String name)
+ {
+ String principalName = context.getUserPrincipal().getName();
+ if (principalName.equals(name)) {
+ log.info("sayBye() invoked : Bye, Mr. " + name);
+ return "Bye, Mr. " + name;
+ } else {
+ return "Mr. " + name + ", you authenticated as \'" + principalName + "\'";
+ }
+ }
+
+ public int getHandlerCounter() {
+ return SimpleHandler.counter.get();
+ }
+
+
+ @Oneway
+ @RolesAllowed("friend")
+ public void ping() {
+ //NOOP
+ }
+
+ @DenyAll
+ public void deniedMethod() {
+ //NOOP
+ }
+
+ @PermitAll
+ public String echo(String s) {
+ return s;
+ }
+}
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -22,6 +22,7 @@
package org.jboss.test.ws.jaxws.handlerauth;
import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.MessageContext;
@@ -30,7 +31,7 @@
public class SimpleHandler implements SOAPHandler<SOAPMessageContext>
{
- public static volatile int counter = 0;
+ public static AtomicInteger counter = new AtomicInteger(0);
@Override
public boolean handleMessage(SOAPMessageContext context)
@@ -38,7 +39,7 @@
Boolean isOutbound = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
String operation = ((QName) context.get(MessageContext.WSDL_OPERATION)).getLocalPart();
if (!isOutbound && !operation.equals("getHandlerCounter")) {
- counter++;
+ counter.incrementAndGet();
}
return true;
}
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -24,6 +24,7 @@
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.IOException;
import javax.xml.ws.spi.Provider;
@@ -84,13 +85,18 @@
final String command = javaCmd + props + " -jar " + f.getAbsolutePath() + " " + getServerHost();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
executeCommand(command, bout);
- String res = null;
- if (bout.toByteArray() != null) {
- String output = new String(bout.toByteArray());
- BufferedReader reader = new BufferedReader(new java.io.StringReader(output));
- res = reader.readLine();
- }
//check result (includes check on Provider impl, which might be affected by missing javax.xml.ws.api module dependency
- assertEquals(Provider.provider().getClass().getName() + ", " + TestClient.REQ_STR, res);
+ assertEquals(Provider.provider().getClass().getName() + ", " + TestClient.REQ_STR, readFirstLine(bout));
}
+
+ private static String readFirstLine(ByteArrayOutputStream bout) throws IOException {
+ bout.flush();
+ final byte[] bytes = bout.toByteArray();
+ if (bytes != null) {
+ BufferedReader reader = new BufferedReader(new java.io.StringReader(new String(bytes)));
+ return reader.readLine();
+ } else {
+ return null;
+ }
+ }
}
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -48,5 +48,10 @@
String serverHost = args[0];
String resStr = testPortAccess(serverHost);
System.out.println(Provider.provider().getClass().getName() + ", " + resStr);
+
+ //wait a bit before returning as the log processing can be aysnch, the test client
+ //relies on the log contents and the log streams are closed by the system when the
+ //process terminates
+ Thread.sleep(1000);
}
}
Modified: stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3293/JBWS3293DispatchTestCase.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3293/JBWS3293DispatchTestCase.java 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3293/JBWS3293DispatchTestCase.java 2013-11-20 10:11:39 UTC (rev 18097)
@@ -92,7 +92,7 @@
StreamSource reqObj = new StreamSource(new StringReader(reqPayload));
Dispatch<Source> dispatch = createDispatch();
Future<?> future = dispatch.invokeAsync(reqObj, handler);
- future.get(1000, TimeUnit.MILLISECONDS);
+ future.get(3000, TimeUnit.MILLISECONDS);
if (handlerException != null)
throw handlerException;
Modified: stack/cxf/branches/jaspi/modules/testsuite/test-utils/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/test-utils/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/modules/testsuite/test-utils/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jaspi/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/pom.xml 2013-11-19 15:47:28 UTC (rev 18096)
+++ stack/cxf/branches/jaspi/pom.xml 2013-11-20 10:11:39 UTC (rev 18097)
@@ -32,7 +32,7 @@
<description>JBossWS CXF stack</description>
- <version>4.2.3-SNAPSHOT</version>
+ <version>4.3.0-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -60,8 +60,8 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.2.Final</jbossws.api.version>
- <jbossws.spi.version>2.2.3-SNAPSHOT</jbossws.spi.version>
- <jbossws.common.version>2.2.4-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>2.3.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.3.0-SNAPSHOT</jbossws.common.version>
<jbossws.common.tools.version>1.2.0.Final</jbossws.common.tools.version>
<jbossws.jboss712.version>4.2.1.Final</jbossws.jboss712.version>
<jbossws.jboss713.version>4.2.1.Final</jbossws.jboss713.version>
@@ -72,7 +72,7 @@
<jboss720.version>7.2.0.Final</jboss720.version>
<wildfly800.version>8.0.0.Beta2-SNAPSHOT</wildfly800.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
- <cxf.version>2.7.7</cxf.version>
+ <cxf.version>2.7.8-SNAPSHOT</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.6.1</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
@@ -104,7 +104,7 @@
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
<xmlsec.version>1.5.5</xmlsec.version>
- <wss4j.version>1.6.12</wss4j.version>
+ <wss4j.version>1.6.13-SNAPSHOT</wss4j.version>
<wstx.version>4.2.0</wstx.version>
<spring.version>3.0.7.RELEASE</spring.version>
<shrinkwrap.version>1.1.3</shrinkwrap.version>
11 years
JBossWS SVN: r18096 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-19 10:47:28 -0500 (Tue, 19 Nov 2013)
New Revision: 18096
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
Log:
[JBWS-3731] Improving javadoc
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-11-18 18:08:22 UTC (rev 18095)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-11-19 15:47:28 UTC (rev 18096)
@@ -76,31 +76,85 @@
* The most important customization is on the CXF Bus used
* the Endpoint.publish() or client.
* In particular, when a client is created, the thread
- * default bus changes depending on the selected strategy:
+ * default bus, thread context classloader bus and the
+ * bus used for the client being created depend on the
+ * selected strategy:
*
- * * Thread default busses with THREAD_BUS strategy
- * ------------------------------------------------------------------
- * |BEFORE client creation | USED for client | AFTER client creation|
- * ------------------------------------------------------------------
- * | NULL | NEW | NEW |
- * | X | X | X |
- * ------------------------------------------------------------------
- *
- * * Thread default busses with NEW_BUS strategy:
- * ------------------------------------------------------------------
- * |BEFORE client creation | USED for client | AFTER client creation|
- * ------------------------------------------------------------------
- * | NULL | NEW | NULL |
- * | X | NEW | X |
- * ------------------------------------------------------------------
- *
- * * Thread default busses with TCCL_BUS strategy:
- * ------------------------------------------------------------------
- * |BEFORE client creation | USED for client | AFTER client creation|
- * ------------------------------------------------------------------
- * | NULL | TCCL | NULL |
- * | X | TCCL | X |
- * ------------------------------------------------------------------
+ * * THREAD_BUS strategy
+ *
+ * Bus used for client
+ * =======================================
+ * | | Client Bus |
+ * =======================================
+ * | Default | NULL | New bus (Z) |
+ * | Thread |-------------------------|
+ * | Bus | Bus X | Bus X |
+ * =======================================
+ *
+ * State of buses before and after client creation
+ * =======================================
+ * | Bus | BEFORE | AFTER |
+ * =======================================
+ * | Default | NULL | New bus (Z) |
+ * | Thread |--------------------------|
+ * | Bus | Bus X | Bus X |
+ * =======================================
+ * | TCCL | NULL | NULL |
+ * | Bus |--------------------------|
+ * | | Bus Y | Bus Y |
+ * =======================================
+ *
+ *
+ * * NEW_BUS strategy
+ *
+ * Bus used for client
+ * =======================================
+ * | | Client Bus |
+ * =======================================
+ * | Default | NULL | New bus |
+ * | Thread |-------------------------|
+ * | Bus | Bus X | New bus |
+ * =======================================
+ *
+ * State of buses before and after client creation
+ * =======================================
+ * | Bus | BEFORE | AFTER |
+ * =======================================
+ * | Default | NULL | NULL |
+ * | Thread |--------------------------|
+ * | Bus | Bus X | Bus X |
+ * =======================================
+ * | TCCL | NULL | NULL |
+ * | Bus |--------------------------|
+ * | | Bus Y | Bus Y |
+ * =======================================
+ *
+ *
+ * * TCCL_BUS strategy
+ *
+ * Bus used for client
+ * =======================================
+ * | | Client Bus |
+ * =======================================
+ * | TCCL | NULL | New bus (Z) |
+ * | Bus |-------------------------|
+ * | | Bus Y | Bus Y |
+ * =======================================
+ *
+ * State of buses before and after client creation
+ * =======================================
+ * | Bus | BEFORE | AFTER |
+ * =======================================
+ * | Default | NULL | NULL |
+ * | Thread |--------------------------|
+ * | Bus | Bus X | Bus X |
+ * =======================================
+ * | TCCL | NULL | New bus (Z) |
+ * | Bus |--------------------------|
+ * | | Bus Y | Bus Y |
+ * =======================================
+ *
+ *
*
* This class also ensures a proper context classloader is set
* (required on JBoss AS 7, as the TCCL does not include
11 years
JBossWS SVN: r18095 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-18 13:08:22 -0500 (Mon, 18 Nov 2013)
New Revision: 18095
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
Log:
[JBWS-3736] soap:address rewrite does not consider wsdlLocation in SEI @WebService
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2013-11-15 13:42:03 UTC (rev 18094)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2013-11-18 18:08:22 UTC (rev 18095)
@@ -225,6 +225,7 @@
portName = name + "Port";
}
+ String annWsdlLocation;
if (anWebService != null && anWebService.endpointInterface().length() > 0)
{
seiName = anWebService.endpointInterface();
@@ -248,8 +249,12 @@
if (seiAnnotation.portName().length() > 0 || seiAnnotation.serviceName().length() > 0 || seiAnnotation.endpointInterface().length() > 0)
throw MESSAGES.webserviceAnnotationSEIAttributes(seiName);
+ annWsdlLocation = !"".equals(anWebService.wsdlLocation()) ? anWebService.wsdlLocation() : seiAnnotation.wsdlLocation();
}
- final String annWsdlLocation = (anWebService != null) ? anWebService.wsdlLocation() : anWebServiceProvider.wsdlLocation();
+ else
+ {
+ annWsdlLocation = (anWebService != null) ? anWebService.wsdlLocation() : anWebServiceProvider.wsdlLocation();
+ }
DDEndpoint result = new DDEndpoint();
@@ -286,7 +291,7 @@
String wsdlAddress = parser.filterSoapAddress(ddep.getServiceName(), ddep.getPortName(), SOAPAddressWSDLParser.SOAP_HTTP_NS);
String rewrittenWsdlAddress = SoapAddressRewriteHelper.getRewrittenPublishedEndpointUrl(wsdlAddress, ddep.getAddress(), sc);
- //If "auto rewrite", leave "publishedEndpointUrl" unset so that CXF do not force host/port values for
+ //If "auto rewrite", leave "publishedEndpointUrl" unset so that CXF does not force host/port values for
//wsdl imports and auto-rewrite them too; otherwise set the new address into "publishedEndpointUrl",
//which causes CXF to override any address in the published wsdl.
if (!SoapAddressRewriteHelper.isAutoRewriteOn(sc)) {
11 years
JBossWS SVN: r18094 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-15 08:42:03 -0500 (Fri, 15 Nov 2013)
New Revision: 18094
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-3734] Moving to cxf and wss4j snapshots
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-11-15 13:19:03 UTC (rev 18093)
+++ stack/cxf/trunk/pom.xml 2013-11-15 13:42:03 UTC (rev 18094)
@@ -72,7 +72,7 @@
<jboss720.version>7.2.0.Final</jboss720.version>
<wildfly800.version>8.0.0.Beta2-SNAPSHOT</wildfly800.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
- <cxf.version>2.7.7</cxf.version>
+ <cxf.version>2.7.8-SNAPSHOT</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.6.1</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
@@ -104,7 +104,7 @@
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
<xmlsec.version>1.5.5</xmlsec.version>
- <wss4j.version>1.6.12</wss4j.version>
+ <wss4j.version>1.6.13-SNAPSHOT</wss4j.version>
<wstx.version>4.2.0</wstx.version>
<spring.version>3.0.7.RELEASE</spring.version>
<shrinkwrap.version>1.1.3</shrinkwrap.version>
11 years
JBossWS SVN: r18093 - in stack/cxf/trunk/modules/resources/src/main/resources/modules: jboss720/org/apache/santuario/xmlsec/main and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-15 08:19:03 -0500 (Fri, 15 Nov 2013)
New Revision: 18093
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/jboss710/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml
Log:
[WFLY-2516] Exclude java.xml.crypto classes from Santuario module exports
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/jboss710/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/jboss710/org/apache/santuario/xmlsec/main/module.xml 2013-11-13 04:35:58 UTC (rev 18092)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/jboss710/org/apache/santuario/xmlsec/main/module.xml 2013-11-15 13:19:03 UTC (rev 18093)
@@ -23,6 +23,11 @@
-->
<module xmlns="urn:jboss:module:1.1" name="org.apache.santuario.xmlsec">
+
+ <exports>
+ <exclude path="javax/**"/>
+ </exports>
+
<properties>
<property name="jboss.api" value="private"/>
</properties>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml 2013-11-13 04:35:58 UTC (rev 18092)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml 2013-11-15 13:19:03 UTC (rev 18093)
@@ -23,6 +23,11 @@
-->
<module xmlns="urn:jboss:module:1.1" name="org.apache.santuario.xmlsec">
+
+ <exports>
+ <exclude path="javax/**"/>
+ </exports>
+
<properties>
<property name="jboss.api" value="private"/>
</properties>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml 2013-11-13 04:35:58 UTC (rev 18092)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml 2013-11-15 13:19:03 UTC (rev 18093)
@@ -23,6 +23,11 @@
-->
<module xmlns="urn:jboss:module:1.1" name="org.apache.santuario.xmlsec">
+
+ <exports>
+ <exclude path="javax/**"/>
+ </exports>
+
<properties>
<property name="jboss.api" value="private"/>
</properties>
11 years
JBossWS SVN: r18092 - in stack/native/tags/jbossws-native-3.1.2.SP15-patch-01: modules/client and 13 other directories.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2013-11-12 23:35:58 -0500 (Tue, 12 Nov 2013)
New Revision: 18092
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/client/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/endorsed/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/src/main/webapp/index.html
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/resources/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/framework-tests/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/pom.xml
Log:
productization
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/client/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/client/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/client/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -37,7 +37,7 @@
<configuration>
<archive>
<manifestEntries>
- <Class-Path>jbossws-spi.jar jbossws-common.jar jbossws-framework.jar jbossws-native-core.jar jbossws-native-factories.jar jaxrpc-api.jar jaxws-api.jar jsr181-api.jar saaj-api.jar activation.jar commons-logging.jar concurrent.jar javassist.jar jaxb-api.jar jaxb-impl.jar mail.jar jboss-logging-spi.jar jboss-logging-log4j.jar jcl-over-slf4j.jar slf4j-api.jar slf4j-jboss-logging.jar jbosssx-client.jar jboss-javaee.jar jboss-remoting.jar jboss-xml-binding.jar jbossxb.jar netty.jar policy.jar stax-api.jar wsdl4j.jar</Class-Path>
+ <Class-Path>jbossws-spi.jar jbossws-common.jar jbossws-framework.jar jbossws-native-core.jar jbossws-native-factories.jar jboss-jaxrpc-api_1.1_spec.jar jaxws-api.jar jsr181-api.jar saaj-api.jar activation.jar commons-logging.jar concurrent.jar javassist.jar jaxb-api.jar jaxb-impl.jar mail.jar jboss-logging-spi.jar jboss-logging-log4j.jar jcl-over-slf4j.jar slf4j-api.jar slf4j-jboss-logging.jar jbosssx-client.jar jboss-javaee.jar jboss-remoting.jar jboss-xml-binding.jar jbossxb.jar netty.jar policy.jar stax-api.jar wsdl4j.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-11-13 04:35:58 UTC (rev 18092)
@@ -76,6 +76,8 @@
{
// provide logging
private static Logger log = Logger.getLogger(WSSecurityDispatcher.class);
+
+ private static boolean VERBOSE_EXCEPTION_REPORTING = Boolean.getBoolean("org.jboss.ws.native.security.verbose_exception_reporting");
public void decodeMessage(WSSecurityConfiguration configuration, SOAPMessage message, Config operationConfig) throws SOAPException
{
@@ -88,7 +90,7 @@
if (secHeaderElement == null)
{
if (hasRequirements(config, fault))
- throw convertToFault(new InvalidSecurityHeaderException("This service requires <wsse:Security>, which is missing."));
+ throw convertToFault(new InvalidSecurityHeaderException("This service requires <wsse:Security>, which is missing."), true);
}
try
@@ -263,8 +265,18 @@
private CommonSOAPFaultException convertToFault(WSSecurityException e)
{
- return new CommonSOAPFaultException(e.getFaultCode(), e.getFaultString());
+ return convertToFault(e, VERBOSE_EXCEPTION_REPORTING);
}
+
+ private CommonSOAPFaultException convertToFault(WSSecurityException e, boolean verbose)
+ {
+ if (verbose) {
+ return new CommonSOAPFaultException(e.getFaultCode(), e.getFaultString());
+ } else {
+ QName faultCode = new QName(Constants.JBOSS_WSSE_NS, "GenericError", Constants.JBOSS_WSSE_PREFIX);
+ return new CommonSOAPFaultException(faultCode, "A WS-Security error occurred.");
+ }
+ }
private List<RequireOperation> buildRequireOperations(Config operationConfig, boolean fault)
{
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java 2013-11-13 04:35:58 UTC (rev 18092)
@@ -32,8 +32,10 @@
import org.jboss.ws.extensions.security.Constants;
import org.jboss.ws.extensions.security.KeyResolver;
import org.jboss.ws.extensions.security.Util;
+import org.jboss.ws.extensions.security.exception.FailedCheckException;
import org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException;
import org.jboss.ws.extensions.security.exception.WSSecurityException;
+import org.jboss.ws.extensions.security.operation.EncryptionOperation;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -128,7 +130,16 @@
}
catch (XMLSecurityException e)
{
- throw new WSSecurityException("Could not parse encrypted key: " + e.getMessage(), e);
+ try
+ {
+ this.secretKey = EncryptionOperation.generateSecretKey(alg);
+ }
+ catch (Exception ex)
+ {
+ WSSecurityException exception = new FailedCheckException(e);
+ exception.setInternal(true);
+ throw exception;
+ }
}
this.document = element.getOwnerDocument();
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java 2013-11-13 04:35:58 UTC (rev 18092)
@@ -32,7 +32,7 @@
{
public static final QName faultCode = new QName(Constants.WSSE_NS, "FailedCheck", Constants.WSSE_PREFIX);
- public static final String faultString = "The signature or decryption was invlaid.";
+ public static final String faultString = "The signature or decryption was invalid.";
public FailedCheckException()
{
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java 2013-11-13 04:35:58 UTC (rev 18092)
@@ -72,4 +72,9 @@
{
return faultString;
}
+
+ public void setInternal(boolean internal)
+ {
+ this.internal = internal;
+ }
}
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java 2013-11-13 04:35:58 UTC (rev 18092)
@@ -107,7 +107,7 @@
}
catch (XMLEncryptionException e)
{
- throw new FailedCheckException("Decryption was invalid.");
+ throw new FailedCheckException(e);
}
catch (Exception e)
{
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-11-13 04:35:58 UTC (rev 18092)
@@ -75,6 +75,7 @@
}
private static HashMap<String, Algorithm> algorithms;
+ private static HashMap<String, String> algorithmsID;
private static final String DEFAULT_ALGORITHM = "aes-128";
@@ -88,6 +89,12 @@
algorithms.put("aes-192-gcm", new Algorithm("AES", XMLCipher.AES_192_GCM, 192));
algorithms.put("aes-256-gcm", new Algorithm("AES", XMLCipher.AES_256_GCM, 256));
algorithms.put("tripledes", new Algorithm("TripleDes", XMLCipher.TRIPLEDES, 168));
+
+ algorithmsID = new HashMap<String, String>(4);
+ algorithmsID.put(XMLCipher.AES_128, "aes-128");
+ algorithmsID.put(XMLCipher.AES_192, "aes-192");
+ algorithmsID.put(XMLCipher.AES_256, "aes-256");
+ algorithmsID.put(XMLCipher.TRIPLEDES, "tripledes");
}
public EncryptionOperation(List<Target> targets, String alias, String algorithm, String wrap, String tokenRefType, String securityDomainAliasLabel)
@@ -130,7 +137,7 @@
}
}
- public SecretKey getSecretKey(String algorithm) throws WSSecurityException
+ private static SecretKey getSecretKey(String algorithm) throws WSSecurityException
{
Algorithm alg = algorithms.get(algorithm);
@@ -146,6 +153,11 @@
}
}
+ public static SecretKey generateSecretKey(String alg) throws WSSecurityException
+ {
+ return getSecretKey(algorithmsID.get(alg));
+ }
+
public void process(Document message, SecurityHeader header, SecurityStore store) throws WSSecurityException
{
if (! algorithms.containsKey(algorithm))
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/endorsed/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/endorsed/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/endorsed/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -50,8 +50,7 @@
<!-- Build -->
<build>
<plugins>
- <plugin>
- <!-- PRE: scm is correctly configured in parent pom -->
+ <!--<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
@@ -69,7 +68,7 @@
</items>
<doUpdate>false</doUpdate>
</configuration>
- </plugin>
+ </plugin>-->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/src/main/webapp/index.html
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/src/main/webapp/index.html 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/src/main/webapp/index.html 2013-11-13 04:35:58 UTC (rev 18092)
@@ -1,6 +1,6 @@
<html><head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
-<title>JBossWS (@implementation.version@)</title>
+<title>JBossWS</title>
<link rel='stylesheet' href='./styles.css'>
</head>
<body>
@@ -19,7 +19,6 @@
<legend><b>Runtime information</b></legend>
<ul>
<li><b>Version: jbossws-native-@version@</b></li>
- <li><b>Build: @buildNumber@</b></li>
<li><a href="services">View a list of deployed services</a></li>
<!--li><a href="depends">View installed dependencies</a></li-->
<li><a href="/jmx-console/">Access JMX console</a></li>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/resources/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/resources/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/resources/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/framework-tests/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/framework-tests/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/framework-tests/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2013-11-13 04:35:58 UTC (rev 18092)
@@ -33,7 +33,6 @@
import junit.framework.Test;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.extensions.security.exception.FailedAuthenticationException;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -50,10 +49,8 @@
private final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1999";
- private static final String FAULT_CODE = "wsse:FailedAuthentication";
+ private static final String FAULT_CODE = "jboss-wsse:GenericError";
- private static final String FAULT_STRING = FailedAuthenticationException.faultString;
-
public static Test suite() throws Exception
{
return new JBossWSTestSetup(JBWS1999TestCase.class, "jaxws-jbws1999.war");
@@ -111,8 +108,6 @@
SOAPFault fault = sfe.getFault();
String faultCode = fault.getFaultCode();
assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault String", FAULT_STRING, faultString);
}
}
@@ -149,8 +144,6 @@
SOAPFault fault = sfe.getFault();
String faultCode = fault.getFaultCode();
assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault Message", FAULT_STRING, faultString);
}
}
@@ -173,8 +166,6 @@
SOAPFault fault = sfe.getFault();
String faultCode = fault.getFaultCode();
assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault Message", FAULT_STRING, faultString);
}
}
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/pom.xml 2013-11-13 04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/pom.xml 2013-11-13 04:35:58 UTC (rev 18092)
@@ -17,7 +17,7 @@
<artifactId>jbossws-native</artifactId>
<packaging>pom</packaging>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<!-- Parent -->
<parent>
11 years
JBossWS SVN: r18091 - stack/native/tags.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2013-11-12 23:19:37 -0500 (Tue, 12 Nov 2013)
New Revision: 18091
Added:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/
Log:
Checking in productized patches
11 years
JBossWS SVN: r18090 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-11 05:49:10 -0500 (Mon, 11 Nov 2013)
New Revision: 18090
Modified:
stack/cxf/trunk/pom.xml
Log:
Updating spi and common versions
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-11-11 10:42:14 UTC (rev 18089)
+++ stack/cxf/trunk/pom.xml 2013-11-11 10:49:10 UTC (rev 18090)
@@ -60,8 +60,8 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.2.Final</jbossws.api.version>
- <jbossws.spi.version>2.2.2.Final</jbossws.spi.version>
- <jbossws.common.version>2.2.3.Final</jbossws.common.version>
+ <jbossws.spi.version>2.3.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.3.0-SNAPSHOT</jbossws.common.version>
<jbossws.common.tools.version>1.2.0.Final</jbossws.common.tools.version>
<jbossws.jboss712.version>4.2.1.Final</jbossws.jboss712.version>
<jbossws.jboss713.version>4.2.1.Final</jbossws.jboss713.version>
11 years
JBossWS SVN: r18089 - common/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-11 05:42:14 -0500 (Mon, 11 Nov 2013)
New Revision: 18089
Modified:
common/trunk/pom.xml
Log:
Moving to 2.3.0-SNAPSHOT
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2013-11-11 10:30:59 UTC (rev 18088)
+++ common/trunk/pom.xml 2013-11-11 10:42:14 UTC (rev 18089)
@@ -9,7 +9,7 @@
<packaging>jar</packaging>
<description>JBossWS Common</description>
- <version>2.2.4-SNAPSHOT</version>
+ <version>2.3.0-SNAPSHOT</version>
<!-- Parent -->
<parent>
11 years
JBossWS SVN: r18088 - common/branches.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-11 05:30:59 -0500 (Mon, 11 Nov 2013)
New Revision: 18088
Added:
common/branches/jbossws-common-2.2.x/
Log:
Branching from rev 18018 for jbossws-common-2.2.x maintenance
11 years