Apache CXF API

org.apache.cxf.ws.security.wss4j
Class StaxCryptoCoverageChecker

java.lang.Object
  extended by org.apache.cxf.phase.AbstractPhaseInterceptor<SoapMessage>
      extended by org.apache.cxf.ws.security.wss4j.StaxCryptoCoverageChecker
All Implemented Interfaces:
Interceptor<SoapMessage>, PhaseInterceptor<SoapMessage>

public class StaxCryptoCoverageChecker
extends AbstractPhaseInterceptor<SoapMessage>

This interceptor handles parsing the StaX WS-Security results (events) + checks that the specified crypto coverage events actually occurred. The default functionality is to enforce that the SOAP Body, Timestamp, and WS-Addressing ReplyTo and FaultTo headers must be signed, and the UsernameToken must be encrypted (if they exist in the message payload). Note that this interceptor must be explicitly added to the InInterceptor chain.


Field Summary
static String SOAP_NS
           
static String SOAP12_NS
           
static String WSA_NS
           
static String WSSE_NS
           
static String WSU_NS
           
 
Constructor Summary
StaxCryptoCoverageChecker()
           
 
Method Summary
 void handleMessage(SoapMessage soapMessage)
          Intercepts a message.
 boolean isEncryptBody()
           
 boolean isEncryptUsernameToken()
           
 boolean isSignAddressingHeaders()
           
 boolean isSignBody()
           
 boolean isSignTimestamp()
           
 boolean isSignUsernameToken()
           
 void setEncryptBody(boolean encryptBody)
           
 void setEncryptUsernameToken(boolean encryptUsernameToken)
           
 void setSignAddressingHeaders(boolean signAddressingHeaders)
           
 void setSignBody(boolean signBody)
           
 void setSignTimestamp(boolean signTimestamp)
           
 void setSignUsernameToken(boolean signUsernameToken)
           
 
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOAP_NS

public static final String SOAP_NS
See Also:
Constant Field Values

SOAP12_NS

public static final String SOAP12_NS
See Also:
Constant Field Values

WSU_NS

public static final String WSU_NS
See Also:
Constant Field Values

WSSE_NS

public static final String WSSE_NS
See Also:
Constant Field Values

WSA_NS

public static final String WSA_NS
See Also:
Constant Field Values
Constructor Detail

StaxCryptoCoverageChecker

public StaxCryptoCoverageChecker()
Method Detail

handleMessage

public void handleMessage(SoapMessage soapMessage)
                   throws Fault
Description copied from interface: Interceptor
Intercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.

Throws:
Fault

isSignBody

public boolean isSignBody()

setSignBody

public final void setSignBody(boolean signBody)

isSignTimestamp

public boolean isSignTimestamp()

setSignTimestamp

public final void setSignTimestamp(boolean signTimestamp)

isEncryptBody

public boolean isEncryptBody()

setEncryptBody

public final void setEncryptBody(boolean encryptBody)

isSignAddressingHeaders

public boolean isSignAddressingHeaders()

setSignAddressingHeaders

public final void setSignAddressingHeaders(boolean signAddressingHeaders)

isSignUsernameToken

public boolean isSignUsernameToken()

setSignUsernameToken

public void setSignUsernameToken(boolean signUsernameToken)

isEncryptUsernameToken

public boolean isEncryptUsernameToken()

setEncryptUsernameToken

public void setEncryptUsernameToken(boolean encryptUsernameToken)

Apache CXF API

Apache CXF