views:

149

answers:

1

When configuring the service for handling UsernameToken and signatures, it's setup like this:

<service name="serviceName">
  <inbound>
    <cxf:inbound-endpoint address="someUrl" protocolConnector="httpsConnector" >
      <cxf:inInterceptors>
        <spring:bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
        <spring:bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
        <spring:constructor-arg>
          <spring:map>
            <spring:entry key="action" value="UsernameToken Timestamp Signature" />
            <spring:entry key="passwordCallbackRef" value-ref="serverCallback" />
            <spring:entry key="signaturePropFile" value="wssecurity.properties" />
          </spring:map>
        </spring:constructor-arg>
        </spring:bean>
      </cxf:inInterceptors>
    </cxf:inbound-endpoint>
  </inbound>
</service>

But how is it possible to create a policy of what algorithms that are allowed, and what parts of the message that should be signed?

A: 

You'd have to ask the Mule folks. Last I checked, they hadn't moved to CXF 2.2.x yet. If they ARE on 2.2.x, you could use the WS-SecPol support built into CXF.

Daniel Kulp
I think they've moved to CXF 2.2.x. But reading the description at http://cxf.apache.org/docs/ws-securitypolicy.html doesn't explain much how this is done.Although it does state that "WS-SecurityPolicy support is ONLY available for "WSDL first" scenarios". So I guess you have to manually define the security policy in the WSDL file, and then it's automatically applied as you use CXF to create the web service from that file.
Brakara

related questions