org.apache.wss4j.dom.handler
Class RequestData

java.lang.Object
  extended by org.apache.wss4j.dom.handler.RequestData

public class RequestData
extends Object

This class holds per request data.


Field Summary
protected  boolean requireSignedEncryptedDataElements
           
 
Constructor Summary
RequestData()
           
 
Method Summary
 void clear()
           
 String getActor()
           
 AlgorithmSuite getAlgorithmSuite()
           
 CallbackHandler getAttachmentCallbackHandler()
           
 BSPEnforcer getBSPEnforcer()
           
 CallbackHandler getCallbackHandler()
          Returns the CallbackHandler used for this request.
 Crypto getDecCrypto()
           
 int getDerivedKeyIterations()
          Get the derived key iterations.
 String getDerivedKeyTokenReference()
           
 EncryptionActionToken getEncryptionToken()
           
 List<BSPRule> getIgnoredBSPRules()
           
 Object getMsgContext()
           
 ReplayCache getNonceReplayCache()
          Get the replay cache for Nonces
 int getOriginalSignatureActionPosition()
           
 PasswordEncryptor getPasswordEncryptor()
           
 String getPwType()
           
 AlgorithmSuite getSamlAlgorithmSuite()
           
 ReplayCache getSamlOneTimeUseReplayCache()
          Get the replay cache for SAML2 OneTimeUse Assertions
 WSSecHeader getSecHeader()
           
 SignatureActionToken getSignatureToken()
           
 List<byte[]> getSignatureValues()
           
 Crypto getSigVerCrypto()
           
 SOAPConstants getSoapConstants()
           
 Collection<Pattern> getSubjectCertConstraints()
          Get the Signature Subject Cert Constraints
 ReplayCache getTimestampReplayCache()
          Get the replay cache for Timestamps
 int getTimeToLive()
           
 Certificate[] getTlsCerts()
           
 String getUsername()
           
 Validator getValidator(QName qName)
          Get the Validator instance corresponding to the QName
 WSSConfig getWssConfig()
           
 boolean isAddUsernameTokenCreated()
           
 boolean isAddUsernameTokenNonce()
           
 boolean isAllowRSA15KeyTransportAlgorithm()
           
 boolean isAppendSignatureAfterTimestamp()
           
 boolean isDisableBSPEnforcement()
           
 boolean isEnableNonceReplayCache()
           
 boolean isEnableSamlOneTimeUseReplayCache()
           
 boolean isEnableTimestampReplayCache()
           
 boolean isRequireSignedEncryptedDataElements()
           
 boolean isRevocationEnabled()
          Get whether to enable CRL checking or not when verifying trust in a certificate.
 boolean isUse200512Namespace()
           
 boolean isUseDerivedKeyForMAC()
          Whether to use the derived key for a MAC.
 void setActor(String actor)
           
 void setAddUsernameTokenCreated(boolean addUsernameTokenCreated)
           
 void setAddUsernameTokenNonce(boolean addUsernameTokenNonce)
           
 void setAlgorithmSuite(AlgorithmSuite algorithmSuite)
           
 void setAllowRSA15KeyTransportAlgorithm(boolean allowRSA15KeyTransportAlgorithm)
           
 void setAppendSignatureAfterTimestamp(boolean appendSignatureAfterTimestamp)
           
 void setAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler)
           
 void setCallbackHandler(CallbackHandler cb)
          Sets the CallbackHandler used for this request
 void setDecCrypto(Crypto decCrypto)
           
 void setDerivedKeyIterations(int iterations)
          Set the derived key iterations.
 void setDerivedKeyTokenReference(String derivedKeyTokenReference)
           
 void setDisableBSPEnforcement(boolean disableBSPEnforcement)
           
 void setEnableNonceReplayCache(boolean enableNonceReplayCache)
           
 void setEnableRevocation(boolean enableRevocation)
          Set whether to enable CRL checking or not when verifying trust in a certificate.
 void setEnableSamlOneTimeUseReplayCache(boolean enableSamlOneTimeUseReplayCache)
           
 void setEnableTimestampReplayCache(boolean enableTimestampReplayCache)
           
 void setEncryptionToken(EncryptionActionToken encryptionToken)
           
 void setIgnoredBSPRules(List<BSPRule> bspRules)
           
 void setMsgContext(Object msgContext)
           
 void setNonceReplayCache(ReplayCache newCache)
          Set the replay cache for Nonces
 void setOriginalSignatureActionPosition(int originalSignatureActionPosition)
           
 void setPasswordEncryptor(PasswordEncryptor passwordEncryptor)
           
 void setPwType(String pwType)
           
 void setRequireSignedEncryptedDataElements(boolean requireSignedEncryptedDataElements)
          Configure the engine to verify that EncryptedData elements are in a signed subtree of the document.
 void setSamlAlgorithmSuite(AlgorithmSuite samlAlgorithmSuite)
           
 void setSamlOneTimeUseReplayCache(ReplayCache newCache)
          Set the replay cache for SAML2 OneTimeUse Assertions
 void setSecHeader(WSSecHeader secHeader)
           
 void setSignatureToken(SignatureActionToken signatureToken)
           
 void setSigVerCrypto(Crypto sigVerCrypto)
           
 void setSoapConstants(SOAPConstants soapConstants)
           
 void setSubjectCertConstraints(Collection<Pattern> subjectCertConstraints)
          Set the Signature Subject Cert Constraints
 void setTimestampReplayCache(ReplayCache newCache)
          Set the replay cache for Timestamps
 void setTimeToLive(int timeToLive)
           
 void setTlsCerts(Certificate[] tlsCerts)
           
 void setUse200512Namespace(boolean use200512Namespace)
           
 void setUseDerivedKeyForMAC(boolean useMac)
          Whether to use the derived key for a MAC.
 void setUsername(String username)
           
 void setWssConfig(WSSConfig wssConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requireSignedEncryptedDataElements

protected boolean requireSignedEncryptedDataElements
Constructor Detail

RequestData

public RequestData()
Method Detail

clear

public void clear()

isEnableTimestampReplayCache

public boolean isEnableTimestampReplayCache()

setEnableTimestampReplayCache

public void setEnableTimestampReplayCache(boolean enableTimestampReplayCache)

isEnableNonceReplayCache

public boolean isEnableNonceReplayCache()

setEnableNonceReplayCache

public void setEnableNonceReplayCache(boolean enableNonceReplayCache)

getMsgContext

public Object getMsgContext()

setMsgContext

public void setMsgContext(Object msgContext)

getSoapConstants

public SOAPConstants getSoapConstants()

setSoapConstants

public void setSoapConstants(SOAPConstants soapConstants)

getActor

public String getActor()

setActor

public void setActor(String actor)

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getPwType

public String getPwType()

setPwType

public void setPwType(String pwType)

getSigVerCrypto

public Crypto getSigVerCrypto()

setSigVerCrypto

public void setSigVerCrypto(Crypto sigVerCrypto)

getDecCrypto

public Crypto getDecCrypto()

setDecCrypto

public void setDecCrypto(Crypto decCrypto)

getTimeToLive

public int getTimeToLive()

setTimeToLive

public void setTimeToLive(int timeToLive)

getWssConfig

public WSSConfig getWssConfig()
Returns:
Returns the wssConfig.

setWssConfig

public void setWssConfig(WSSConfig wssConfig)
Parameters:
wssConfig - The wssConfig to set.

getSignatureValues

public List<byte[]> getSignatureValues()
Returns:
Returns the list of stored signature values.

getSecHeader

public WSSecHeader getSecHeader()
Returns:
Returns the secHeader.

setSecHeader

public void setSecHeader(WSSecHeader secHeader)
Parameters:
secHeader - The secHeader to set.

setDerivedKeyIterations

public void setDerivedKeyIterations(int iterations)
Set the derived key iterations. Default is 1000.

Parameters:
iterations - The number of iterations to use when deriving a key

getDerivedKeyIterations

public int getDerivedKeyIterations()
Get the derived key iterations.

Returns:
The number of iterations to use when deriving a key

setUseDerivedKeyForMAC

public void setUseDerivedKeyForMAC(boolean useMac)
Whether to use the derived key for a MAC.

Parameters:
useMac - Whether to use the derived key for a MAC.

isUseDerivedKeyForMAC

public boolean isUseDerivedKeyForMAC()
Whether to use the derived key for a MAC.

Returns:
Whether to use the derived key for a MAC.

setEnableRevocation

public void setEnableRevocation(boolean enableRevocation)
Set whether to enable CRL checking or not when verifying trust in a certificate.

Parameters:
enableRevocation - whether to enable CRL checking

isRevocationEnabled

public boolean isRevocationEnabled()
Get whether to enable CRL checking or not when verifying trust in a certificate.

Returns:
whether to enable CRL checking

isRequireSignedEncryptedDataElements

public boolean isRequireSignedEncryptedDataElements()
Returns:
whether EncryptedData elements are required to be signed

setRequireSignedEncryptedDataElements

public void setRequireSignedEncryptedDataElements(boolean requireSignedEncryptedDataElements)
Configure the engine to verify that EncryptedData elements are in a signed subtree of the document. This can be used to prevent some wrapping based attacks when encrypt-before-sign token protection is selected.

Parameters:
requireSignedEncryptedDataElements -

setCallbackHandler

public void setCallbackHandler(CallbackHandler cb)
Sets the CallbackHandler used for this request

Parameters:
cb -

getCallbackHandler

public CallbackHandler getCallbackHandler()
Returns the CallbackHandler used for this request.

Returns:
the CallbackHandler used for this request.

getAttachmentCallbackHandler

public CallbackHandler getAttachmentCallbackHandler()

setAttachmentCallbackHandler

public void setAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler)

getValidator

public Validator getValidator(QName qName)
                       throws WSSecurityException
Get the Validator instance corresponding to the QName

Parameters:
qName - the QName with which to find a Validator instance
Returns:
the Validator instance corresponding to the QName
Throws:
WSSecurityException

setTimestampReplayCache

public void setTimestampReplayCache(ReplayCache newCache)
Set the replay cache for Timestamps


getTimestampReplayCache

public ReplayCache getTimestampReplayCache()
                                    throws WSSecurityException
Get the replay cache for Timestamps

Throws:
WSSecurityException

setNonceReplayCache

public void setNonceReplayCache(ReplayCache newCache)
Set the replay cache for Nonces


getNonceReplayCache

public ReplayCache getNonceReplayCache()
                                throws WSSecurityException
Get the replay cache for Nonces

Throws:
WSSecurityException

setSamlOneTimeUseReplayCache

public void setSamlOneTimeUseReplayCache(ReplayCache newCache)
Set the replay cache for SAML2 OneTimeUse Assertions


getSamlOneTimeUseReplayCache

public ReplayCache getSamlOneTimeUseReplayCache()
                                         throws WSSecurityException
Get the replay cache for SAML2 OneTimeUse Assertions

Throws:
WSSecurityException

setSubjectCertConstraints

public void setSubjectCertConstraints(Collection<Pattern> subjectCertConstraints)
Set the Signature Subject Cert Constraints


getSubjectCertConstraints

public Collection<Pattern> getSubjectCertConstraints()
Get the Signature Subject Cert Constraints


setIgnoredBSPRules

public void setIgnoredBSPRules(List<BSPRule> bspRules)

getIgnoredBSPRules

public List<BSPRule> getIgnoredBSPRules()

getBSPEnforcer

public BSPEnforcer getBSPEnforcer()

isAppendSignatureAfterTimestamp

public boolean isAppendSignatureAfterTimestamp()

setAppendSignatureAfterTimestamp

public void setAppendSignatureAfterTimestamp(boolean appendSignatureAfterTimestamp)

getAlgorithmSuite

public AlgorithmSuite getAlgorithmSuite()

setAlgorithmSuite

public void setAlgorithmSuite(AlgorithmSuite algorithmSuite)

getSamlAlgorithmSuite

public AlgorithmSuite getSamlAlgorithmSuite()

setSamlAlgorithmSuite

public void setSamlAlgorithmSuite(AlgorithmSuite samlAlgorithmSuite)

getOriginalSignatureActionPosition

public int getOriginalSignatureActionPosition()

setOriginalSignatureActionPosition

public void setOriginalSignatureActionPosition(int originalSignatureActionPosition)

isDisableBSPEnforcement

public boolean isDisableBSPEnforcement()

setDisableBSPEnforcement

public void setDisableBSPEnforcement(boolean disableBSPEnforcement)

isAllowRSA15KeyTransportAlgorithm

public boolean isAllowRSA15KeyTransportAlgorithm()

setAllowRSA15KeyTransportAlgorithm

public void setAllowRSA15KeyTransportAlgorithm(boolean allowRSA15KeyTransportAlgorithm)

isAddUsernameTokenNonce

public boolean isAddUsernameTokenNonce()

setAddUsernameTokenNonce

public void setAddUsernameTokenNonce(boolean addUsernameTokenNonce)

isAddUsernameTokenCreated

public boolean isAddUsernameTokenCreated()

setAddUsernameTokenCreated

public void setAddUsernameTokenCreated(boolean addUsernameTokenCreated)

getTlsCerts

public Certificate[] getTlsCerts()

setTlsCerts

public void setTlsCerts(Certificate[] tlsCerts)

getPasswordEncryptor

public PasswordEncryptor getPasswordEncryptor()

setPasswordEncryptor

public void setPasswordEncryptor(PasswordEncryptor passwordEncryptor)

isEnableSamlOneTimeUseReplayCache

public boolean isEnableSamlOneTimeUseReplayCache()

setEnableSamlOneTimeUseReplayCache

public void setEnableSamlOneTimeUseReplayCache(boolean enableSamlOneTimeUseReplayCache)

getSignatureToken

public SignatureActionToken getSignatureToken()

setSignatureToken

public void setSignatureToken(SignatureActionToken signatureToken)

getEncryptionToken

public EncryptionActionToken getEncryptionToken()

setEncryptionToken

public void setEncryptionToken(EncryptionActionToken encryptionToken)

getDerivedKeyTokenReference

public String getDerivedKeyTokenReference()

setDerivedKeyTokenReference

public void setDerivedKeyTokenReference(String derivedKeyTokenReference)

isUse200512Namespace

public boolean isUse200512Namespace()

setUse200512Namespace

public void setUse200512Namespace(boolean use200512Namespace)


Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.