public abstract class WSHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.Hashtable |
cryptos |
static java.lang.String |
DONE |
protected static WSSecurityEngine |
secEngine |
| Constructor and Description |
|---|
WSHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkReceiverResults(java.util.Vector wsResult,
java.util.Vector actions) |
protected boolean |
checkReceiverResultsAnyOrder(java.util.Vector wsResult,
java.util.Vector actions) |
protected void |
checkSignatureConfirmation(RequestData reqData,
java.util.Vector wsResult) |
protected boolean |
decodeCustomPasswordTypes(RequestData reqData) |
protected void |
decodeDecryptionParameter(RequestData reqData) |
protected boolean |
decodeEnableSignatureConfirmation(RequestData reqData) |
protected void |
decodeEncryptionParameter(RequestData reqData) |
protected boolean |
decodeMustUnderstand(RequestData reqData) |
protected boolean |
decodeNamespaceQualifiedPasswordTypes(RequestData reqData) |
protected void |
decodeSignatureParameter(RequestData reqData) |
protected void |
decodeSignatureParameter2(RequestData reqData) |
protected boolean |
decodeTimestampPrecision(RequestData reqData) |
protected boolean |
decodeTimestampStrict(RequestData reqData) |
int |
decodeTimeToLive(RequestData reqData) |
protected boolean |
decodeUseEncodedPasswords(RequestData reqData) |
protected boolean |
decodeUseSingleCertificate(RequestData reqData) |
protected void |
decodeUTParameter(RequestData reqData) |
protected void |
doReceiverAction(int doAction,
RequestData reqData) |
protected void |
doSenderAction(int doAction,
org.w3c.dom.Document doc,
RequestData reqData,
java.util.Vector actions,
boolean isRequest)
Performs all defined security actions to set-up the SOAP request.
|
java.lang.ClassLoader |
getClassLoader(java.lang.Object msgCtx)
Returns the classloader to be used for loading the callback class
|
abstract java.lang.Object |
getOption(java.lang.String key) |
abstract java.lang.String |
getPassword(java.lang.Object msgContext) |
WSPasswordCallback |
getPassword(java.lang.String username,
int doAction,
java.lang.String clsProp,
java.lang.String refProp,
RequestData reqData)
Get a password to construct a UsernameToken or sign a message.
|
protected javax.security.auth.callback.CallbackHandler |
getPasswordCB(RequestData reqData)
Get the password callback class and get an instance
|
abstract java.lang.Object |
getProperty(java.lang.Object msgContext,
java.lang.String key) |
java.lang.String |
getString(java.lang.String key,
java.lang.Object mc)
Looks up key first via
getOption(String) and if not found
there, via getProperty(Object, String) |
java.lang.String |
getStringOption(java.lang.String key)
Returns the option on
name. |
protected Crypto |
loadDecryptionCrypto(RequestData reqData)
Hook to allow subclasses to load their Decryption Crypto however they
see fit.
|
protected Crypto |
loadEncryptionCrypto(RequestData reqData)
Hook to allow subclasses to load their Encryption Crypto however they
see fit.
|
Crypto |
loadSignatureCrypto(RequestData reqData)
Hook to allow subclasses to load their Signature Crypto however they see
fit.
|
abstract void |
setPassword(java.lang.Object msgContext,
java.lang.String password) |
abstract void |
setProperty(java.lang.Object msgContext,
java.lang.String key,
java.lang.Object value) |
protected boolean |
verifyTimestamp(Timestamp timestamp,
int timeToLive)
Evaluate whether a timestamp is considered valid on the receivers' side.
|
protected boolean |
verifyTrust(java.security.cert.X509Certificate[] certificates,
RequestData reqData)
Evaluate whether the given certificate chain should be trusted.
|
protected boolean |
verifyTrust(java.security.cert.X509Certificate cert,
RequestData reqData)
Evaluate whether a given certificate should be trusted.
|
public static java.lang.String DONE
protected static final WSSecurityEngine secEngine
protected static java.util.Hashtable cryptos
protected void doSenderAction(int doAction,
org.w3c.dom.Document doc,
RequestData reqData,
java.util.Vector actions,
boolean isRequest)
throws WSSecurityException
doAction - a set defining the actions to dodoc - the request as DOM documentreqData - a data storage to pass values around between methodsactions - a vector holding the actions to do in the order defined
in the deployment file or propertyWSSecurityExceptionprotected void doReceiverAction(int doAction,
RequestData reqData)
throws WSSecurityException
WSSecurityExceptionprotected boolean checkReceiverResults(java.util.Vector wsResult,
java.util.Vector actions)
protected boolean checkReceiverResultsAnyOrder(java.util.Vector wsResult,
java.util.Vector actions)
protected void checkSignatureConfirmation(RequestData reqData, java.util.Vector wsResult) throws WSSecurityException
WSSecurityExceptionpublic Crypto loadSignatureCrypto(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected Crypto loadEncryptionCrypto(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected void decodeUTParameter(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected void decodeSignatureParameter(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected void decodeEncryptionParameter(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected boolean decodeMustUnderstand(RequestData reqData) throws WSSecurityException
WSSecurityExceptionpublic int decodeTimeToLive(RequestData reqData)
protected boolean decodeEnableSignatureConfirmation(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected boolean decodeTimestampPrecision(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected boolean decodeCustomPasswordTypes(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected boolean decodeUseEncodedPasswords(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected boolean decodeNamespaceQualifiedPasswordTypes(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected boolean decodeTimestampStrict(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected boolean decodeUseSingleCertificate(RequestData reqData) throws WSSecurityException
WSSecurityExceptionpublic WSPasswordCallback getPassword(java.lang.String username, int doAction, java.lang.String clsProp, java.lang.String refProp, RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected Crypto loadDecryptionCrypto(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected void decodeSignatureParameter2(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected void decodeDecryptionParameter(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected javax.security.auth.callback.CallbackHandler getPasswordCB(RequestData reqData) throws WSSecurityException
WSSecurityExceptionprotected boolean verifyTrust(java.security.cert.X509Certificate cert,
RequestData reqData)
throws WSSecurityException
cert - the certificate that should be validated against the keystoreWSSecurityExceptionprotected boolean verifyTrust(java.security.cert.X509Certificate[] certificates,
RequestData reqData)
throws WSSecurityException
certificates - the certificate chain that should be validated against the keystoreWSSecurityExceptionprotected boolean verifyTimestamp(Timestamp timestamp, int timeToLive) throws WSSecurityException
timestamp - the timestamp that is validatedtimeToLive - the limit on the receivers' side, that the timestamp is validated againstWSSecurityExceptionpublic java.lang.String getString(java.lang.String key,
java.lang.Object mc)
getOption(String) and if not found
there, via getProperty(Object, String)key - the key to search for. May not be null.mc - the message context to search.java.lang.IllegalArgumentException - if key is null.public java.lang.String getStringOption(java.lang.String key)
name.key - the non-null key of the option.key if key
exists and is of type java.lang.String; otherwise null.public java.lang.ClassLoader getClassLoader(java.lang.Object msgCtx)
msgCtx - The MessageContextpublic abstract java.lang.Object getOption(java.lang.String key)
public abstract java.lang.Object getProperty(java.lang.Object msgContext,
java.lang.String key)
public abstract void setProperty(java.lang.Object msgContext,
java.lang.String key,
java.lang.Object value)
public abstract java.lang.String getPassword(java.lang.Object msgContext)
public abstract void setPassword(java.lang.Object msgContext,
java.lang.String password)
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.