Author: asoldano
Date: 2013-11-07 12:00:56 -0500 (Thu, 07 Nov 2013)
New Revision: 18067
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
Log:
[JBWS-3730] Adding support for org.jboss.ws.cxf.disableHandlerAuthCheck prop in
jboss-webservices.xml
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2013-11-07
09:48:04 UTC (rev 18066)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2013-11-07
17:00:56 UTC (rev 18067)
@@ -43,6 +43,7 @@
public static final String CXF_MANAGEMENT_ENABLED =
"cxf.management.enabled";
public static final String CXF_MANAGEMENT_INSTALL_RESPONSE_TIME_INTERCEPTORS =
"cxf.management.installResponseTimeInterceptors";
public static final String CXF_WS_DISCOVERY_ENABLED =
"cxf.ws-discovery.enabled";
+ public static final String JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS =
"org.jboss.ws.cxf.disableHandlerAuthChecks";
public static final String JBWS_CXF_JAXWS_CLIENT_BUS_STRATEGY =
"org.jboss.ws.cxf.jaxws-client.bus.strategy";
public static final String THREAD_BUS_STRATEGY = "THREAD_BUS";
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-11-07
09:48:04 UTC (rev 18066)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-11-07
17:00:56 UTC (rev 18067)
@@ -105,11 +105,11 @@
{
bus.setExtension(configurer, Configurer.class);
}
- setInterceptors(bus);
+ Map<String, String> props = (wsmd == null) ? null : wsmd.getProperties();
+
+ setInterceptors(bus, props);
setResourceResolver(bus, resolver);
- Map<String, String> props = (wsmd == null) ? null : wsmd.getProperties();
-
if (bus.getExtension(PolicyEngine.class) != null)
{
bus.getExtension(PolicyEngine.class).setAlternativeSelector(getAlternativeSelector(props));
@@ -152,14 +152,18 @@
public abstract Configurer createServerConfigurer(BindingCustomization customization,
WSDLFilePublisher wsdlPublisher, List<Endpoint> depEndpoints,
UnifiedVirtualFile root, String epConfigName, String epConfigFile);
- protected static void setInterceptors(Bus bus)
+ protected static void setInterceptors(Bus bus, Map<String, String> props)
{
//Install the EndpointAssociationInterceptor for linking every message exchange
//with the proper spi Endpoint retrieved in CXFServletExt
bus.getInInterceptors().add(new EndpointAssociationInterceptor());
bus.getInInterceptors().add(new EnableDecoupledFaultInterceptor());
bus.getInInterceptors().add(new NsCtxSelectorStoreInterceptor());
- bus.getInInterceptors().add(new HandlerAuthInterceptor());
+
+ final String p = (props != null) ?
props.get(Constants.JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS) : null;
+ if (p == null || (!"true".equalsIgnoreCase(p) &&
!"1".equalsIgnoreCase(p))) {
+ bus.getInInterceptors().add(new HandlerAuthInterceptor());
+ }
}
protected static void setResourceResolver(Bus bus, ResourceResolver resourceResolver)
Show replies by date