Apache CXF API

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

java.lang.Object
  extended by org.apache.wss4j.dom.handler.WSHandler
      extended by org.apache.cxf.ws.security.wss4j.AbstractWSS4JInterceptor
          extended by org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
              extended by org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor
All Implemented Interfaces:
SoapInterceptor, Interceptor<SoapMessage>, PhaseInterceptor<SoapMessage>

public class PolicyBasedWSS4JInInterceptor
extends WSS4JInInterceptor


Field Summary
static PolicyBasedWSS4JInInterceptor INSTANCE
           
 
Fields inherited from class org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
PRINCIPAL_RESULT, PROCESSOR_MAP, SAML_ROLE_ATTRIBUTENAME_DEFAULT, SECURITY_PROCESSED, SIGNATURE_RESULT, TIMESTAMP_RESULT, VALIDATOR_MAP
 
Fields inherited from class org.apache.wss4j.dom.handler.WSHandler
cryptos, secEngine
 
Constructor Summary
PolicyBasedWSS4JInInterceptor()
           
 
Method Summary
protected  void computeAction(SoapMessage message, org.apache.wss4j.dom.handler.RequestData data)
          Do whatever is necessary to determine the action for the incoming message and do whatever other setup work is necessary.
protected  void doResults(SoapMessage msg, String actor, Element soapHeader, Element soapBody, List<org.apache.wss4j.dom.WSSecurityEngineResult> results, boolean utWithCallbacks)
           
 void handleMessage(SoapMessage msg)
          Intercepts a message.
protected  boolean isNonceCacheRequired(List<Integer> actions, SoapMessage msg)
          Is a Nonce Cache required, i.e.
protected  boolean isSamlCacheRequired(List<Integer> actions, SoapMessage msg)
          Is a SAML Cache required, i.e.
protected  boolean isTimestampCacheRequired(List<Integer> actions, SoapMessage msg)
          Is a Timestamp cache required, i.e.
protected  void setAlgorithmSuites(SoapMessage message, org.apache.wss4j.dom.handler.RequestData data)
          Set a WSS4J AlgorithmSuite object on the RequestData context, to restrict the algorithms that are allowed for encryption, signature, etc.
 
Methods inherited from class org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
advanceBody, configureReplayCaches, createSecurityContext, createSecurityEngine, doResults, getCallback, getCallback, getProperty, getReplayCache, getSecurityEngine, isGET, isSecurityContextPrincipal, setIgnoreActions
 
Methods inherited from class org.apache.cxf.ws.security.wss4j.AbstractWSS4JInterceptor
getAdditionalInterceptors, getAfter, getBefore, getId, getOption, getPassword, getPhase, getProperties, getRoles, getUnderstoodHeaders, handleFault, isRequestor, loadCryptoFromPropertiesFile, postHandleMessage, setAfter, setBefore, setId, setPassword, setPhase, setProperties, setProperty, setProperty, translateProperties
 
Methods inherited from class org.apache.wss4j.dom.handler.WSHandler
checkReceiverResults, checkReceiverResultsAnyOrder, checkSignatureConfirmation, decodeAddInclusivePrefixes, decodeAlgorithmSuite, decodeAllowUsernameTokenNoPassword, decodeBooleanConfigValue, decodeBSPCompliance, decodeCustomPasswordTypes, decodeDecryptionParameter, decodeEnableSignatureConfirmation, decodeEncryptionParameter, decodeFutureTimeToLive, decodeIncludeEncryptionToken, decodeIncludeSignatureToken, decodeMustUnderstand, decodeNamespaceQualifiedPasswordTypes, decodePasswordType, decodeRequireSignedEncryptedDataElements, decodeSamlSubjectConfirmationValidation, decodeSignatureParameter, decodeSignatureParameter2, decodeTimestampPrecision, decodeTimestampStrict, decodeTimeToLive, decodeUse200512Namespace, decodeUseEncodedPasswords, decodeUseSingleCertificate, decodeUTParameter, doReceiverAction, doSenderAction, getCallbackHandler, getClassLoader, getPasswordCallbackHandler, getPasswordCB, getPasswordEncryptor, getString, getStringOption, loadCrypto, loadDecryptionCrypto, loadEncryptionCrypto, loadSignatureCrypto, loadSignatureVerificationCrypto
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final PolicyBasedWSS4JInInterceptor INSTANCE
Constructor Detail

PolicyBasedWSS4JInInterceptor

public PolicyBasedWSS4JInInterceptor()
Method Detail

handleMessage

public void handleMessage(SoapMessage msg)
                   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.

Specified by:
handleMessage in interface Interceptor<SoapMessage>
Overrides:
handleMessage in class WSS4JInInterceptor
Throws:
Fault

isNonceCacheRequired

protected boolean isNonceCacheRequired(List<Integer> actions,
                                       SoapMessage msg)
Is a Nonce Cache required, i.e. are we expecting a UsernameToken

Overrides:
isNonceCacheRequired in class WSS4JInInterceptor

isTimestampCacheRequired

protected boolean isTimestampCacheRequired(List<Integer> actions,
                                           SoapMessage msg)
Is a Timestamp cache required, i.e. are we expecting a Timestamp

Overrides:
isTimestampCacheRequired in class WSS4JInInterceptor

isSamlCacheRequired

protected boolean isSamlCacheRequired(List<Integer> actions,
                                      SoapMessage msg)
Is a SAML Cache required, i.e. are we expecting a SAML Token

Overrides:
isSamlCacheRequired in class WSS4JInInterceptor

setAlgorithmSuites

protected void setAlgorithmSuites(SoapMessage message,
                                  org.apache.wss4j.dom.handler.RequestData data)
                           throws org.apache.wss4j.common.ext.WSSecurityException
Set a WSS4J AlgorithmSuite object on the RequestData context, to restrict the algorithms that are allowed for encryption, signature, etc.

Overrides:
setAlgorithmSuites in class WSS4JInInterceptor
Throws:
org.apache.wss4j.common.ext.WSSecurityException

computeAction

protected void computeAction(SoapMessage message,
                             org.apache.wss4j.dom.handler.RequestData data)
                      throws org.apache.wss4j.common.ext.WSSecurityException
Description copied from class: WSS4JInInterceptor
Do whatever is necessary to determine the action for the incoming message and do whatever other setup work is necessary.

Overrides:
computeAction in class WSS4JInInterceptor
Throws:
org.apache.wss4j.common.ext.WSSecurityException

doResults

protected void doResults(SoapMessage msg,
                         String actor,
                         Element soapHeader,
                         Element soapBody,
                         List<org.apache.wss4j.dom.WSSecurityEngineResult> results,
                         boolean utWithCallbacks)
                  throws SOAPException,
                         XMLStreamException,
                         org.apache.wss4j.common.ext.WSSecurityException
Overrides:
doResults in class WSS4JInInterceptor
Throws:
SOAPException
XMLStreamException
org.apache.wss4j.common.ext.WSSecurityException

Apache CXF API

Apache CXF