Apache CXF API

org.apache.cxf.ws.security.wss4j.policyhandlers
Class AbstractStaxBindingHandler

java.lang.Object
  extended by org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractCommonBindingHandler
      extended by org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractStaxBindingHandler
Direct Known Subclasses:
StaxAsymmetricBindingHandler, StaxSymmetricBindingHandler, StaxTransportBindingHandler

public abstract class AbstractStaxBindingHandler
extends AbstractCommonBindingHandler


Nested Class Summary
protected static class AbstractStaxBindingHandler.TokenStoreCallbackHandler
           
 
Field Summary
protected  Set<org.apache.xml.security.stax.ext.SecurePart> encryptedTokensList
           
protected  Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> endEncSuppTokMap
           
protected  Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> endSuppTokMap
           
protected  org.apache.xml.security.stax.ext.OutboundSecurityContext outboundSecurityContext
           
protected  Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> sgndEndEncSuppTokMap
           
protected  Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> sgndEndSuppTokMap
           
protected  boolean signatureConfirmationAdded
           
protected  boolean timestampAdded
           
 
Fields inherited from class org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractCommonBindingHandler
message
 
Constructor Summary
AbstractStaxBindingHandler(org.apache.wss4j.stax.ext.WSSSecurityProperties properties, SoapMessage msg, org.apache.wss4j.policy.model.AbstractBinding binding, org.apache.xml.security.stax.ext.OutboundSecurityContext outboundSecurityContext)
           
 
Method Summary
protected  org.apache.xml.security.stax.ext.SecurePart addIssuedToken(org.apache.wss4j.policy.model.AbstractToken token, SecurityToken secToken, boolean signed, boolean endorsing)
           
protected  org.apache.xml.security.stax.ext.SecurePart addKerberosToken(org.apache.wss4j.policy.model.KerberosToken token, boolean signed, boolean endorsing, boolean encrypting)
           
protected  org.apache.xml.security.stax.ext.SecurePart addSamlToken(org.apache.wss4j.policy.model.SamlToken token, boolean signed, boolean endorsing)
           
protected  void addSignatureConfirmation(List<org.apache.xml.security.stax.ext.SecurePart> sigParts)
           
protected  void addSignatureParts(Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> tokenMap)
           
protected  void addSupportingTokens()
           
protected  org.apache.xml.security.stax.ext.SecurePart addUsernameToken(org.apache.wss4j.policy.model.UsernameToken usernameToken)
           
protected  void configureLayout(AssertionInfoMap aim)
           
protected  void configureSignature(org.apache.wss4j.policy.model.AbstractTokenWrapper wrapper, org.apache.wss4j.policy.model.AbstractToken token, boolean attached)
           
protected  void configureTimestamp(AssertionInfoMap aim)
           
protected  void enforceEncryptBeforeSigningWithSignedSAML()
           
protected  org.apache.xml.security.stax.securityToken.SecurityToken findInboundSecurityToken(org.apache.xml.security.stax.securityEvent.SecurityEventConstants.Event event)
           
protected  List<org.apache.xml.security.stax.ext.SecurePart> getEncryptedParts()
          Identifies the portions of the message to be encrypted
protected  org.apache.xml.security.stax.securityToken.SecurityTokenConstants.KeyIdentifier getKeyIdentifierType(org.apache.wss4j.policy.model.AbstractTokenWrapper wrapper, org.apache.wss4j.policy.model.AbstractToken token)
           
protected  org.apache.wss4j.stax.ext.WSSSecurityProperties getProperties()
           
protected  List<org.apache.xml.security.stax.ext.SecurePart> getSignedParts()
          Identifies the portions of the message to be signed
protected  Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> handleSupportingTokens(Collection<AssertionInfo> tokenAssertions, boolean signed, boolean endorse)
           
protected  Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> handleSupportingTokens(org.apache.wss4j.policy.model.SupportingTokens suppTokens, boolean signed, boolean endorse)
           
protected  Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> handleSupportingTokens(org.apache.wss4j.policy.model.SupportingTokens suppTokens, boolean signed, boolean endorse, Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> ret)
           
protected  void handleUsernameTokenSupportingToken(org.apache.wss4j.policy.model.UsernameToken token, boolean endorse, boolean encryptedToken, Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> ret)
           
protected  void prependSignatureToSC()
           
protected  void putCustomTokenAfterSignature()
           
protected  void removeSignatureIfSignedSAML()
           
protected  void storeSecurityToken(org.apache.wss4j.policy.model.AbstractToken policyToken, SecurityToken tok)
           
 
Methods inherited from class org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractCommonBindingHandler
assertAlgorithmSuite, assertPolicy, assertPolicy, assertToken, assertTokenWrapper, assertTrustProperties, assertWSSProperties, getAllAssertionsByLocalname, getAllAssertionsByLocalname, getFirstAssertionByLocalname, getMessage, getSecurityToken, getSHA1, getWss10, isRequestor, isTokenRequired, policyNotAsserted, policyNotAsserted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timestampAdded

protected boolean timestampAdded

signatureConfirmationAdded

protected boolean signatureConfirmationAdded

encryptedTokensList

protected Set<org.apache.xml.security.stax.ext.SecurePart> encryptedTokensList

endEncSuppTokMap

protected Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> endEncSuppTokMap

endSuppTokMap

protected Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> endSuppTokMap

sgndEndEncSuppTokMap

protected Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> sgndEndEncSuppTokMap

sgndEndSuppTokMap

protected Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> sgndEndSuppTokMap

outboundSecurityContext

protected final org.apache.xml.security.stax.ext.OutboundSecurityContext outboundSecurityContext
Constructor Detail

AbstractStaxBindingHandler

public AbstractStaxBindingHandler(org.apache.wss4j.stax.ext.WSSSecurityProperties properties,
                                  SoapMessage msg,
                                  org.apache.wss4j.policy.model.AbstractBinding binding,
                                  org.apache.xml.security.stax.ext.OutboundSecurityContext outboundSecurityContext)
Method Detail

addUsernameToken

protected org.apache.xml.security.stax.ext.SecurePart addUsernameToken(org.apache.wss4j.policy.model.UsernameToken usernameToken)

addKerberosToken

protected org.apache.xml.security.stax.ext.SecurePart addKerberosToken(org.apache.wss4j.policy.model.KerberosToken token,
                                                                       boolean signed,
                                                                       boolean endorsing,
                                                                       boolean encrypting)
                                                                throws org.apache.wss4j.common.ext.WSSecurityException
Throws:
org.apache.wss4j.common.ext.WSSecurityException

addSamlToken

protected org.apache.xml.security.stax.ext.SecurePart addSamlToken(org.apache.wss4j.policy.model.SamlToken token,
                                                                   boolean signed,
                                                                   boolean endorsing)
                                                            throws org.apache.wss4j.common.ext.WSSecurityException
Throws:
org.apache.wss4j.common.ext.WSSecurityException

addIssuedToken

protected org.apache.xml.security.stax.ext.SecurePart addIssuedToken(org.apache.wss4j.policy.model.AbstractToken token,
                                                                     SecurityToken secToken,
                                                                     boolean signed,
                                                                     boolean endorsing)

storeSecurityToken

protected void storeSecurityToken(org.apache.wss4j.policy.model.AbstractToken policyToken,
                                  SecurityToken tok)

configureTimestamp

protected void configureTimestamp(AssertionInfoMap aim)

configureLayout

protected void configureLayout(AssertionInfoMap aim)

getProperties

protected org.apache.wss4j.stax.ext.WSSSecurityProperties getProperties()

configureSignature

protected void configureSignature(org.apache.wss4j.policy.model.AbstractTokenWrapper wrapper,
                                  org.apache.wss4j.policy.model.AbstractToken token,
                                  boolean attached)
                           throws org.apache.wss4j.common.ext.WSSecurityException
Throws:
org.apache.wss4j.common.ext.WSSecurityException

getKeyIdentifierType

protected org.apache.xml.security.stax.securityToken.SecurityTokenConstants.KeyIdentifier getKeyIdentifierType(org.apache.wss4j.policy.model.AbstractTokenWrapper wrapper,
                                                                                                               org.apache.wss4j.policy.model.AbstractToken token)

handleSupportingTokens

protected Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> handleSupportingTokens(Collection<AssertionInfo> tokenAssertions,
                                                                                                                              boolean signed,
                                                                                                                              boolean endorse)
                                                                                                                       throws Exception
Throws:
Exception

handleSupportingTokens

protected Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> handleSupportingTokens(org.apache.wss4j.policy.model.SupportingTokens suppTokens,
                                                                                                                              boolean signed,
                                                                                                                              boolean endorse)
                                                                                                                       throws Exception
Throws:
Exception

handleSupportingTokens

protected Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> handleSupportingTokens(org.apache.wss4j.policy.model.SupportingTokens suppTokens,
                                                                                                                              boolean signed,
                                                                                                                              boolean endorse,
                                                                                                                              Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> ret)
                                                                                                                       throws Exception
Throws:
Exception

handleUsernameTokenSupportingToken

protected void handleUsernameTokenSupportingToken(org.apache.wss4j.policy.model.UsernameToken token,
                                                  boolean endorse,
                                                  boolean encryptedToken,
                                                  Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> ret)
                                           throws Exception
Throws:
Exception

addSupportingTokens

protected void addSupportingTokens()
                            throws Exception
Throws:
Exception

addSignatureParts

protected void addSignatureParts(Map<org.apache.wss4j.policy.model.AbstractToken,org.apache.xml.security.stax.ext.SecurePart> tokenMap)

addSignatureConfirmation

protected void addSignatureConfirmation(List<org.apache.xml.security.stax.ext.SecurePart> sigParts)

getSignedParts

protected List<org.apache.xml.security.stax.ext.SecurePart> getSignedParts()
                                                                    throws SOAPException
Identifies the portions of the message to be signed

Throws:
SOAPException

getEncryptedParts

protected List<org.apache.xml.security.stax.ext.SecurePart> getEncryptedParts()
                                                                       throws SOAPException
Identifies the portions of the message to be encrypted

Throws:
SOAPException

findInboundSecurityToken

protected org.apache.xml.security.stax.securityToken.SecurityToken findInboundSecurityToken(org.apache.xml.security.stax.securityEvent.SecurityEventConstants.Event event)
                                                                                     throws org.apache.xml.security.exceptions.XMLSecurityException
Throws:
org.apache.xml.security.exceptions.XMLSecurityException

removeSignatureIfSignedSAML

protected void removeSignatureIfSignedSAML()

prependSignatureToSC

protected void prependSignatureToSC()

enforceEncryptBeforeSigningWithSignedSAML

protected void enforceEncryptBeforeSigningWithSignedSAML()

putCustomTokenAfterSignature

protected void putCustomTokenAfterSignature()

Apache CXF API

Apache CXF