JBossWS SVN: r17672 - in container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices: service and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-06-14 03:48:59 -0400 (Fri, 14 Jun 2013)
New Revision: 17672
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/EndpointServiceDeploymentAspect.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
Log:
[JBWS-3649]:Invoke LifecycleHandler in EndpointService
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/EndpointServiceDeploymentAspect.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/EndpointServiceDeploymentAspect.java 2013-06-14 07:35:08 UTC (rev 17671)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/EndpointServiceDeploymentAspect.java 2013-06-14 07:48:59 UTC (rev 17672)
@@ -28,6 +28,7 @@
import org.jboss.as.webservices.service.EndpointService;
import org.jboss.msc.service.ServiceTarget;
import org.jboss.ws.common.deployment.EndpointLifecycleDeploymentAspect;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.LifecycleHandler;
@@ -37,8 +38,9 @@
*
* @author alessio.soldano(a)jboss.com
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
-public final class EndpointServiceDeploymentAspect extends EndpointLifecycleDeploymentAspect implements Cloneable {
+public final class EndpointServiceDeploymentAspect extends AbstractDeploymentAspect implements Cloneable {
private boolean stopServices = false;
@@ -48,7 +50,6 @@
final DeploymentUnit unit = getRequiredAttachment(dep, DeploymentUnit.class);
for (final Endpoint ep : dep.getService().getEndpoints()) {
EndpointService.install(target, ep, unit);
- getLifecycleHandler(ep, true).start(ep);
}
}
@@ -57,9 +58,6 @@
if (stopServices) {
final DeploymentUnit unit = getRequiredAttachment(dep, DeploymentUnit.class);
for (final Endpoint ep : dep.getService().getEndpoints()) {
- LifecycleHandler lifecycleHandler = getLifecycleHandler(ep, false);
- if (lifecycleHandler != null)
- lifecycleHandler.stop(ep);
EndpointService.uninstall(ep, unit);
}
} else {
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2013-06-14 07:35:08 UTC (rev 17671)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2013-06-14 07:48:59 UTC (rev 17672)
@@ -106,11 +106,13 @@
registerRecordProcessor(processor, endpoint);
}
registerEndpoint(endpoint);
+ endpoint.getLifecycleHandler().start(endpoint);
}
@Override
public void stop(final StopContext context) {
ROOT_LOGGER.stopping(name);
+ endpoint.getLifecycleHandler().stop(endpoint);
endpoint.setSecurityDomainContext(null);
if (hasWebservicesMD(endpoint)) {
pclWebAppControllerValue.getValue().decrementUsers();
12 years, 4 months
JBossWS SVN: r17671 - in container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices: dmr and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-06-14 03:35:08 -0400 (Fri, 14 Jun 2013)
New Revision: 17671
Added:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/ServiceContainerEndpointRegistry.java
Removed:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointRegistryService.java
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSEndpointMetrics.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/PortComponentLinkService.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/EndpointRegistryFactory.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/WSServices.java
Log:
[JBWS-3643]:Change the EndpointRegistry to use MSC's registry
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -243,11 +243,11 @@
void ignoringPortComponentRef(Object o);
@LogMessage(level = ERROR)
- @Message(id = 15591, value = "Cannot register record processor with JMX server")
+ @Message(id = 15591, value = "Cannot register record processor in JMX server")
void cannotRegisterRecordProcessor();
@LogMessage(level = ERROR)
- @Message(id = 15592, value = "Cannot unregister record processor with JMX server")
+ @Message(id = 15592, value = "Cannot unregister record processor from JMX server")
void cannotUnregisterRecordProcessor();
@LogMessage(level = INFO)
@@ -261,4 +261,13 @@
@LogMessage(level = TRACE)
@Message(id = 15597, value = "Child '%s' not found for VirtualFile: %s")
void missingChild(String child, VirtualFile file);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 15600, value = "Cannot register endpoint: %s in JMX server")
+ void cannotRegisterEndpoint(Object endpoint);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 15601, value = "Cannot unregister endpoint: %s from JMX server")
+ void cannotUnregisterEndpoint(Object endpoint);
+
}
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSEndpointMetrics.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSEndpointMetrics.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSEndpointMetrics.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -27,8 +27,6 @@
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
import org.jboss.as.controller.AttributeDefinition;
import org.jboss.as.controller.OperationContext;
@@ -40,9 +38,10 @@
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.ModelType;
import org.jboss.msc.service.ServiceController;
+import org.jboss.msc.service.ServiceName;
+import org.jboss.msc.service.ServiceRegistry;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointMetrics;
-import org.jboss.wsf.spi.management.EndpointRegistry;
/**
* Provides WS endpoint metrics.
@@ -92,10 +91,10 @@
if (context.isNormalServer()) {
context.addStep(new OperationStepHandler() {
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
- final ServiceController<?> controller = context.getServiceRegistry(false).getService(WSServices.REGISTRY_SERVICE);
- if (controller != null) {
+ final ServiceRegistry registry = context.getServiceRegistry(false);
+ if (registry != null) {
try {
- context.getResult().set(getEndpointMetricsFragment(operation, controller));
+ context.getResult().set(getEndpointMetricsFragment(operation, registry));
} catch (Exception e) {
throw new OperationFailedException(new ModelNode(getFallbackMessage() + ": " + e.getMessage()));
}
@@ -111,7 +110,8 @@
context.stepCompleted();
}
- private ModelNode getEndpointMetricsFragment(final ModelNode operation, final ServiceController<?> controller) throws OperationFailedException {
+ @SuppressWarnings("unchecked")
+ private ModelNode getEndpointMetricsFragment(final ModelNode operation, final ServiceRegistry registry) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
String endpointId;
try {
@@ -122,16 +122,9 @@
final String metricName = operation.require(NAME).asString();
final String webContext = endpointId.substring(0, endpointId.indexOf(":"));
final String endpointName = endpointId.substring(endpointId.indexOf(":") + 1);
- ObjectName endpointObjectName;
- try {
- endpointObjectName = new ObjectName("jboss.ws:context=" + webContext + ",endpoint=" + endpointName);
- } catch (final MalformedObjectNameException e) {
- throw new OperationFailedException(new ModelNode().set(e.getMessage()));
- }
-
- final EndpointRegistry registry = (EndpointRegistry) controller.getValue();
- final Endpoint endpoint = registry.getEndpoint(endpointObjectName);
-
+ ServiceName endpointServiceName = WSServices.ENDPOINT_SERVICE.append("context="+webContext).append(endpointName);
+ ServiceController<Endpoint> service = (ServiceController<Endpoint>)WSServices.getContainerRegistry().getService(endpointServiceName);
+ Endpoint endpoint= service.getValue();
final ModelNode result = new ModelNode();
if (endpoint != null && endpoint.getEndpointMetrics() != null) {
final EndpointMetrics endpointMetrics = endpoint.getEndpointMetrics();
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSSubsystemAdd.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -41,7 +41,6 @@
import org.jboss.as.server.AbstractDeploymentChainStep;
import org.jboss.as.server.DeploymentProcessorTarget;
import org.jboss.as.webservices.config.ServerConfigImpl;
-import org.jboss.as.webservices.service.EndpointRegistryService;
import org.jboss.as.webservices.service.PortComponentLinkService;
import org.jboss.as.webservices.service.ServerConfigService;
import org.jboss.as.webservices.util.ModuleClassLoaderProvider;
@@ -85,8 +84,6 @@
if (!appclient) {
ServerConfigImpl serverConfig = createServerConfig(model, false, context);
newControllers.add(ServerConfigService.install(serviceTarget, serverConfig, verificationHandler));
- newControllers.add(EndpointRegistryService.install(serviceTarget, verificationHandler));
-
final Resource webSubsystem = context.readResourceFromRoot(PathAddress.pathAddress(PathElement.pathElement("subsystem", "web")));
String defaultHost = webSubsystem.getModel().get("default-virtual-server").asString();
newControllers.add(PortComponentLinkService.install(serviceTarget, defaultHost, verificationHandler));
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -122,7 +122,6 @@
final EndpointPublishService service = new EndpointPublishService(context, loader, urlPatternToClassName, jbwmd, wsmd, jbwsmd);
final ServiceBuilder<Context> builder = serviceTarget.addService(service.getName(), service);
builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE);
- builder.addDependency(DependencyType.REQUIRED, WSServices.REGISTRY_SERVICE);
builder.addDependency(WebSubsystemServices.JBOSS_WEB_HOST.append(hostName), VirtualHost.class, service.getHostInjector());
return builder;
}
Deleted: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointRegistryService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointRegistryService.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointRegistryService.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, 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.as.webservices.service;
-
-import javax.management.MBeanServer;
-
-import org.jboss.as.webservices.util.WSServices;
-import org.jboss.msc.service.Service;
-import org.jboss.msc.service.ServiceBuilder;
-import org.jboss.msc.service.ServiceBuilder.DependencyType;
-import org.jboss.msc.service.ServiceController;
-import org.jboss.msc.service.ServiceController.Mode;
-import org.jboss.msc.service.ServiceListener;
-import org.jboss.msc.service.ServiceName;
-import org.jboss.msc.service.ServiceTarget;
-import org.jboss.msc.service.StartContext;
-import org.jboss.msc.service.StartException;
-import org.jboss.msc.service.StopContext;
-import org.jboss.msc.value.InjectedValue;
-import org.jboss.ws.common.management.DefaultEndpointRegistry;
-import org.jboss.ws.common.management.ManagedEndpointRegistry;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-
-/**
- * The service for the endpoint registry
- *
- * @author alessio.soldano(a)jboss.com
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class EndpointRegistryService implements Service<EndpointRegistry> {
-
- private static final ServiceName MBEAN_SERVER_NAME = ServiceName.JBOSS.append("mbean", "server");
- private static final EndpointRegistryService INSTANCE = new EndpointRegistryService();
- private final InjectedValue<MBeanServer> injectedMBeanServer = new InjectedValue<MBeanServer>();
- private volatile EndpointRegistry registry;
-
- private EndpointRegistryService() {
- }
-
- @Override
- public EndpointRegistry getValue() {
- return registry;
- }
-
- @Override
- public void start(final StartContext context) throws StartException {
- if (injectedMBeanServer.getValue() != null) {
- final ManagedEndpointRegistry managedEndpointRegistry = new ManagedEndpointRegistry();
- managedEndpointRegistry.setMbeanServer(injectedMBeanServer.getValue());
- registry = managedEndpointRegistry;
- } else {
- registry = new DefaultEndpointRegistry();
- }
- }
-
- @Override
- public void stop(final StopContext context) {
- }
-
- private InjectedValue<MBeanServer> getMBeanServerInjector() {
- return injectedMBeanServer;
- }
-
- public static ServiceController<?> install(final ServiceTarget serviceTarget, final ServiceListener<Object> listener) {
- final ServiceBuilder<EndpointRegistry> builder = serviceTarget.addService(WSServices.REGISTRY_SERVICE, INSTANCE);
- builder.addDependency(DependencyType.OPTIONAL, MBEAN_SERVER_NAME, MBeanServer.class, INSTANCE.getMBeanServerInjector());
- builder.addListener(listener);
- builder.setInitialMode(Mode.ACTIVE);
- return builder.install();
- }
-
-}
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -51,6 +51,7 @@
import org.jboss.security.SecurityUtil;
import org.jboss.ws.api.monitoring.RecordProcessor;
import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.ws.common.management.ManagedEndpoint;
import org.jboss.ws.common.monitoring.ManagedRecordProcessor;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -63,6 +64,7 @@
*
* @author alessio.soldano(a)jboss.com
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public final class EndpointService implements Service<Endpoint> {
@@ -103,7 +105,7 @@
for (final RecordProcessor processor : processors) {
registerRecordProcessor(processor, endpoint);
}
- endpointRegistryValue.getValue().register(endpoint);
+ registerEndpoint(endpoint);
}
@Override
@@ -113,7 +115,7 @@
if (hasWebservicesMD(endpoint)) {
pclWebAppControllerValue.getValue().decrementUsers();
}
- endpointRegistryValue.getValue().unregister(endpoint);
+ unregisterEndpoint(endpoint);
final List<RecordProcessor> processors = endpoint.getRecordProcessors();
for (final RecordProcessor processor : processors) {
unregisterRecordProcessor(processor, endpoint);
@@ -127,7 +129,7 @@
mbeanServer.registerMBean(processor, ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
}
catch (final JMException ex) {
- ROOT_LOGGER.trace("Cannot register endpoint with JMX server, trying with the default ManagedRecordProcessor: " + ex.getMessage());
+ ROOT_LOGGER.trace("Cannot register endpoint in JMX server, trying with the default ManagedRecordProcessor: " + ex.getMessage());
try {
mbeanServer.registerMBean(new ManagedRecordProcessor(processor), ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
}
@@ -152,7 +154,37 @@
ROOT_LOGGER.mBeanServerNotAvailable(processor);
}
}
+
+ private void registerEndpoint(final Endpoint ep) {
+ MBeanServer mbeanServer = mBeanServerValue.getValue();
+ if (mbeanServer != null) {
+ try {
+ ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint, mbeanServer);
+ mbeanServer.registerMBean(jmxEndpoint, endpoint.getName());
+ } catch (final JMException ex) {
+ ROOT_LOGGER.trace("Cannot register endpoint in JMX server", ex);
+ ROOT_LOGGER.cannotRegisterEndpoint(endpoint.getShortName());
+ }
+ } else {
+ ROOT_LOGGER.mBeanServerNotAvailable(endpoint.getShortName());
+ }
+ }
+ private void unregisterEndpoint(final Endpoint ep) {
+ MBeanServer mbeanServer = mBeanServerValue.getValue();
+ if (mbeanServer != null) {
+ try {
+ mbeanServer.unregisterMBean(endpoint.getName());
+ } catch (final JMException ex) {
+ ROOT_LOGGER.trace("Cannot unregister endpoint from JMX server", ex);
+ ROOT_LOGGER.cannotUnregisterEndpoint(endpoint.getShortName());
+ }
+ } else {
+ ROOT_LOGGER.mBeanServerNotAvailable(endpoint.getShortName());
+ }
+ }
+
+
private boolean hasWebservicesMD(final Endpoint endpoint) {
final Deployment dep = endpoint.getService().getDeployment();
return dep.getAttachment(WebservicesMetaData.class) != null;
@@ -175,15 +207,18 @@
}
public static void install(final ServiceTarget serviceTarget, final Endpoint endpoint, final DeploymentUnit unit) {
+
+ final String propContext = endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
+ final String propEndpoint = endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+ final StringBuilder context = new StringBuilder(Endpoint.SEPID_PROPERTY_CONTEXT).append("=").append(propContext);
final ServiceName serviceName = getServiceName(unit, endpoint.getShortName());
final EndpointService service = new EndpointService(endpoint, serviceName);
final ServiceBuilder<Endpoint> builder = serviceTarget.addService(serviceName, service);
+ final ServiceName alias = WSServices.ENDPOINT_SERVICE.append(context.toString()).append(propEndpoint);
+ builder.addAliases(alias);
builder.addDependency(DependencyType.REQUIRED,
SecurityDomainService.SERVICE_NAME.append(getDeploymentSecurityDomainName(endpoint)),
SecurityDomainContext.class, service.getSecurityDomainContextInjector());
- builder.addDependency(DependencyType.REQUIRED, WSServices.REGISTRY_SERVICE,
- EndpointRegistry.class,
- service.getEndpointRegistryInjector());
builder.addDependency(DependencyType.REQUIRED,
WSServices.PORT_COMPONENT_LINK_SERVICE,
WebAppController.class, service.getPclWebAppControllerInjector());
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/PortComponentLinkService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/PortComponentLinkService.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/PortComponentLinkService.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -96,7 +96,6 @@
public static ServiceBuilder<WebAppController> createServiceBuilder(final ServiceTarget serviceTarget, final String hostName) {
final PortComponentLinkService service = new PortComponentLinkService();
final ServiceBuilder<WebAppController> builder = serviceTarget.addService(service.getName(), service);
- builder.addDependency(DependencyType.REQUIRED, WSServices.REGISTRY_SERVICE);
builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE, ServerConfig.class, service.getServerConfigInjector());
builder.addDependency(WebSubsystemServices.JBOSS_WEB_HOST.append(hostName), VirtualHost.class, service.getHostInjector());
return builder;
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/EndpointRegistryFactory.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/EndpointRegistryFactory.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/EndpointRegistryFactory.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -22,19 +22,19 @@
package org.jboss.as.webservices.util;
-import org.jboss.ws.common.management.DefaultEndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistry;
/**
* JBoss AS 7 WS Endpoint registry factory
*
* @author alessio.soldano(a)jboss.com
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
* @since 25-Jan-2012
*
*/
public final class EndpointRegistryFactory extends org.jboss.wsf.spi.management.EndpointRegistryFactory {
- private static final EndpointRegistry fallbackRegistry = new DefaultEndpointRegistry();;
+ private static final EndpointRegistry registry = new ServiceContainerEndpointRegistry();
public EndpointRegistryFactory() {
super();
@@ -46,15 +46,7 @@
* @return endpoint registry
*/
public EndpointRegistry getEndpointRegistry() {
- try {
- EndpointRegistry registry = ASHelper.getMSCService(WSServices.REGISTRY_SERVICE, EndpointRegistry.class);
- if (registry == null) {
- registry = fallbackRegistry;
- }
- return registry;
- } catch (Exception e) {
- return fallbackRegistry;
- }
+ return registry;
}
}
Added: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/ServiceContainerEndpointRegistry.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/ServiceContainerEndpointRegistry.java (rev 0)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/ServiceContainerEndpointRegistry.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.as.webservices.util;
+
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+import javax.management.ObjectName;
+
+import org.jboss.msc.service.ServiceName;
+import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointResolver;
+/**
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ *
+ */
+public class ServiceContainerEndpointRegistry implements EndpointRegistry {
+ final String endpointPrefix = WSServices.ENDPOINT_SERVICE.getCanonicalName() + ".context";
+
+ @Override
+ public Set<ObjectName> getEndpoints() {
+ Set<ObjectName> endpoints = new CopyOnWriteArraySet<ObjectName>();
+ for (ServiceName sname : WSServices.getContainerRegistry().getServiceNames()) {
+ if (sname.getCanonicalName().startsWith(endpointPrefix)) {
+ String contextPath = sname.getParent().getSimpleName().substring(8);
+ String endpointName = sname.getSimpleName();
+ final StringBuilder name = new StringBuilder(Endpoint.SEPID_DOMAIN + ":");
+ name.append(Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + ",");
+ name.append(Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + endpointName);
+ endpoints.add(ObjectNameFactory.create(name.toString()));
+ }
+ }
+ return endpoints;
+ }
+
+ @Override
+ public Endpoint getEndpoint(ObjectName epName) {
+ String context = epName.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
+ String name = epName.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+ ServiceName epSerivceName = WSServices.ENDPOINT_SERVICE.append("context=" + context).append(name);
+ return ASHelper.getMSCService(epSerivceName, Endpoint.class);
+
+ }
+
+ @Override
+ public Endpoint resolve(EndpointResolver resolver) {
+ return resolver.query(getRegisteredEndpoints().iterator());
+ }
+
+ @Override
+ public boolean isRegistered(ObjectName epName) {
+ if (getEndpoint(epName) != null) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void register(Endpoint endpoint) {
+ // TODO:Remove this interface
+
+ }
+
+ @Override
+ public void unregister(Endpoint endpoint) {
+ // TODO:Remove this interface
+ }
+
+ private Set<Endpoint> getRegisteredEndpoints() {
+ Set<Endpoint> endpoints = new CopyOnWriteArraySet<Endpoint>();
+ for (ServiceName sname : WSServices.getContainerRegistry().getServiceNames()) {
+ if (sname.getCanonicalName().startsWith(endpointPrefix)) {
+ endpoints.add(ASHelper.getMSCService(sname, Endpoint.class));
+ }
+ }
+ return endpoints;
+ }
+
+}
Property changes on: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/ServiceContainerEndpointRegistry.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/WSServices.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/WSServices.java 2013-06-14 06:54:17 UTC (rev 17670)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/util/WSServices.java 2013-06-14 07:35:08 UTC (rev 17671)
@@ -36,7 +36,6 @@
public static final ServiceName WS_SERVICE = ServiceName.JBOSS.append("ws");
public static final ServiceName CONFIG_SERVICE = WS_SERVICE.append("config");
- public static final ServiceName REGISTRY_SERVICE = WS_SERVICE.append("registry");
public static final ServiceName MODEL_SERVICE = WS_SERVICE.append("model");
public static final ServiceName ENDPOINT_SERVICE = WS_SERVICE.append("endpoint");
public static final ServiceName ENDPOINT_PUBLISH_SERVICE = WS_SERVICE.append("endpoint-publish");
12 years, 4 months
JBossWS SVN: r17669 - in stack/cxf/branches/JBWS-3648/modules: server/src/main/java/org/jboss/wsf/stack/cxf/configuration and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-06-13 12:10:21 -0400 (Thu, 13 Jun 2013)
New Revision: 17669
Added:
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFour.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFourImpl.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/My-WSSE-conf-BINDING.xml
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/org.jboss.wsf.stack.cxf.policy.PolicyAttachmentStore
Modified:
stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachmentStore.java
stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicySetsAnnotationListener.java
stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java
stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java
stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
stack/cxf/branches/JBWS-3648/modules/server/src/test/java/org/jboss/wsf/stack/cxf/configuration/BusHolderTest.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/BusHolderLifeCycleTestCase.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java
Log:
Scan deployment for custom policy sets definitions
Modified: stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachmentStore.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachmentStore.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachmentStore.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -51,8 +51,7 @@
public class PolicyAttachmentStore
{
private static final String POLICY_ATTACHMENT_LOCATION = "META-INF/policies/";
- private volatile Map<String, List<PolicyAttachment>> attachments;
- private ClassLoader cl;
+ private final Map<String, List<PolicyAttachment>> attachments;
private static PolicyAttachmentStore defaultServerInstance;
/**
@@ -62,7 +61,9 @@
* @param cl
*/
public PolicyAttachmentStore(ClassLoader cl) {
- this.cl = cl;
+ Map<String, List<PolicyAttachment>> map = new HashMap<String, List<PolicyAttachment>>();
+ parsePolicyAttachmentResources(cl, map);
+ attachments = map;
}
/**
@@ -78,18 +79,12 @@
return defaultServerInstance;
}
+ public void merge(PolicyAttachmentStore pas) {
+ this.attachments.putAll(pas.attachments);
+ }
+
public List<PolicyAttachment> get(String setName)
{
- if (attachments == null) {
- synchronized (PolicyAttachmentStore.class)
- {
- if (attachments == null) {
- Map<String, List<PolicyAttachment>> map = new HashMap<String, List<PolicyAttachment>>();
- parsePolicyAttachmentResources(cl, map);
- attachments = map;
- }
- }
- }
List<PolicyAttachment> l = attachments.get(setName);
if (l != null && !l.isEmpty()) {
return Collections.unmodifiableList(l);
@@ -98,6 +93,10 @@
}
}
+ public boolean isEmpty() {
+ return attachments.isEmpty();
+ }
+
private static void parsePolicyAttachmentResources(ClassLoader cl, Map<String, List<PolicyAttachment>> map) {
try {
Enumeration<URL> urls = getResources(cl, POLICY_ATTACHMENT_LOCATION + PolicyAttachmentStore.class.getName());
Modified: stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicySetsAnnotationListener.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicySetsAnnotationListener.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicySetsAnnotationListener.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -65,6 +65,17 @@
this.store = PolicyAttachmentStore.getDefaultInstance();
}
+ public PolicySetsAnnotationListener(ClassLoader cl) {
+ this.store = PolicyAttachmentStore.getDefaultInstance();
+ if (cl != null) {
+ PolicyAttachmentStore pas = new PolicyAttachmentStore(cl);
+ if (!pas.isEmpty()) {
+ pas.merge(this.store);
+ this.store = pas;
+ }
+ }
+ }
+
public PolicySetsAnnotationListener(PolicyAttachmentStore store) {
this.store = store;
}
Modified: stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -92,8 +92,9 @@
* @param resolver The ResourceResolver to configure, if any
* @param configurer The JBossWSCXFConfigurer to install in the bus, if any
* @param wsmd The current JBossWebservicesMetaData, if any
+ * @param depRuntimeClassLoader The current deployment classloader
*/
- public void configure(ResourceResolver resolver, Configurer configurer, JBossWebservicesMetaData wsmd)
+ public void configure(ResourceResolver resolver, Configurer configurer, JBossWebservicesMetaData wsmd, ClassLoader depRuntimeClassLoader)
{
bus.setProperty(org.jboss.wsf.stack.cxf.client.Constants.DEPLOYMENT_BUS, true);
busHolderListener = new BusHolderLifeCycleListener();
@@ -116,7 +117,7 @@
setAdditionalWorkQueues(bus, props);
setWSDiscovery(bus, props);
- policySetsListener = new PolicySetsAnnotationListener();
+ policySetsListener = new PolicySetsAnnotationListener(depRuntimeClassLoader);
bus.getExtension(FactoryBeanListenerManager.class).addListener(policySetsListener);
}
Modified: stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -79,15 +79,16 @@
* @param resolver The ResourceResolver to configure, if any
* @param configurer The JBossWSCXFConfigurer to install in the bus, if any
* @param wsmd The current JBossWebservicesMetaData, if any
+ * @param depRuntimeClassLoader The current deployment classloader
*/
@Override
- public void configure(ResourceResolver resolver, Configurer configurer, JBossWebservicesMetaData wsmd)
+ public void configure(ResourceResolver resolver, Configurer configurer, JBossWebservicesMetaData wsmd, ClassLoader depRuntimeClassLoader)
{
if (configured)
{
throw Messages.MESSAGES.busAlreadyConfigured(bus);
}
- super.configure(resolver, configurer, wsmd);
+ super.configure(resolver, configurer, wsmd, depRuntimeClassLoader);
for (DDEndpoint dde : metadata.getEndpoints())
{
Modified: stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -122,15 +122,16 @@
* @param configurer The JBossWSCXFConfigurer to install in the bus, if any
* @param dep The current JBossWS-SPI Deployment
* @param wsmd The current JBossWebservicesMetaData, if any
+ * @param depRuntimeClassLoader The current deployment classloader
*/
@Override
- public void configure(ResourceResolver resolver, Configurer configurer, JBossWebservicesMetaData wsmd)
+ public void configure(ResourceResolver resolver, Configurer configurer, JBossWebservicesMetaData wsmd, ClassLoader depRuntimeClassLoader)
{
if (configured)
{
throw MESSAGES.busAlreadyConfigured(ctx);
}
- super.configure(resolver, configurer, wsmd);
+ super.configure(resolver, configurer, wsmd, depRuntimeClassLoader);
GenericApplicationContext jbosswsCxfContext = null;
//load stuff from provided jbossws-cxf.xml DD
Modified: stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -126,7 +126,7 @@
Configurer configurer = holder.createServerConfigurer(dep.getAttachment(BindingCustomization.class),
new WSDLFilePublisher(aDep), dep.getService().getEndpoints(), aDep.getRootFile(), epConfigName, epConfigFile);
- holder.configure(resolver, configurer, wsmd);
+ holder.configure(resolver, configurer, wsmd, dep.getRuntimeClassLoader());
dep.addAttachment(BusHolder.class, holder);
}
finally
Modified: stack/cxf/branches/JBWS-3648/modules/server/src/test/java/org/jboss/wsf/stack/cxf/configuration/BusHolderTest.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/server/src/test/java/org/jboss/wsf/stack/cxf/configuration/BusHolderTest.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/server/src/test/java/org/jboss/wsf/stack/cxf/configuration/BusHolderTest.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -64,7 +64,7 @@
}
BusHolder holder = new NonSpringBusHolder(new DDBeans());
try {
- holder.configure(null, null, wsmd);
+ holder.configure(null, null, wsmd, null);
return holder.getBus().getExtension(PolicyEngine.class).getAlternativeSelector().getClass().getName();
} finally {
holder.close();
Modified: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-06-13 16:10:21 UTC (rev 17669)
@@ -346,6 +346,7 @@
<!-- jaxws-cxf-jbws3648-b -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3648-b.war" needxmlfile='false'>
<classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFour*.class"/>
<include name="org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThree*.class"/>
<include name="org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.class"/>
</classes>
@@ -353,6 +354,8 @@
<include name="bob.jks" />
<include name="bob.properties" />
</zipfileset>
+ <zipfileset dir="${tests.output.dir}/test-resources/jaxws/cxf/jbws3648-b/policies"
+ prefix="WEB-INF/classes/META-INF/policies"/>
<manifest>
<attribute name="Dependencies" value="org.jboss.ws.cxf.jbossws-cxf-client, org.apache.ws.security"/>
</manifest>
Modified: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/BusHolderLifeCycleTestCase.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/BusHolderLifeCycleTestCase.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/BusHolderLifeCycleTestCase.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -63,7 +63,7 @@
Bus bus = holder.getBus();
TestLifeCycleListener listener = new TestLifeCycleListener();
bus.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(listener);
- holder.configure(null, null, null);
+ holder.configure(null, null, null, null);
holder.close();
assertEquals("preShutdown method on listener should be called exactly once; number of actual calls: "
+ listener.getCount(), 1, listener.getCount());
@@ -74,7 +74,7 @@
Bus bus = holder.getBus();
TestLifeCycleListener listener = new TestLifeCycleListener();
bus.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(listener);
- holder.configure(null, null, null);
+ holder.configure(null, null, null, null);
bus.shutdown(true);
holder.close();
assertEquals("preShutdown method on listener should be called exactly once; number of actual calls: "
@@ -86,7 +86,7 @@
Bus bus = holder.getBus();
TestLifeCycleListener listener = new TestLifeCycleListener();
bus.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(listener);
- holder.configure(null, null, null);
+ holder.configure(null, null, null, null);
assertEquals("preShutdown method on listener shouldn't be called before holder is closed: number of actual calls: "
+ listener.getCount(), 0, listener.getCount());
holder.close();
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFour.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFour.java (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFour.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -0,0 +1,35 @@
+/*
+ * 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.cxf.jbws3648;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.stack.cxf.policy.PolicySets;
+
+@WebService(name = "EndpointFour", targetNamespace = "http://org.jboss.ws.jaxws.cxf/jbws3648")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@PolicySets({"My-WSSE-conf", "WS-Addressing"})
+public interface EndpointFour
+{
+ String echo(String input);
+}
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFourImpl.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFourImpl.java (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointFourImpl.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -0,0 +1,53 @@
+/*
+ * 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.cxf.jbws3648;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.logging.Logger;
+
+@WebService(name = "EndpointFour",
+ targetNamespace = "http://org.jboss.ws.jaxws.cxf/jbws3648",
+ serviceName = "ServiceFour",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jbws3648.EndpointFour")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.signature.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.encryption.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.signature.username", value = "bob"),
+ @EndpointProperty(key = "ws-security.encryption.username", value = "alice"),
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.cxf.jbws3648.KeystorePasswordCallback")
+ }
+)
+public class EndpointFourImpl implements EndpointThree
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ Logger.getLogger(this.getClass()).info("echo: " + input);
+ return input;
+ }
+}
Modified: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java 2013-06-13 10:40:12 UTC (rev 17668)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java 2013-06-13 16:10:21 UTC (rev 17669)
@@ -63,12 +63,12 @@
QName serviceName = new QName("http://org.jboss.ws.jaxws.cxf/jbws3648", "ServiceThree");
Service service = Service.create(wsdlURL, serviceName);
EndpointThree proxy = (EndpointThree)service.getPort(EndpointThree.class);
- setupWsse(proxy);
+ setupWsse((BindingProvider)proxy);
- assertEquals("Foo", proxy.echo("Foo"));
+ assertEquals("Foo3", proxy.echo("Foo3"));
final String m = bos.toString();
assertTrue("WS-Addressing was not enabled!", m.contains("http://www.w3.org/2005/08/addressing") && m.contains("http://www.w3.org/2005/08/addressing/anonymous"));
- assertTrue("WS-Security was not enabled!", m.contains("http://www.w3.org/2001/04/xmlenc#rsa-1_5"));
+ assertTrue("WS-Security was not enabled!", m.contains("http://www.w3.org/2001/04/xmlenc#rsa-1_5") && m.contains("http://www.w3.org/2001/04/xmlenc#tripledes-cbc"));
} finally {
bus.shutdown(true);
pw.close();
@@ -76,12 +76,37 @@
}
}
- private void setupWsse(EndpointThree proxy)
+ public void testEndpointWithCustomWSSEAndWSA() throws Exception {
+ Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintWriter pw = new PrintWriter(bos);
+ try {
+ bus.getInInterceptors().add(new LoggingInInterceptor(pw));
+
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jbws3648-b/ServiceFour" + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws.jaxws.cxf/jbws3648", "ServiceFour");
+ Service service = Service.create(wsdlURL, serviceName);
+ EndpointFour proxy = (EndpointFour)service.getPort(EndpointFour.class);
+ setupWsse((BindingProvider)proxy);
+
+ assertEquals("Foo4", proxy.echo("Foo4"));
+ final String m = bos.toString();
+ assertTrue("WS-Addressing was not enabled!", m.contains("http://www.w3.org/2005/08/addressing") && m.contains("http://www.w3.org/2005/08/addressing/anonymous"));
+ assertTrue("WS-Security was not enabled!", m.contains("http://www.w3.org/2001/04/xmlenc#rsa-1_5") && m.contains("http://www.w3.org/2001/04/xmlenc#aes256-cbc"));
+ } finally {
+ bus.shutdown(true);
+ pw.close();
+ bos.close();
+ }
+ }
+
+ private void setupWsse(BindingProvider proxy)
{
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "alice");
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+ proxy.getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
+ proxy.getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ proxy.getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ proxy.getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+ proxy.getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "bob");
}
}
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/My-WSSE-conf-BINDING.xml
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/My-WSSE-conf-BINDING.xml (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/My-WSSE-conf-BINDING.xml 2013-06-13 16:10:21 UTC (rev 17669)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy wsu:Id="My-WSSE-conf_binding_policy"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding>
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssX509V1Token11/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V1Token11/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256Rsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:ProtectTokens/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ <sp:EncryptBeforeSigning/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:SignedParts>
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts>
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:Wss10>
+ <wsp:Policy>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
\ No newline at end of file
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/org.jboss.wsf.stack.cxf.policy.PolicyAttachmentStore
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/org.jboss.wsf.stack.cxf.policy.PolicyAttachmentStore (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/policies/org.jboss.wsf.stack.cxf.policy.PolicyAttachmentStore 2013-06-13 16:10:21 UTC (rev 17669)
@@ -0,0 +1 @@
+My-WSSE-conf
\ No newline at end of file
12 years, 4 months
JBossWS SVN: r17668 - in stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648 and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-06-13 06:40:12 -0400 (Thu, 13 Jun 2013)
New Revision: 17668
Added:
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThree.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThreeImpl.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/META-INF/
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/META-INF/alice.jks
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/META-INF/alice.properties
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/WEB-INF/
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/WEB-INF/bob.jks
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/WEB-INF/bob.properties
Modified:
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
Adding testcase using WSSE + WSSA through @PolicySets
Modified: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-06-13 10:38:02 UTC (rev 17667)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-06-13 10:40:12 UTC (rev 17668)
@@ -343,6 +343,27 @@
</manifest>
</war>
+ <!-- jaxws-cxf-jbws3648-b -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3648-b.war" needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThree*.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.class"/>
+ </classes>
+ <zipfileset dir="${tests.output.dir}/test-resources/jaxws/cxf/jbws3648-b/WEB-INF" prefix="WEB-INF/classes">
+ <include name="bob.jks" />
+ <include name="bob.properties" />
+ </zipfileset>
+ <manifest>
+ <attribute name="Dependencies" value="org.jboss.ws.cxf.jbossws-cxf-client, org.apache.ws.security"/>
+ </manifest>
+ </war>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3648-b-client.jar">
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/cxf/jbws3648-b/META-INF">
+ <include name="alice.properties" />
+ <include name="alice.jks" />
+ </metainf>
+ </jar>
+
<!-- jaxws-cxf-logging -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-cxf-logging.jar">
<fileset dir="${tests.output.dir}/test-classes">
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThree.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThree.java (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThree.java 2013-06-13 10:40:12 UTC (rev 17668)
@@ -0,0 +1,35 @@
+/*
+ * 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.cxf.jbws3648;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.stack.cxf.policy.PolicySets;
+
+@WebService(name = "EndpointThree", targetNamespace = "http://org.jboss.ws.jaxws.cxf/jbws3648")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@PolicySets({"AsymmetricBinding_X509v1_TripleDesRsa15_EncryptBeforeSigning_ProtectTokens", "WS-Addressing"})
+public interface EndpointThree
+{
+ String echo(String input);
+}
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThreeImpl.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThreeImpl.java (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/EndpointThreeImpl.java 2013-06-13 10:40:12 UTC (rev 17668)
@@ -0,0 +1,53 @@
+/*
+ * 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.cxf.jbws3648;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.logging.Logger;
+
+@WebService(name = "EndpointThree",
+ targetNamespace = "http://org.jboss.ws.jaxws.cxf/jbws3648",
+ serviceName = "ServiceThree",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jbws3648.EndpointThree")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.signature.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.encryption.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.signature.username", value = "bob"),
+ @EndpointProperty(key = "ws-security.encryption.username", value = "alice"),
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.cxf.jbws3648.KeystorePasswordCallback")
+ }
+)
+public class EndpointThreeImpl implements EndpointThree
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ Logger.getLogger(this.getClass()).info("echo: " + input);
+ return input;
+ }
+}
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.java (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.java 2013-06-13 10:40:12 UTC (rev 17668)
@@ -0,0 +1,71 @@
+/*
+ * 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.cxf.jbws3648;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class KeystorePasswordCallback implements CallbackHandler
+{
+
+ private Map<String, String> passwords = new HashMap<String, String>();
+
+ public KeystorePasswordCallback()
+ {
+ passwords.put("alice", "password");
+ passwords.put("bob", "password");
+ passwords.put("john", "password");
+ }
+
+ /**
+ * It attempts to get the password from the private
+ * alias/passwords map.
+ */
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ for (int i = 0; i < callbacks.length; i++)
+ {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+ String pass = passwords.get(pc.getIdentifier());
+ if (pass != null)
+ {
+ pc.setPassword(pass);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Add an alias/password pair to the callback mechanism.
+ */
+ public void setAliasPassword(String alias, String password)
+ {
+ passwords.put(alias, password);
+ }
+}
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java 2013-06-13 10:40:12 UTC (rev 17668)
@@ -0,0 +1,87 @@
+/*
+ * 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.cxf.jbws3648;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ *
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 13-Jun-2013
+ */
+public class PolicyAttachmentTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(PolicyAttachmentTestCase.class, "jaxws-cxf-jbws3648-b.war, jaxws-cxf-jbws3648-b-client.jar");
+ }
+
+ public void testEndpointWithWSSEAndWSA() throws Exception {
+ Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintWriter pw = new PrintWriter(bos);
+ try {
+ bus.getInInterceptors().add(new LoggingInInterceptor(pw));
+
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jbws3648-b/ServiceThree" + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws.jaxws.cxf/jbws3648", "ServiceThree");
+ Service service = Service.create(wsdlURL, serviceName);
+ EndpointThree proxy = (EndpointThree)service.getPort(EndpointThree.class);
+ setupWsse(proxy);
+
+ assertEquals("Foo", proxy.echo("Foo"));
+ final String m = bos.toString();
+ assertTrue("WS-Addressing was not enabled!", m.contains("http://www.w3.org/2005/08/addressing") && m.contains("http://www.w3.org/2005/08/addressing/anonymous"));
+ assertTrue("WS-Security was not enabled!", m.contains("http://www.w3.org/2001/04/xmlenc#rsa-1_5"));
+ } finally {
+ bus.shutdown(true);
+ pw.close();
+ bos.close();
+ }
+ }
+
+ private void setupWsse(EndpointThree proxy)
+ {
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+ }
+}
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/META-INF/alice.jks
===================================================================
(Binary files differ)
Property changes on: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/META-INF/alice.jks
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/META-INF/alice.properties
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/META-INF/alice.properties (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/META-INF/alice.properties 2013-06-13 10:40:12 UTC (rev 17668)
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=password
+org.apache.ws.security.crypto.merlin.keystore.alias=alice
+org.apache.ws.security.crypto.merlin.file=META-INF/alice.jks
\ No newline at end of file
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/WEB-INF/bob.jks
===================================================================
(Binary files differ)
Property changes on: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/WEB-INF/bob.jks
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/WEB-INF/bob.properties
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/WEB-INF/bob.properties (rev 0)
+++ stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3648-b/WEB-INF/bob.properties 2013-06-13 10:40:12 UTC (rev 17668)
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=password
+org.apache.ws.security.crypto.merlin.keystore.alias=bob
+org.apache.ws.security.crypto.merlin.file=bob.jks
\ No newline at end of file
12 years, 5 months
JBossWS SVN: r17667 - stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-06-13 06:38:02 -0400 (Thu, 13 Jun 2013)
New Revision: 17667
Modified:
stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachment.java
stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachmentStore.java
stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicySetsAnnotationListener.java
Log:
Some cleanup
Modified: stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachment.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachment.java 2013-06-08 10:24:31 UTC (rev 17666)
+++ stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachment.java 2013-06-13 10:38:02 UTC (rev 17667)
@@ -24,19 +24,16 @@
import java.io.InputStream;
import java.net.URL;
-import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import org.apache.cxf.annotations.Policy.Placement;
import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.resource.ExtendedURIResolver;
import org.apache.cxf.staxutils.StaxUtils;
import org.apache.cxf.ws.policy.PolicyConstants;
import org.jboss.wsf.stack.cxf.Messages;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
/**
* A lazy-loaded Policy attachment reference
@@ -61,40 +58,6 @@
{
return placement;
}
-
-// public Element read(String defName)
-// {
-// String id = uri;
-// ExtendedURIResolver resolver = new ExtendedURIResolver();
-// InputSource src = resolver.resolve(id, "classpath:");
-// if (null == src)
-// {
-// return null;
-// }
-// XMLStreamReader reader = null;
-// try
-// {
-// reader = StaxUtils.createXMLStreamReader(src);
-// Document doc = StaxUtils.read(reader);
-// Element elem = doc.getDocumentElement();
-// id = elem.getAttributeNS(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_ID_ATTR_NAME);
-// if (StringUtils.isEmpty(id))
-// {
-// Attr att = doc.createAttributeNS(PolicyConstants.WSU_NAMESPACE_URI, "wsu:" + PolicyConstants.WSU_ID_ATTR_NAME);
-// att.setNodeValue(defName);
-// elem.setAttributeNodeNS(att);
-// }
-// return elem;
-// }
-// catch (XMLStreamException e)
-// {
-// throw new RuntimeException(e);
-// }
-// finally
-// {
-// StaxUtils.close(reader);
-// }
-// }
public Element read(String defName)
{
Modified: stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachmentStore.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachmentStore.java 2013-06-08 10:24:31 UTC (rev 17666)
+++ stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicyAttachmentStore.java 2013-06-13 10:38:02 UTC (rev 17667)
@@ -55,11 +55,23 @@
private ClassLoader cl;
private static PolicyAttachmentStore defaultServerInstance;
+ /**
+ * Creates a PolicyAttachmentStore parsing policy sets located
+ * using the provided classloader.
+ *
+ * @param cl
+ */
public PolicyAttachmentStore(ClassLoader cl) {
this.cl = cl;
}
- public static synchronized PolicyAttachmentStore getDefaultServerInstance() {
+ /**
+ * Get a singleton PolicyAttachmentStore getting policy sets using
+ * the classloader of JBossWS-CXF JAXWS Provider SPI impl.
+ *
+ * @return
+ */
+ public static synchronized PolicyAttachmentStore getDefaultInstance() {
if (defaultServerInstance == null) {
defaultServerInstance = new PolicyAttachmentStore(ProviderImpl.class.getClassLoader());
}
Modified: stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicySetsAnnotationListener.java
===================================================================
--- stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicySetsAnnotationListener.java 2013-06-08 10:24:31 UTC (rev 17666)
+++ stack/cxf/branches/JBWS-3648/modules/client/src/main/java/org/jboss/wsf/stack/cxf/policy/PolicySetsAnnotationListener.java 2013-06-13 10:38:02 UTC (rev 17667)
@@ -46,7 +46,6 @@
import org.apache.cxf.service.model.ServiceInfo;
import org.apache.cxf.ws.policy.PolicyConstants;
import org.apache.neethi.Constants;
-import org.jboss.logging.Logger;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -59,12 +58,11 @@
*/
public class PolicySetsAnnotationListener implements FactoryBeanListener
{
- private final Map<Class<?>, EndpointPolicyAttachments> epaMap = new HashMap<Class<?>, EndpointPolicyAttachments>(); //usare la SEI come class
- private static final Logger LOG = Logger.getLogger(PolicySetsAnnotationListener.class);
+ private final Map<Class<?>, EndpointPolicyAttachments> epaMap = new HashMap<Class<?>, EndpointPolicyAttachments>();
private PolicyAttachmentStore store;
public PolicySetsAnnotationListener() {
- this.store = PolicyAttachmentStore.getDefaultServerInstance();
+ this.store = PolicyAttachmentStore.getDefaultInstance();
}
public PolicySetsAnnotationListener(PolicyAttachmentStore store) {
@@ -84,44 +82,20 @@
public void handleEvent(Event ev, AbstractServiceFactoryBean factory, Object... args)
{
-// Logger.getLogger(this.getClass()).info("**** EVENT: " + ev + "# Args: ");
-// for (Object o : args) {
-// Logger.getLogger(this.getClass()).info(o);
-// }
switch (ev)
{
-// case INTERFACE_CREATED : {
-// InterfaceInfo ii = (InterfaceInfo) args[0];
-// Class<?> cls = (Class<?>) args[1];
-// addPolicies(factory, ii, cls);
-// break;
-// }
-
case ENDPOINT_SELECTED : {
Class<?> cls = (Class<?>) args[2];
Class<?> implCls = (Class<?>) args[3];
Endpoint ep = (Endpoint) args[1];
-// if (ep.getEndpointInfo().getInterface() != null)
-// {
-// addPolicies(factory, ep, cls);
-// }
addPolicies(factory, ep, cls, implCls);
break;
}
-
-// case INTERFACE_OPERATION_BOUND : { //TODO possibly remove either this block or next one
-// OperationInfo inf = (OperationInfo) args[0];
-// Method m = (Method) args[1];
-// addPolicies(factory, inf, m);
-// break;
-// }
-
case BINDING_OPERATION_CREATED :
BindingOperationInfo boi = (BindingOperationInfo) args[1];
Method m = (Method) args[2];
addPolicies(factory, boi.getOperationInfo(), m);
break;
-
default :
//ignore
}
@@ -211,47 +185,19 @@
}
}
-// private void addPolicies(AbstractServiceFactoryBean factory, InterfaceInfo ii, Class<?> cls)
-// {
-// if (cls == null)
-// {
-// return;
-// }
-// EndpointPolicyAttachment epa = epaMap.get(cls);
-// if (epa != null)
-// {
-// for (PolicyAttachment pa : epa.getPolicyAttachment(Placement.PORT_TYPE)) {
-// addPolicy(ii, ii.getService(), pa, cls, ii.getName().getLocalPart() + "PortTypePolicy");
-// }
-// for (PolicyAttachment pa : epa.getPolicyAttachment(Placement.SERVICE)) {
-// addPolicy(ii, ii.getService(), pa, cls, ii.getName().getLocalPart() + "PortTypePolicy");
-// }
-// }
-// }
-
private void addPolicy(AbstractPropertiesHolder place, ServiceInfo service, PolicyAttachment pa, Class<?> cls, String defName)
{
- LOG.info("***** " + place + ", " + pa.getPlacement() + ", " + service + ", " + cls + ", " + defName);
Element el = addPolicy(service, pa, cls, defName);
-// if (el != null)
-// {
- UnknownExtensibilityElement uee = new UnknownExtensibilityElement();
- uee.setElement(el);
- uee.setRequired(true);
- uee.setElementType(DOMUtils.getElementQName(el));
- place.addExtensor(uee);
-// }
+ UnknownExtensibilityElement uee = new UnknownExtensibilityElement();
+ uee.setElement(el);
+ uee.setRequired(true);
+ uee.setElementType(DOMUtils.getElementQName(el));
+ place.addExtensor(uee);
}
private Element addPolicy(ServiceInfo service, PolicyAttachment pa, Class<?> cls, String defName)
{
Element element = pa.read(defName);
-// if (element == null)
-// {
-// return null;
-// }
-
- // might have been updated on load policy
String refId = getPolicyId(element);
ROOT_LOGGER.addingPolicyAttachment(pa.getPlacement(), refId, cls);
12 years, 5 months
JBossWS SVN: r17666 - in stack/cxf/trunk/modules/testsuite: cxf-tests/scripts and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-06-08 06:24:31 -0400 (Sat, 08 Jun 2013)
New Revision: 17666
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/MANIFEST.MF
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3560]:Add fastinfoset feature test
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-06-07 14:55:24 UTC (rev 17665)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-06-08 10:24:31 UTC (rev 17666)
@@ -203,6 +203,17 @@
<include name="org/jboss/test/ws/jaxws/cxf/endpoint/HelloWorld*.class"/>
</classes>
</war>
+
+ <!-- jaxws-cxf-fastinfoset -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-fastinfoset.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld*.class"/>
+ </classes>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.cxf"/>
+ </manifest>
+ </war>
+
<!-- jaxws-cxf-gzip -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-gzip.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/gzip/WEB-INF/web.xml">
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java 2013-06-08 10:24:31 UTC (rev 17666)
@@ -0,0 +1,77 @@
+/*
+ * 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.cxf.fastinfoset;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+public class FastInfosetTestCase extends JBossWSTest
+{
+ private String endpointURl = "http://" + getServerHost() + ":8080/jaxws-cxf-fastinfoset/HelloWorldService/HelloWorldImpl";
+
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(FastInfosetTestCase.class, "jaxws-cxf-fastinfoset.war");
+ }
+
+
+ public void testInfoset() throws Exception
+ {
+ ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();
+ ByteArrayOutputStream in = new java.io.ByteArrayOutputStream();
+ LoggingInInterceptor login = new LoggingInInterceptor(new PrintWriter(in));
+ LoggingOutInterceptor logout = new LoggingOutInterceptor(new PrintWriter(out));
+ Bus bus = BusFactory.getThreadDefaultBus();
+ bus.getInInterceptors().add(login);
+ bus.getOutInterceptors().add(logout);
+
+ URL wsdlURL = new URL(endpointURl + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldService");
+ Service service = Service.create(wsdlURL, serviceName);
+ QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldImplPort");
+ HelloWorld port = (HelloWorld) service.getPort(portQName, HelloWorld.class);
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:9090/jaxws-cxf-fastinfoset/HelloWorldService/HelloWorldImpl");
+ assertEquals("helloworld" , port.echo("helloworld"));
+ assertTrue("request is expected fastinfoset", new String(out.toByteArray()).indexOf("application/fastinfoset") > -1);
+ assertTrue("response is expected fastinfoset", new String(in.toByteArray()).indexOf("application/fastinfoset") > -1);
+ out.close();
+ in.close();
+
+ }
+
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java 2013-06-08 10:24:31 UTC (rev 17666)
@@ -0,0 +1,33 @@
+/*
+ * 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.cxf.fastinfoset;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.FastInfoset;
+
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/cxf/fastinfoset")
+@FastInfoset(force = true)
+public interface HelloWorld
+{
+ String echo(String input);
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java 2013-06-08 10:24:31 UTC (rev 17666)
@@ -0,0 +1,41 @@
+/*
+ * 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.cxf.fastinfoset;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.FastInfoset;
+
+@WebService
+(
+ serviceName = "HelloWorldService",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.fastinfoset.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/fastinfoset"
+)
+@FastInfoset(force = true)
+public class HelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/MANIFEST.MF
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/MANIFEST.MF (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/MANIFEST.MF 2013-06-08 10:24:31 UTC (rev 17666)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Dependencies: org.apache.cxf.impl
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml 2013-06-08 10:24:31 UTC (rev 17666)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.fastinfoset.HelloWorldImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/HelloWorldService/HelloWorldImpl</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-06-07 14:55:24 UTC (rev 17665)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-06-08 10:24:31 UTC (rev 17666)
@@ -656,6 +656,9 @@
<!--# [AS7-537] Fixed on AS 8 or greater -->
<exclude>org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase**</exclude>
+ <!--# [JBWS-3560] fastinfoset module is required in as712 -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase*</exclude>
+
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -720,6 +723,8 @@
<!--# [AS7-537] Fixed on AS 8 or greater -->
<exclude>org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase**</exclude>
+ <!--# [JBWS-3560] fastinfoset module is required in as713 -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase*</exclude>
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
@@ -782,6 +787,9 @@
<!--# [AS7-537] Fixed on AS 8 or greater -->
<exclude>org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase**</exclude>
+ <!--# [JBWS-3560] fastinfoset module is required in as720 -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase*</exclude>
+
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -841,6 +849,9 @@
<!-- # Tests migrated from JBossWS-Native specific testsuite which are meant to pass with JBossWS-CXF too, but are still to be fixed -->
<exclude>org/jboss/test/ws/jaxws/jbws2978/**</exclude>
+ <!--# [JBWS-3560] fastinfoset module is required in wildfly800 -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase*</exclude>
+
<!-- # [JBWS-3620] Authentication failures w/ Undertow -->
<exclude>org/jboss/test/ws/jaxws/cxf/httpauth/HelloDigestTestCase*</exclude>
12 years, 5 months
JBossWS SVN: r17665 - in stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules: core/src/main/java/org/jboss/ws/extensions/security/element and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-06-07 10:55:24 -0400 (Fri, 07 Jun 2013)
New Revision: 17665
Added:
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionAlgorithms.java
Modified:
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/SecurityHeader.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/RequireEncryptionOperation.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireEncryption.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/resources/schema/jboss-ws-security_1_0.xsd
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF/jboss-wsse-server.xml
Log:
[JBPAPP-10758] Merged changes for CVE-2012-5575
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -35,7 +35,6 @@
import org.jboss.ws.extensions.security.element.UsernameToken;
import org.jboss.ws.extensions.security.exception.WSSecurityException;
import org.jboss.ws.extensions.security.nonce.NonceFactory;
-import org.jboss.ws.extensions.security.operation.AuthorizeOperation;
import org.jboss.ws.extensions.security.operation.DecryptionOperation;
import org.jboss.ws.extensions.security.operation.ReceiveUsernameOperation;
import org.jboss.ws.extensions.security.operation.ReceiveX509Certificate;
@@ -45,7 +44,6 @@
import org.jboss.ws.extensions.security.operation.SignatureVerificationOperation;
import org.jboss.ws.extensions.security.operation.TimestampVerificationOperation;
import org.jboss.ws.metadata.wsse.Authenticate;
-import org.jboss.ws.metadata.wsse.Authorize;
import org.jboss.ws.metadata.wsse.TimestampVerification;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -74,6 +72,10 @@
private HashSet<String> signedIds = new HashSet<String>();
private HashSet<String> encryptedIds = new HashSet<String>();
+
+ private List<String> allowedKeyWrapAlgorithms;
+
+ private List<String> allowedEncAlgorithms;
public SecurityDecoder(SecurityStore store, NonceFactory nonceFactory, TimestampVerification timestampVerification, Authenticate authenticate)
{
@@ -137,7 +139,7 @@
encryptedIds.clear();
SignatureVerificationOperation signatureVerifier = new SignatureVerificationOperation(header, store);
- DecryptionOperation decrypter = new DecryptionOperation(header, store);
+ DecryptionOperation decrypter = new DecryptionOperation(header, store, allowedEncAlgorithms);
for (SecurityProcess process : header.getSecurityProcesses())
{
@@ -160,6 +162,17 @@
}
}
+
+ public void init(List<RequireOperation> requireOperations) {
+ if (requireOperations != null) {
+ for (RequireOperation operation : requireOperations) {
+ if (operation instanceof RequireEncryptionOperation) {
+ ((RequireEncryptionOperation)operation).setupDecoder(this);
+ break;
+ }
+ }
+ }
+ }
public void verify(List<RequireOperation> requireOperations) throws WSSecurityException
{
@@ -189,7 +202,7 @@
public void decode(Document message, Element headerElement) throws WSSecurityException
{
this.headerElement = headerElement;
- this.header = new SecurityHeader(this.headerElement, store);
+ this.header = new SecurityHeader(this.headerElement, store, allowedKeyWrapAlgorithms, allowedEncAlgorithms);
this.message = message;
decode();
@@ -201,4 +214,15 @@
// message (required by the specification)
detachHeader();
}
+
+ public void setAllowedKeyWrapAlgorithms(List<String> allowedKeyWrapAlgorithms)
+ {
+ this.allowedKeyWrapAlgorithms = allowedKeyWrapAlgorithms;
+ }
+
+ public void setAllowedEncAlgorithms(List<String> allowedEncAlgorithms)
+ {
+ this.allowedEncAlgorithms = allowedEncAlgorithms;
+ }
+
}
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -127,14 +127,16 @@
}
SecurityDecoder decoder = new SecurityDecoder(securityStore, factory, configuration.getTimestampVerification(), authenticate);
+
+ List<RequireOperation> operations = buildRequireOperations(config, fault);
+
+ decoder.init(operations);
decoder.decode(message.getSOAPPart(), secHeaderElement);
if (log.isTraceEnabled())
log.trace("Decoded Message:\n" + DOMWriter.printNode(message.getSOAPPart(), true));
- List<RequireOperation> operations = buildRequireOperations(config, fault);
-
decoder.verify(operations);
if (log.isDebugEnabled())
log.debug("Verification is successful");
@@ -303,7 +305,7 @@
if (requireEncryption != null && (!fault || requireEncryption.isIncludeFaults()))
{
List<Target> targets = convertTargets(requireEncryption.getTargets());
- operations.add(new RequireEncryptionOperation(targets));
+ operations.add(new RequireEncryptionOperation(targets, requireEncryption.getdKeyWrapAlgorithms(), requireEncryption.getAlgorithms()));
}
return operations;
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -23,6 +23,8 @@
import java.security.PrivateKey;
import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
import javax.crypto.SecretKey;
@@ -35,6 +37,7 @@
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.EncryptionAlgorithms;
import org.jboss.ws.extensions.security.operation.EncryptionOperation;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -64,7 +67,7 @@
private static final String DEFAULT_ALGORITHM = "rsa_15";
static
{
- keyWrapAlgorithms = new HashMap<String, String>(2);
+ keyWrapAlgorithms = new HashMap<String, String>(4);
keyWrapAlgorithms.put("rsa_15", XMLCipher.RSA_v1dot5);
keyWrapAlgorithms.put("rsa_oaep", XMLCipher.RSA_OAEP);
}
@@ -86,7 +89,7 @@
this.tokenRefType = tokenRefType;
}
- public EncryptedKey(Element element, KeyResolver resolver) throws WSSecurityException
+ public EncryptedKey(Element element, KeyResolver resolver, List<String> allowedKeyWrapAlgorithms, List<String> allowedEncAlgorithms) throws WSSecurityException
{
org.apache.xml.security.encryption.EncryptedKey key;
XMLCipher cipher;
@@ -103,6 +106,27 @@
}
KeyInfo info = key.getKeyInfo();
+ boolean supportedKeyWrapAlg = false;
+ final String kwa = key.getEncryptionMethod().getAlgorithm();
+ for (Iterator<String> it = keyWrapAlgorithms.values().iterator(); it.hasNext() && !supportedKeyWrapAlg; ) {
+ String s = it.next();
+ if (s.equals(kwa)) {
+ supportedKeyWrapAlg = true;
+ }
+ }
+ if (!supportedKeyWrapAlg) {
+ throw new WSSecurityException("Unsupported key wrap algorithm in received message: " + kwa);
+ }
+ if (allowedKeyWrapAlgorithms != null && !allowedKeyWrapAlgorithms.isEmpty()) {
+ boolean found = false;
+ for (Iterator<String> it = allowedKeyWrapAlgorithms.iterator(); it.hasNext() && !found; ) {
+ found = kwa.equals(keyWrapAlgorithms.get(it.next()));
+ }
+ if (!found) {
+ throw new WSSecurityException("Unexpected key wrap algorithm in received message: " + kwa);
+ }
+ }
+
if (info == null)
throw new WSSecurityException("EncryptedKey element did not contain KeyInfo");
@@ -122,6 +146,15 @@
String alg = getKeyAlgorithm(element);
if (alg == null)
throw new WSSecurityException("Could not determine encrypted key algorithm!");
+ if (allowedEncAlgorithms != null && !allowedEncAlgorithms.isEmpty()) {
+ boolean found = false;
+ for (Iterator<String> it = allowedEncAlgorithms.iterator(); it.hasNext() && !found; ) {
+ found = alg.equals(EncryptionAlgorithms.getAlgorithm(it.next()));
+ }
+ if (!found) {
+ throw new WSSecurityException("Unexpected encryption algorithm in received message: " + alg);
+ }
+ }
try
{
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/SecurityHeader.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/SecurityHeader.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/SecurityHeader.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -23,6 +23,7 @@
import java.util.HashMap;
import java.util.LinkedList;
+import java.util.List;
import org.jboss.ws.extensions.security.BinarySecurityTokenValidator;
import org.jboss.ws.extensions.security.Constants;
@@ -54,13 +55,13 @@
// Looks like this is only for embedded tokens
private LinkedList<SecurityTokenReference> securityTokenReferences = new LinkedList<SecurityTokenReference>();
-
+
public SecurityHeader(Document document)
{
this.document = document;
}
- public SecurityHeader(Element element, SecurityStore store) throws WSSecurityException
+ public SecurityHeader(Element element, SecurityStore store, List<String> allowedKeyWrapAlgorithms, List<String> allowedEncAlgorithms) throws WSSecurityException
{
document = element.getOwnerDocument();
KeyResolver resolver = new KeyResolver(store);
@@ -84,7 +85,7 @@
else if (tag.equals("Signature"))
securityProcesses.add(new Signature(child, resolver));
else if (tag.equals("EncryptedKey"))
- securityProcesses.add(new EncryptedKey(child, resolver));
+ securityProcesses.add(new EncryptedKey(child, resolver, allowedKeyWrapAlgorithms, allowedEncAlgorithms));
else if (tag.equals("ReferenceList"))
throw new UnsupportedSecurityTokenException("ReferenceLists outside of encrypted keys (shared secrets) are not supported.");
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -23,6 +23,8 @@
import java.util.Collection;
import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
import javax.crypto.SecretKey;
@@ -47,11 +49,14 @@
private SecurityHeader header;
private SecurityStore store;
+
+ private List<String> allowedEncAlgorithms;
- public DecryptionOperation(SecurityHeader header, SecurityStore store) throws WSSecurityException
+ public DecryptionOperation(SecurityHeader header, SecurityStore store, List<String> allowedEncAlgorithms) throws WSSecurityException
{
this.header = header;
this.store = store;
+ this.allowedEncAlgorithms = allowedEncAlgorithms;
}
private boolean isContent(Element element)
@@ -99,6 +104,15 @@
}
String alg = getEncryptionAlgorithm(element);
+ if (allowedEncAlgorithms != null && !allowedEncAlgorithms.isEmpty()) {
+ boolean found = false;
+ for (Iterator<String> it = allowedEncAlgorithms.iterator(); it.hasNext() && !found; ) {
+ found = alg.equals(EncryptionAlgorithms.getAlgorithm(it.next()));
+ }
+ if (!found) {
+ throw new WSSecurityException("Unexpected encryption algorithm in received message: " + alg);
+ }
+ }
try
{
XMLCipher cipher = XMLCipher.getInstance(alg);
Added: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionAlgorithms.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionAlgorithms.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionAlgorithms.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -0,0 +1,94 @@
+/*
+ * 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.ws.extensions.security.operation;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.xml.security.encryption.XMLCipher;
+
+public final class EncryptionAlgorithms
+{
+ /** --- Keep private for security reasons --- **/
+ private static class Algorithm
+ {
+ Algorithm(String jceName, String xmlName, int size)
+ {
+ this.jceName = jceName;
+ this.xmlName = xmlName;
+ this.size = size;
+ }
+
+ public String jceName;
+ public String xmlName;
+ public int size;
+ }
+ private static Map<String, Algorithm> algorithms;
+ private static Map<String, String> algorithmsID;
+ /** ----------------------------------------- **/
+
+ public static final String DEFAULT_ALGORITHM = "aes-128";
+
+ static
+ {
+ algorithms = new HashMap<String, Algorithm>(4);
+ algorithms.put("aes-128", new Algorithm("AES", XMLCipher.AES_128, 128));
+ algorithms.put("aes-192", new Algorithm("AES", XMLCipher.AES_192, 192));
+ algorithms.put("aes-256", new Algorithm("AES", XMLCipher.AES_256, 256));
+ algorithms.put("aes-128-gcm", new Algorithm("AES", XMLCipher.AES_128_GCM, 128));
+ 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));
+ algorithms = Collections.unmodifiableMap(algorithms);
+
+ 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");
+ algorithmsID = Collections.unmodifiableMap(algorithmsID);
+ }
+
+ public static boolean hasAlgorithm(String id) {
+ return algorithms.containsKey(id);
+ }
+
+ public static String getAlgorithm(String id) {
+ Algorithm alg = algorithms.get(id);
+ return alg == null ? null : alg.xmlName;
+ }
+
+ public static String getAlgorithmJceName(String id) {
+ Algorithm alg = algorithms.get(id);
+ return alg == null ? null : alg.jceName;
+ }
+
+ public static int getAlgorithmSize(String id) {
+ Algorithm alg = algorithms.get(id);
+ return alg == null ? null : alg.size;
+ }
+
+ public static String getAlgorithmID(String xmlName) {
+ return algorithmsID.get(xmlName);
+ }
+}
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -25,7 +25,6 @@
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import java.security.cert.X509Certificate;
-import java.util.HashMap;
import java.util.List;
import javax.crypto.Cipher;
@@ -60,43 +59,6 @@
private String tokenRefType;
private String securityDomainAliasLabel;
- private static class Algorithm
- {
- Algorithm(String jceName, String xmlName, int size)
- {
- this.jceName = jceName;
- this.xmlName = xmlName;
- this.size = size;
- }
-
- public String jceName;
- public String xmlName;
- public int size;
- }
-
- private static HashMap<String, Algorithm> algorithms;
- private static HashMap<String, String> algorithmsID;
-
- private static final String DEFAULT_ALGORITHM = "aes-128";
-
- static
- {
- algorithms = new HashMap<String, Algorithm>(4);
- algorithms.put("aes-128", new Algorithm("AES", XMLCipher.AES_128, 128));
- algorithms.put("aes-192", new Algorithm("AES", XMLCipher.AES_192, 192));
- algorithms.put("aes-256", new Algorithm("AES", XMLCipher.AES_256, 256));
- algorithms.put("aes-128-gcm", new Algorithm("AES", XMLCipher.AES_128_GCM, 128));
- 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)
{
super();
@@ -139,12 +101,10 @@
private static SecretKey getSecretKey(String algorithm) throws WSSecurityException
{
- Algorithm alg = algorithms.get(algorithm);
-
try
{
- KeyGenerator kgen = KeyGenerator.getInstance(alg.jceName);
- kgen.init(alg.size);
+ KeyGenerator kgen = KeyGenerator.getInstance(EncryptionAlgorithms.getAlgorithmJceName(algorithm));
+ kgen.init(EncryptionAlgorithms.getAlgorithmSize(algorithm));
return kgen.generateKey();
}
catch (NoSuchAlgorithmException e)
@@ -155,19 +115,19 @@
public static SecretKey generateSecretKey(String alg) throws WSSecurityException
{
- return getSecretKey(algorithmsID.get(alg));
+ return getSecretKey(EncryptionAlgorithms.getAlgorithmID(alg));
}
public void process(Document message, SecurityHeader header, SecurityStore store) throws WSSecurityException
{
- if (! algorithms.containsKey(algorithm))
- algorithm = DEFAULT_ALGORITHM;
+ if (! EncryptionAlgorithms.hasAlgorithm(algorithm))
+ algorithm = EncryptionAlgorithms.DEFAULT_ALGORITHM;
SecretKey secretKey = getSecretKey(algorithm);
XMLCipher cipher;
try
{
- cipher = XMLCipher.getInstance(algorithms.get(algorithm).xmlName);
+ cipher = XMLCipher.getInstance(EncryptionAlgorithms.getAlgorithm(algorithm));
cipher.init(XMLCipher.ENCRYPT_MODE, secretKey);
}
catch (XMLSecurityException e)
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/RequireEncryptionOperation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/RequireEncryptionOperation.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/RequireEncryptionOperation.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -21,17 +21,52 @@
*/
package org.jboss.ws.extensions.security.operation;
+import java.util.LinkedList;
import java.util.List;
+import java.util.StringTokenizer;
+import org.jboss.logging.Logger;
+import org.jboss.ws.extensions.security.SecurityDecoder;
import org.jboss.ws.extensions.security.Target;
public class RequireEncryptionOperation extends RequireTargetableOperation
{
+ private List<String> allowedKeyWrapAlgorithms;
+
+ private List<String> allowedEncAlgorithms;
- public RequireEncryptionOperation(List<Target> targets)
+ public RequireEncryptionOperation(List<Target> targets) {
+ super(targets);
+ }
+
+ public RequireEncryptionOperation(List<Target> targets, String keyWrapAlgorithms, String algorithms)
{
super(targets);
+ this.allowedEncAlgorithms = parseStringList(algorithms);
+ this.allowedKeyWrapAlgorithms = parseStringList(keyWrapAlgorithms);
}
+ public void setupDecoder(SecurityDecoder decoder) {
+ if (allowedEncAlgorithms == null) {
+ Logger.getLogger(RequireEncryptionOperation.class).warn("No 'algorithms' provided for 'encryption' configuration requirement!");
+ }
+ decoder.setAllowedEncAlgorithms(allowedEncAlgorithms);
+ if (allowedKeyWrapAlgorithms == null) {
+ Logger.getLogger(RequireEncryptionOperation.class).warn("No 'keyWrapAlgorithms' provided for 'encryption' configuration requirement!");
+ }
+ decoder.setAllowedKeyWrapAlgorithms(allowedKeyWrapAlgorithms);
+ }
+
+ private List<String> parseStringList(String s) {
+ List<String> result = null;
+ if (s != null && s.trim().length() > 0) {
+ StringTokenizer st = new StringTokenizer(s, ", ", false);
+ result = new LinkedList<String>();
+ while (st.hasMoreTokens()) {
+ result.add(st.nextToken());
+ }
+ }
+ return result;
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireEncryption.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireEncryption.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireEncryption.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.metadata.wsse;
+
/**
* <code>Sign</code> represents the sign tag, which declares that a message
* should be signed.
@@ -29,13 +30,19 @@
*/
public class RequireEncryption extends Targetable
{
- private static final long serialVersionUID = 3765798680988205647L;
+ private static final long serialVersionUID = 3765798680988205648L;
private boolean includeFaults;
+
+ private String keyWrapAlgorithms;
+
+ private String algorithms;
- public RequireEncryption(boolean includeFaults)
+ public RequireEncryption(boolean includeFaults, String keyWrapAlgorithms, String algorithms)
{
this.includeFaults = includeFaults;
+ this.algorithms = algorithms;
+ this.keyWrapAlgorithms = keyWrapAlgorithms;
}
public boolean isIncludeFaults()
@@ -47,4 +54,25 @@
{
this.includeFaults = includeFaults;
}
+
+ public String getdKeyWrapAlgorithms()
+ {
+ return keyWrapAlgorithms;
+ }
+
+ public void setKeyWrapAlgorithms(String keyWrapAlgorithms)
+ {
+ this.keyWrapAlgorithms = keyWrapAlgorithms;
+ }
+
+ public String getAlgorithms()
+ {
+ return algorithms;
+ }
+
+ public void setAlgorithms(String algorithms)
+ {
+ this.algorithms = algorithms;
+ }
+
}
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2013-06-07 14:55:24 UTC (rev 17665)
@@ -499,7 +499,7 @@
if (value != null)
includeFaults = (Boolean) SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, value, null);
- return new RequireEncryption(includeFaults);
+ return new RequireEncryption(includeFaults, attrs.getValue("", "keyWrapAlgorithms"), attrs.getValue("", "algorithms"));
}
else if ("timestamp".equals(localName))
{
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/resources/schema/jboss-ws-security_1_0.xsd 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/resources/schema/jboss-ws-security_1_0.xsd 2013-06-07 14:55:24 UTC (rev 17665)
@@ -182,6 +182,16 @@
<xs:sequence>
<xs:element name="targets" type="targetsType" minOccurs="0"/>
</xs:sequence>
+ <xs:attribute name="algorithm" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>A blank space or comma separated list of algorithm ids that are allowed for the encrypted incoming message</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="keyWrapAlgorithm" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>A blank space or comma separated list of algorithm ids that are allowed for the key wrapping in incoming message</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
<xs:attribute name="includeFaults" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
<xs:complexType name="requireSignatureType">
@@ -265,6 +275,9 @@
<xs:enumeration value="aes-128"/>
<xs:enumeration value="aes-192"/>
<xs:enumeration value="aes-256"/>
+ <xs:enumeration value="aes-128-gcm"/>
+ <xs:enumeration value="aes-192-gcm"/>
+ <xs:enumeration value="aes-256-gcm"/>
<xs:enumeration value="tripledes"/>
</xs:restriction>
</xs:simpleType>
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml 2013-06-07 14:55:24 UTC (rev 17665)
@@ -3,7 +3,7 @@
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<config>
- <encrypt type="x509v3" algorithm="aes-192-gcm" alias="wsse"/>
+ <encrypt type="x509v3" algorithm="aes-192-gcm" keyWrapAlgorithm="rsa_oaep" alias="wsse"/>
<requires>
<encryption/>
</requires>
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF/jboss-wsse-server.xml 2013-06-07 13:49:34 UTC (rev 17664)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF/jboss-wsse-server.xml 2013-06-07 14:55:24 UTC (rev 17665)
@@ -7,9 +7,9 @@
<trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
<trust-store-password>jbossws</trust-store-password>
<config>
- <encrypt type="x509v3" algorithm="aes-192-gcm" alias="wsse"/>
+ <encrypt type="x509v3" algorithm="aes-192-gcm" keyWrapAlgorithm="rsa_oaep" alias="wsse"/>
<requires>
- <encryption/>
+ <encryption algorithms="aes-192-gcm aes-256-gcm" keyWrapAlgorithms="rsa_oaep"/>
</requires>
</config>
</jboss-ws-security>
\ No newline at end of file
12 years, 5 months
JBossWS SVN: r17664 - in stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules: core/src/main/java/org/jboss/ws/extensions/security/element and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-06-07 09:49:34 -0400 (Fri, 07 Jun 2013)
New Revision: 17664
Modified:
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
Log:
[JBPAPP-10758] Merged changes for CVE-2012-2487
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-06-07 13:21:36 UTC (rev 17663)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-06-07 13:49:34 UTC (rev 17664)
@@ -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/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java 2013-06-07 13:21:36 UTC (rev 17663)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java 2013-06-07 13:49:34 UTC (rev 17664)
@@ -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/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java 2013-06-07 13:21:36 UTC (rev 17663)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java 2013-06-07 13:49:34 UTC (rev 17664)
@@ -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/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java 2013-06-07 13:21:36 UTC (rev 17663)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java 2013-06-07 13:49:34 UTC (rev 17664)
@@ -72,4 +72,9 @@
{
return faultString;
}
+
+ public void setInternal(boolean internal)
+ {
+ this.internal = internal;
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java 2013-06-07 13:21:36 UTC (rev 17663)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java 2013-06-07 13:49:34 UTC (rev 17664)
@@ -107,7 +107,7 @@
}
catch (XMLEncryptionException e)
{
- throw new FailedCheckException("Decryption was invalid.");
+ throw new FailedCheckException(e);
}
catch (Exception e)
{
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-06-07 13:21:36 UTC (rev 17663)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-06-07 13:49:34 UTC (rev 17664)
@@ -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/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2013-06-07 13:21:36 UTC (rev 17663)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2013-06-07 13:49:34 UTC (rev 17664)
@@ -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);
}
}
12 years, 5 months
JBossWS SVN: r17663 - in stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758: modules/core and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-06-07 09:21:36 -0400 (Fri, 07 Jun 2013)
New Revision: 17663
Modified:
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/pom.xml
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/STRTransform.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/pom.xml
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/src/main/scripts/assembly-deploy-artifacts.xml
Log:
[JBPAPP-10758] Merged changes for CVE-2011-1096
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/pom.xml 2013-06-07 10:16:50 UTC (rev 17662)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/pom.xml 2013-06-07 13:21:36 UTC (rev 17663)
@@ -171,7 +171,7 @@
<artifactId>wsdl4j</artifactId>
</dependency>
<dependency>
- <groupId>org.apache</groupId>
+ <groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
</dependency>
<dependency>
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/STRTransform.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/STRTransform.java 2013-06-07 10:16:50 UTC (rev 17662)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/STRTransform.java 2013-06-07 13:21:36 UTC (rev 17663)
@@ -22,6 +22,7 @@
package org.jboss.ws.extensions.security;
import java.io.IOException;
+import java.io.OutputStream;
import javax.xml.parsers.ParserConfigurationException;
@@ -88,9 +89,15 @@
return STR_URI;
}
+ @Override
+ protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform transformObject) throws IOException, CanonicalizationException,
+ InvalidCanonicalizerException, TransformationException, ParserConfigurationException, SAXException
+ {
+ return enginePerformTransform(input, null, transformObject);
+ }
@Override
- protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input) throws IOException, CanonicalizationException,
+ protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, OutputStream os, Transform transformObject) throws IOException, CanonicalizationException,
InvalidCanonicalizerException, TransformationException, ParserConfigurationException, SAXException
{
@@ -114,7 +121,7 @@
element = token.getSTRTransformElement();
// Obtain the canonicalizer specified in the transformation parameters
- Element parameters = XMLUtils.selectNode(this._transformObject.getElement().getFirstChild(), Constants.WSSE_NS,
+ Element parameters = XMLUtils.selectNode(transformObject.getElement().getFirstChild(), Constants.WSSE_NS,
"TransformationParameters", 0);
if (parameters == null)
throw new TransformationException("wsse:TransformationParameters expected!");
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-06-07 10:16:50 UTC (rev 17662)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-06-07 13:21:36 UTC (rev 17663)
@@ -84,6 +84,9 @@
algorithms.put("aes-128", new Algorithm("AES", XMLCipher.AES_128, 128));
algorithms.put("aes-192", new Algorithm("AES", XMLCipher.AES_192, 192));
algorithms.put("aes-256", new Algorithm("AES", XMLCipher.AES_256, 256));
+ algorithms.put("aes-128-gcm", new Algorithm("AES", XMLCipher.AES_128_GCM, 128));
+ 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));
}
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml 2013-06-07 10:16:50 UTC (rev 17662)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml 2013-06-07 13:21:36 UTC (rev 17663)
@@ -3,7 +3,7 @@
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<config>
- <encrypt type="x509v3" alias="wsse"/>
+ <encrypt type="x509v3" algorithm="aes-192-gcm" alias="wsse"/>
<requires>
<encryption/>
</requires>
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF/jboss-wsse-server.xml 2013-06-07 10:16:50 UTC (rev 17662)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF/jboss-wsse-server.xml 2013-06-07 13:21:36 UTC (rev 17663)
@@ -7,7 +7,7 @@
<trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
<trust-store-password>jbossws</trust-store-password>
<config>
- <encrypt type="x509v3" alias="wsse"/>
+ <encrypt type="x509v3" algorithm="aes-192-gcm" alias="wsse"/>
<requires>
<encryption/>
</requires>
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/pom.xml 2013-06-07 10:16:50 UTC (rev 17662)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/pom.xml 2013-06-07 13:21:36 UTC (rev 17663)
@@ -73,7 +73,7 @@
<sun.jaxws.version>2.1.7</sun.jaxws.version>
<woodstox.version>3.2.9</woodstox.version>
<wsdl4j.version>1.6.2</wsdl4j.version>
- <xmlsec.version>1.4.3</xmlsec.version>
+ <xmlsec.version>1.5.1</xmlsec.version>
<xalan.version>2.7.1.patch02</xalan.version>
<xerces.version>2.9.1</xerces.version>
</properties>
@@ -361,7 +361,7 @@
<version>${xerces.version}</version>
</dependency>
<dependency>
- <groupId>org.apache</groupId>
+ <groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>${xmlsec.version}</version>
</dependency>
Modified: stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/src/main/scripts/assembly-deploy-artifacts.xml 2013-06-07 10:16:50 UTC (rev 17662)
+++ stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/src/main/scripts/assembly-deploy-artifacts.xml 2013-06-07 13:21:36 UTC (rev 17663)
@@ -51,7 +51,7 @@
<include>org.jvnet.staxex:stax-ex:jar</include>
<include>com.sun.xml.stream.buffer:streambuffer:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
- <include>org.apache:xmlsec:jar</include>
+ <include>org.apache.santuario:xmlsec:jar</include>
<include>org.codehaus.woodstox:wstx:jar</include>
</includes>
</dependencySet>
12 years, 5 months
JBossWS SVN: r17662 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-06-07 06:16:50 -0400 (Fri, 07 Jun 2013)
New Revision: 17662
Added:
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/
Log:
[JBPAPP-10758] Create one off patch branch from EAP 5.1.2 ws stack - jbossws-native-3.1.2.SP15
12 years, 5 months