public abstract class WSHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Hashtable |
cryptos |
static String |
DONE |
protected static WSSecurityEngine |
secEngine |
| Constructor and Description |
|---|
WSHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkReceiverResults(Vector wsResult,
Vector actions) |
protected boolean |
checkReceiverResultsAnyOrder(Vector wsResult,
Vector actions) |
protected void |
checkSignatureConfirmation(RequestData reqData,
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,
Vector actions,
boolean isRequest)
Performs all defined security actions to set-up the SOAP request.
|
ClassLoader |
getClassLoader(Object msgCtx)
Returns the classloader to be used for loading the callback class
|
abstract Object |
getOption(String key) |
abstract String |
getPassword(Object msgContext) |
WSPasswordCallback |
getPassword(String username,
int doAction,
String clsProp,
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 Object |
getProperty(Object msgContext,
String key) |
String |
getString(String key,
Object mc)
Looks up key first via
getOption(String) and if not found
there, via getProperty(Object, String) |
String |
getStringOption(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(Object msgContext,
String password) |
abstract void |
setProperty(Object msgContext,
String key,
Object value) |
protected boolean |
verifyTimestamp(Timestamp timestamp,
int timeToLive)
Evaluate whether a timestamp is considered valid on the receivers' side.
|
protected boolean |
verifyTimestamp(Timestamp timestamp,
int timeToLive,
int futureTimeToLive)
Evaluate whether a timestamp is considered valid on the receivers' side.
|
protected boolean |
verifyTrust(X509Certificate[] certificates,
RequestData reqData)
Evaluate whether the given certificate chain should be trusted.
|
protected boolean |
verifyTrust(X509Certificate cert,
RequestData reqData)
Evaluate whether a given certificate should be trusted.
|
public static String DONE
protected static final WSSecurityEngine secEngine
protected static Hashtable cryptos
protected void doSenderAction(int doAction,
org.w3c.dom.Document doc,
RequestData reqData,
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 checkReceiverResultsAnyOrder(Vector wsResult, Vector actions)
protected void checkSignatureConfirmation(RequestData reqData, 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(String username, int doAction, String clsProp, 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(X509Certificate cert, RequestData reqData) throws WSSecurityException
cert - the certificate that should be validated against the keystoreWSSecurityExceptionprotected boolean verifyTrust(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 againstWSSecurityExceptionprotected boolean verifyTimestamp(Timestamp timestamp, int timeToLive, int futureTimeToLive) throws WSSecurityException
timestamp - the timestamp that is validatedtimeToLive - the limit on the receivers' side, that the timestamp is validated againstfutureTimeToLive - the value in seconds for the future validity of the Created timeWSSecurityExceptionpublic String getString(String key, 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.IllegalArgumentException - if key is null.public String getStringOption(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 ClassLoader getClassLoader(Object msgCtx)
msgCtx - The MessageContextCopyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.