|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.security.handler.WSHandler
public abstract class WSHandler
Extracted from WSDoAllReceiver and WSDoAllSender Extended to all passwordless UsernameTokens and configurable identities.
Field Summary | |
---|---|
protected static Hashtable |
cryptos
|
static String |
DONE
|
protected static WSSecurityEngine |
secEngine
|
Constructor Summary | |
---|---|
WSHandler()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String DONE
protected static final WSSecurityEngine secEngine
protected static Hashtable cryptos
Constructor Detail |
---|
public WSHandler()
Method Detail |
---|
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 property
WSSecurityException
protected void doReceiverAction(int doAction, RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean checkReceiverResults(Vector wsResult, Vector actions)
protected boolean checkReceiverResultsAnyOrder(Vector wsResult, Vector actions)
protected void checkSignatureConfirmation(RequestData reqData, Vector wsResult) throws WSSecurityException
WSSecurityException
public Crypto loadSignatureCrypto(RequestData reqData) throws WSSecurityException
WSSecurityException
protected Crypto loadEncryptionCrypto(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeUTParameter(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeSignatureParameter(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeEncryptionParameter(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeMustUnderstand(RequestData reqData) throws WSSecurityException
WSSecurityException
public int decodeTimeToLive(RequestData reqData)
protected boolean decodeEnableSignatureConfirmation(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeTimestampPrecision(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeCustomPasswordTypes(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeUseEncodedPasswords(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeNamespaceQualifiedPasswordTypes(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeTimestampStrict(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeUseSingleCertificate(RequestData reqData) throws WSSecurityException
WSSecurityException
public WSPasswordCallback getPassword(String username, int doAction, String clsProp, String refProp, RequestData reqData) throws WSSecurityException
WSSecurityException
protected Crypto loadDecryptionCrypto(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeSignatureParameter2(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeDecryptionParameter(RequestData reqData) throws WSSecurityException
WSSecurityException
protected javax.security.auth.callback.CallbackHandler getPasswordCB(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean verifyTrust(X509Certificate cert, RequestData reqData) throws WSSecurityException
cert
- the certificate that should be validated against the keystore
WSSecurityException
protected boolean verifyTrust(X509Certificate[] certificates, RequestData reqData) throws WSSecurityException
certificates
- the certificate chain that should be validated against the keystore
WSSecurityException
protected 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 against
WSSecurityException
protected 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 time
WSSecurityException
public 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 MessageContext
public abstract Object getOption(String key)
public abstract Object getProperty(Object msgContext, String key)
public abstract void setProperty(Object msgContext, String key, Object value)
public abstract String getPassword(Object msgContext)
public abstract void setPassword(Object msgContext, String password)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |