org.apache.ws.security.handler
Class RequestData

java.lang.Object
  extended by org.apache.ws.security.handler.RequestData

public class RequestData
extends Object

This class holds per request data.

Author:
Werner Dittmann (Werner.Dittmann@t-online.de)

Field Summary
protected  boolean requireSignedEncryptedDataElements
           
 
Constructor Summary
RequestData()
           
 
Method Summary
 void clear()
           
 String getActor()
           
 AlgorithmSuite getAlgorithmSuite()
           
 CallbackHandler getCallbackHandler()
          Returns the CallbackHandler used for this request.
 Crypto getDecCrypto()
           
 int getDerivedKeyIterations()
          Get the derived key iterations.
 X509Certificate getEncCert()
           
 Crypto getEncCrypto()
           
 String getEncDigestAlgorithm()
           
 int getEncKeyId()
           
 String getEncKeyTransport()
           
 List<WSEncryptionPart> getEncryptParts()
           
 boolean getEncryptSymmetricEncryptionKey()
           
 String getEncSymmAlgo()
           
 String getEncUser()
           
 Object getMsgContext()
           
 ReplayCache getNonceReplayCache()
          Get the replay cache for Nonces
 String getPwType()
           
 AlgorithmSuite getSamlAlgorithmSuite()
           
 WSSecHeader getSecHeader()
           
 int getSecretKeyLength()
           
 String getSigAlgorithm()
           
 Crypto getSigCrypto()
           
 String getSigDigestAlgorithm()
           
 int getSigKeyId()
           
 List<WSEncryptionPart> getSignatureParts()
           
 String getSignatureUser()
           
 List<byte[]> getSignatureValues()
           
 SOAPConstants getSoapConstants()
           
 Collection<Pattern> getSubjectCertConstraints()
          Get the Signature Subject Cert Constraints
 ReplayCache getTimestampReplayCache()
          Get the replay cache for Timestamps
 int getTimeToLive()
           
 String getUsername()
           
 String[] getUtElements()
           
 Validator getValidator(QName qName)
          Get the Validator instance corresponding to the QName
 WSSConfig getWssConfig()
           
 boolean isAppendSignatureAfterTimestamp()
           
 boolean isNoSerialization()
           
 boolean isRequireSignedEncryptedDataElements()
           
 boolean isRevocationEnabled()
          Get whether to enable CRL checking or not when verifying trust in a certificate.
 boolean isUseDerivedKey()
          Return whether to derive keys as per the UsernameTokenProfile 1.1 spec.
 boolean isUseDerivedKeyForMAC()
          Whether to use the derived key for a MAC.
 boolean isUseSingleCert()
          Whether to use a single certificate or a whole certificate chain when constructing a BinarySecurityToken used for direct reference in Signature.
 void setActor(String actor)
           
 void setAlgorithmSuite(AlgorithmSuite algorithmSuite)
           
 void setAppendSignatureAfterTimestamp(boolean appendSignatureAfterTimestamp)
           
 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 setEnableRevocation(boolean enableRevocation)
          Set whether to enable CRL checking or not when verifying trust in a certificate.
 void setEncCert(X509Certificate encCert)
           
 void setEncCrypto(Crypto encCrypto)
           
 void setEncDigestAlgorithm(String encDigestAlgorithm)
           
 void setEncKeyId(int encKeyId)
           
 void setEncKeyTransport(String encKeyTransport)
           
 void setEncryptSymmetricEncryptionKey(boolean encrypt)
           
 void setEncSymmAlgo(String encSymmAlgo)
           
 void setEncUser(String encUser)
           
 void setMsgContext(Object msgContext)
           
 void setNonceReplayCache(ReplayCache newCache)
          Set the replay cache for Nonces
 void setNoSerialization(boolean noSerialization)
           
 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 setSecHeader(WSSecHeader secHeader)
           
 void setSecretKeyLength(int length)
           
 void setSigAlgorithm(String sigAlgorithm)
           
 void setSigCrypto(Crypto sigCrypto)
           
 void setSigDigestAlgorithm(String sigDigestAlgorithm)
           
 void setSigKeyId(int sigKeyId)
           
 void setSignatureUser(String signatureUser)
           
 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 setUseDerivedKey(boolean derivedKey)
           
 void setUseDerivedKeyForMAC(boolean useMac)
          Whether to use the derived key for a MAC.
 void setUsername(String username)
           
 void setUseSingleCert(boolean useSingleCert)
          Whether to use a single certificate or a whole certificate chain when constructing a BinarySecurityToken used for direct reference in Signature.
 void setUtElements(String[] utElements)
           
 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()

getMsgContext

public Object getMsgContext()

setMsgContext

public void setMsgContext(Object msgContext)

isNoSerialization

public boolean isNoSerialization()

setNoSerialization

public void setNoSerialization(boolean noSerialization)

getSoapConstants

public SOAPConstants getSoapConstants()

setSoapConstants

public void setSoapConstants(SOAPConstants soapConstants)

getActor

public String getActor()

setActor

public void setActor(String actor)

setSecretKeyLength

public void setSecretKeyLength(int length)

getSecretKeyLength

public int getSecretKeyLength()

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

setEncryptSymmetricEncryptionKey

public void setEncryptSymmetricEncryptionKey(boolean encrypt)

getEncryptSymmetricEncryptionKey

public boolean getEncryptSymmetricEncryptionKey()

getPwType

public String getPwType()

setPwType

public void setPwType(String pwType)

getUtElements

public String[] getUtElements()

setUtElements

public void setUtElements(String[] utElements)

getSigCrypto

public Crypto getSigCrypto()

setSigCrypto

public void setSigCrypto(Crypto sigCrypto)

getDecCrypto

public Crypto getDecCrypto()

setDecCrypto

public void setDecCrypto(Crypto decCrypto)

getSigKeyId

public int getSigKeyId()

setSigKeyId

public void setSigKeyId(int sigKeyId)

getSigAlgorithm

public String getSigAlgorithm()

setSigAlgorithm

public void setSigAlgorithm(String sigAlgorithm)

getSigDigestAlgorithm

public String getSigDigestAlgorithm()

setSigDigestAlgorithm

public void setSigDigestAlgorithm(String sigDigestAlgorithm)

getEncDigestAlgorithm

public String getEncDigestAlgorithm()

setEncDigestAlgorithm

public void setEncDigestAlgorithm(String encDigestAlgorithm)

getSignatureParts

public List<WSEncryptionPart> getSignatureParts()

getSignatureUser

public String getSignatureUser()

setSignatureUser

public void setSignatureUser(String signatureUser)

getEncCrypto

public Crypto getEncCrypto()

setEncCrypto

public void setEncCrypto(Crypto encCrypto)

getEncKeyId

public int getEncKeyId()

setEncKeyId

public void setEncKeyId(int encKeyId)

getEncSymmAlgo

public String getEncSymmAlgo()

setEncSymmAlgo

public void setEncSymmAlgo(String encSymmAlgo)

getEncKeyTransport

public String getEncKeyTransport()

setEncKeyTransport

public void setEncKeyTransport(String encKeyTransport)

getEncUser

public String getEncUser()

setEncUser

public void setEncUser(String encUser)

getEncryptParts

public List<WSEncryptionPart> getEncryptParts()

getEncCert

public X509Certificate getEncCert()

setEncCert

public void setEncCert(X509Certificate encCert)

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.

setUseDerivedKey

public void setUseDerivedKey(boolean derivedKey)
Parameters:
derivedKey - Set whether to derive keys as per the UsernameTokenProfile 1.1 spec. Default is true.

isUseDerivedKey

public boolean isUseDerivedKey()
Return whether to derive keys as per the UsernameTokenProfile 1.1 spec. Default is true.


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.

setUseSingleCert

public void setUseSingleCert(boolean useSingleCert)
Whether to use a single certificate or a whole certificate chain when constructing a BinarySecurityToken used for direct reference in Signature.

Parameters:
useSingleCert - true if only to use a single certificate

isUseSingleCert

public boolean isUseSingleCert()
Whether to use a single certificate or a whole certificate chain when constructing a BinarySecurityToken used for direct reference in Signature.

Returns:
whether to use a single certificate

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.

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()
Get the replay cache for Timestamps


setNonceReplayCache

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


getNonceReplayCache

public ReplayCache getNonceReplayCache()
Get the replay cache for Nonces


setSubjectCertConstraints

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


getSubjectCertConstraints

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


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)


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.