Package org.apache.wss4j.dom.handler
Class RequestData
- java.lang.Object
-
- org.apache.wss4j.dom.handler.RequestData
-
public class RequestData extends Object
This class holds per request data.
-
-
Constructor Summary
Constructors Constructor Description RequestData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getActor()
AlgorithmSuite
getAlgorithmSuite()
CallbackHandler
getAttachmentCallbackHandler()
List<String>
getAudienceRestrictions()
Get the Audience RestrictionsBSPEnforcer
getBSPEnforcer()
CallbackHandler
getCallbackHandler()
Returns the CallbackHandler used for this request.Crypto
getDecCrypto()
int
getDerivedKeyIterations()
Get the derived key iterations.String
getDerivedKeyTokenReference()
org.apache.xml.security.encryption.Serializer
getEncryptionSerializer()
EncryptionActionToken
getEncryptionToken()
Collection<Pattern>
getIssuerDNPatterns()
Get the Signature Issuer DN Cert ConstraintsObject
getMsgContext()
ReplayCache
getNonceReplayCache()
Get the replay cache for Noncesint
getOriginalSignatureActionPosition()
PasswordEncryptor
getPasswordEncryptor()
String
getPwType()
String
getRequiredPasswordType()
AlgorithmSuite
getSamlAlgorithmSuite()
ReplayCache
getSamlOneTimeUseReplayCache()
Get the replay cache for SAML2 OneTimeUse AssertionsWSSecHeader
getSecHeader()
Provider
getSignatureProvider()
SignatureActionToken
getSignatureToken()
List<byte[]>
getSignatureValues()
Crypto
getSigVerCrypto()
SOAPConstants
getSoapConstants()
Collection<Pattern>
getSubjectCertConstraints()
Get the Signature Subject Cert Constraintsint
getTimeStampFutureTTL()
ReplayCache
getTimestampReplayCache()
Get the replay cache for Timestampsint
getTimeStampTTL()
Certificate[]
getTlsCerts()
String
getUsername()
int
getUtFutureTTL()
int
getUtTTL()
Validator
getValidator(QName qName)
Get the Validator instance corresponding to the QNameWSDocInfo
getWsDocInfo()
WSSConfig
getWssConfig()
boolean
isAddInclusivePrefixes()
boolean
isAddUsernameTokenCreated()
boolean
isAddUsernameTokenNonce()
boolean
isAllowNamespaceQualifiedPasswordTypes()
boolean
isAllowRSA15KeyTransportAlgorithm()
boolean
isAllowUsernameTokenNoPassword()
boolean
isAppendSignatureAfterTimestamp()
boolean
isDisableBSPEnforcement()
boolean
isEnableSignatureConfirmation()
boolean
isEncodePasswords()
boolean
isExpandXopInclude()
boolean
isHandleCustomPasswordTypes()
boolean
isPrecisionInMilliSeconds()
boolean
isRequireSignedEncryptedDataElements()
boolean
isRequireTimestampExpires()
boolean
isRevocationEnabled()
Get whether to enable CRL checking or not when verifying trust in a certificate.boolean
isStoreBytesInAttachment()
boolean
isTimeStampStrict()
boolean
isUse200512Namespace()
boolean
isUseDerivedKeyForMAC()
Whether to use the derived key for a MAC.boolean
isValidateSamlSubjectConfirmation()
void
setActor(String actor)
void
setAddInclusivePrefixes(boolean addInclusivePrefixes)
void
setAddUsernameTokenCreated(boolean addUsernameTokenCreated)
void
setAddUsernameTokenNonce(boolean addUsernameTokenNonce)
void
setAlgorithmSuite(AlgorithmSuite algorithmSuite)
void
setAllowNamespaceQualifiedPasswordTypes(boolean allowNamespaceQualifiedPasswordTypes)
void
setAllowRSA15KeyTransportAlgorithm(boolean allowRSA15KeyTransportAlgorithm)
void
setAllowUsernameTokenNoPassword(boolean allowUsernameTokenNoPassword)
void
setAppendSignatureAfterTimestamp(boolean appendSignatureAfterTimestamp)
void
setAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler)
void
setAudienceRestrictions(List<String> audienceRestrictions)
Set the Audience Restrictionsvoid
setCallbackHandler(CallbackHandler cb)
Sets the CallbackHandler used for this requestvoid
setDecCrypto(Crypto decCrypto)
void
setDerivedKeyIterations(int iterations)
Set the derived key iterations.void
setDerivedKeyTokenReference(String derivedKeyTokenReference)
void
setDisableBSPEnforcement(boolean disableBSPEnforcement)
void
setEnableRevocation(boolean enableRevocation)
Set whether to enable CRL checking or not when verifying trust in a certificate.void
setEnableSignatureConfirmation(boolean enableSignatureConfirmation)
void
setEncodePasswords(boolean encodePasswords)
void
setEncryptionSerializer(org.apache.xml.security.encryption.Serializer encryptionSerializer)
void
setEncryptionToken(EncryptionActionToken encryptionToken)
void
setExpandXopInclude(boolean expandXopInclude)
void
setHandleCustomPasswordTypes(boolean handleCustomPasswordTypes)
void
setIgnoredBSPRules(List<BSPRule> bspRules)
void
setIssuerDNPatterns(Collection<Pattern> issuerDNPatterns)
Set the Signature Issuer DN Cert Constraintsvoid
setMsgContext(Object msgContext)
void
setNonceReplayCache(ReplayCache newCache)
Set the replay cache for Noncesvoid
setOriginalSignatureActionPosition(int originalSignatureActionPosition)
void
setPasswordEncryptor(PasswordEncryptor passwordEncryptor)
void
setPrecisionInMilliSeconds(boolean precisionInMilliSeconds)
void
setPwType(String pwType)
void
setRequiredPasswordType(String requiredPasswordType)
void
setRequireSignedEncryptedDataElements(boolean requireSignedEncryptedDataElements)
Configure the engine to verify that EncryptedData elements are in a signed subtree of the document.void
setRequireTimestampExpires(boolean requireTimestampExpires)
void
setSamlAlgorithmSuite(AlgorithmSuite samlAlgorithmSuite)
void
setSamlOneTimeUseReplayCache(ReplayCache newCache)
Set the replay cache for SAML2 OneTimeUse Assertionsvoid
setSecHeader(WSSecHeader secHeader)
void
setSignatureProvider(Provider signatureProvider)
Set a security Provider instance to use for Signaturevoid
setSignatureToken(SignatureActionToken signatureToken)
void
setSigVerCrypto(Crypto sigVerCrypto)
void
setSoapConstants(SOAPConstants soapConstants)
void
setStoreBytesInAttachment(boolean storeBytesInAttachment)
void
setSubjectCertConstraints(Collection<Pattern> subjectCertConstraints)
Set the Signature Subject Cert Constraintsvoid
setTimeStampFutureTTL(int timeStampFutureTTL)
void
setTimestampReplayCache(ReplayCache newCache)
Set the replay cache for Timestampsvoid
setTimeStampStrict(boolean timeStampStrict)
void
setTimeStampTTL(int timeStampTTL)
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
setUtFutureTTL(int utFutureTTL)
void
setUtTTL(int utTTL)
void
setValidateSamlSubjectConfirmation(boolean validateSamlSubjectConfirmation)
void
setWsDocInfo(WSDocInfo wsDocInfo)
void
setWssConfig(WSSConfig wssConfig)
-
-
-
Method Detail
-
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)
-
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
-
getIssuerDNPatterns
public Collection<Pattern> getIssuerDNPatterns()
Get the Signature Issuer DN Cert Constraints- Returns:
-
setIssuerDNPatterns
public void setIssuerDNPatterns(Collection<Pattern> issuerDNPatterns)
Set the Signature Issuer DN Cert Constraints
-
setAudienceRestrictions
public void setAudienceRestrictions(List<String> audienceRestrictions)
Set the Audience Restrictions
-
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)
-
getTlsCerts
public Certificate[] getTlsCerts()
-
setTlsCerts
public void setTlsCerts(Certificate[] tlsCerts)
-
getPasswordEncryptor
public PasswordEncryptor getPasswordEncryptor()
-
setPasswordEncryptor
public void setPasswordEncryptor(PasswordEncryptor passwordEncryptor)
-
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)
-
isRequireTimestampExpires
public boolean isRequireTimestampExpires()
-
setRequireTimestampExpires
public void setRequireTimestampExpires(boolean requireTimestampExpires)
-
isValidateSamlSubjectConfirmation
public boolean isValidateSamlSubjectConfirmation()
-
setValidateSamlSubjectConfirmation
public void setValidateSamlSubjectConfirmation(boolean validateSamlSubjectConfirmation)
-
isAllowNamespaceQualifiedPasswordTypes
public boolean isAllowNamespaceQualifiedPasswordTypes()
-
setAllowNamespaceQualifiedPasswordTypes
public void setAllowNamespaceQualifiedPasswordTypes(boolean allowNamespaceQualifiedPasswordTypes)
-
getUtFutureTTL
public int getUtFutureTTL()
-
setUtFutureTTL
public void setUtFutureTTL(int utFutureTTL)
-
isHandleCustomPasswordTypes
public boolean isHandleCustomPasswordTypes()
-
setHandleCustomPasswordTypes
public void setHandleCustomPasswordTypes(boolean handleCustomPasswordTypes)
-
getUtTTL
public int getUtTTL()
-
setUtTTL
public void setUtTTL(int utTTL)
-
getTimeStampTTL
public int getTimeStampTTL()
-
setTimeStampTTL
public void setTimeStampTTL(int timeStampTTL)
-
getTimeStampFutureTTL
public int getTimeStampFutureTTL()
-
setTimeStampFutureTTL
public void setTimeStampFutureTTL(int timeStampFutureTTL)
-
isAllowUsernameTokenNoPassword
public boolean isAllowUsernameTokenNoPassword()
-
setAllowUsernameTokenNoPassword
public void setAllowUsernameTokenNoPassword(boolean allowUsernameTokenNoPassword)
-
isTimeStampStrict
public boolean isTimeStampStrict()
-
setTimeStampStrict
public void setTimeStampStrict(boolean timeStampStrict)
-
isAddInclusivePrefixes
public boolean isAddInclusivePrefixes()
-
setAddInclusivePrefixes
public void setAddInclusivePrefixes(boolean addInclusivePrefixes)
-
isPrecisionInMilliSeconds
public boolean isPrecisionInMilliSeconds()
-
setPrecisionInMilliSeconds
public void setPrecisionInMilliSeconds(boolean precisionInMilliSeconds)
-
isEnableSignatureConfirmation
public boolean isEnableSignatureConfirmation()
-
setEnableSignatureConfirmation
public void setEnableSignatureConfirmation(boolean enableSignatureConfirmation)
-
getRequiredPasswordType
public String getRequiredPasswordType()
-
setRequiredPasswordType
public void setRequiredPasswordType(String requiredPasswordType)
-
isEncodePasswords
public boolean isEncodePasswords()
-
setEncodePasswords
public void setEncodePasswords(boolean encodePasswords)
-
isStoreBytesInAttachment
public boolean isStoreBytesInAttachment()
-
setStoreBytesInAttachment
public void setStoreBytesInAttachment(boolean storeBytesInAttachment)
-
isExpandXopInclude
public boolean isExpandXopInclude()
-
setExpandXopInclude
public void setExpandXopInclude(boolean expandXopInclude)
-
getEncryptionSerializer
public org.apache.xml.security.encryption.Serializer getEncryptionSerializer()
-
setEncryptionSerializer
public void setEncryptionSerializer(org.apache.xml.security.encryption.Serializer encryptionSerializer)
-
isAddUsernameTokenCreated
public boolean isAddUsernameTokenCreated()
-
setAddUsernameTokenCreated
public void setAddUsernameTokenCreated(boolean addUsernameTokenCreated)
-
isAddUsernameTokenNonce
public boolean isAddUsernameTokenNonce()
-
setAddUsernameTokenNonce
public void setAddUsernameTokenNonce(boolean addUsernameTokenNonce)
-
getWsDocInfo
public WSDocInfo getWsDocInfo()
-
setWsDocInfo
public void setWsDocInfo(WSDocInfo wsDocInfo)
-
getSignatureProvider
public Provider getSignatureProvider()
-
setSignatureProvider
public void setSignatureProvider(Provider signatureProvider)
Set a security Provider instance to use for Signature
-
-