public abstract class WSHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,Crypto> |
cryptos |
protected WSSecurityEngine |
secEngine |
Constructor and Description |
---|
WSHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkReceiverResults(List<WSSecurityEngineResult> wsResult,
List<Integer> actions) |
protected boolean |
checkReceiverResultsAnyOrder(List<WSSecurityEngineResult> wsResult,
List<Integer> actions) |
protected void |
checkSignatureConfirmation(RequestData reqData,
List<WSSecurityEngineResult> resultList) |
protected void |
decodeAlgorithmSuite(RequestData reqData) |
protected boolean |
decodeAllowUsernameTokenNoPassword(RequestData reqData) |
protected boolean |
decodeBooleanConfigValue(RequestData reqData,
String configTag,
boolean defaultToTrue) |
protected boolean |
decodeBSPCompliance(RequestData reqData) |
protected boolean |
decodeCustomPasswordTypes(RequestData reqData) |
protected void |
decodeDecryptionParameter(RequestData reqData) |
protected boolean |
decodeEnableSignatureConfirmation(RequestData reqData) |
protected void |
decodeEncryptionParameter(RequestData reqData) |
protected int |
decodeFutureTimeToLive(RequestData reqData,
boolean timestamp)
Decode the FutureTimeToLive parameter for either a Timestamp or a UsernameToken Created
element, depending on the boolean argument
|
protected boolean |
decodeMustUnderstand(RequestData reqData) |
protected boolean |
decodeNamespaceQualifiedPasswordTypes(RequestData reqData) |
protected String |
decodePasswordType(RequestData reqData) |
protected boolean |
decodePasswordTypeStrict(RequestData reqData) |
protected void |
decodeRequireSignedEncryptedDataElements(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,
boolean timestamp)
Decode the TimeToLive parameter for either a Timestamp or a UsernameToken Created element,
depending on the boolean argument
|
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,
Document doc,
RequestData reqData,
List<Integer> actions,
boolean isRequest)
Performs all defined security actions to set-up the SOAP request.
|
CallbackHandler |
getCallbackHandler(String callbackHandlerClass,
String callbackHandlerRef,
RequestData requestData)
Get a CallbackHandler instance.
|
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) |
CallbackHandler |
getPasswordCallbackHandler(RequestData reqData)
Get a CallbackHandler instance to obtain passwords.
|
WSPasswordCallback |
getPasswordCB(String username,
int doAction,
CallbackHandler callbackHandler,
RequestData requestData)
Get a password callback (WSPasswordCallback object) from a CallbackHandler 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 |
loadCrypto(String cryptoPropertyFile,
String cryptoPropertyRefId,
RequestData requestData)
Load a Crypto instance.
|
protected Crypto |
loadCryptoFromPropertiesFile(String propFilename,
RequestData reqData)
A hook to allow subclass to load Crypto instances from property files in a different
way.
|
protected Crypto |
loadDecryptionCrypto(RequestData requestData)
Hook to allow subclasses to load their Decryption Crypto however they see
fit.
|
protected Crypto |
loadEncryptionCrypto(RequestData requestData)
Hook to allow subclasses to load their Encryption Crypto however they see
fit.
|
Crypto |
loadSignatureCrypto(RequestData requestData)
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 WSSecurityEngine secEngine
protected void doSenderAction(int doAction, Document doc, RequestData reqData, List<Integer> 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 list holding the actions to do in the order defined
in the deployment file or propertyWSSecurityException
protected void doReceiverAction(int doAction, RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean checkReceiverResults(List<WSSecurityEngineResult> wsResult, List<Integer> actions)
protected boolean checkReceiverResultsAnyOrder(List<WSSecurityEngineResult> wsResult, List<Integer> actions)
protected void checkSignatureConfirmation(RequestData reqData, List<WSSecurityEngineResult> resultList) throws WSSecurityException
WSSecurityException
protected void decodeUTParameter(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeSignatureParameter(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeAlgorithmSuite(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeEncryptionParameter(RequestData reqData) throws WSSecurityException
WSSecurityException
public int decodeTimeToLive(RequestData reqData, boolean timestamp)
protected int decodeFutureTimeToLive(RequestData reqData, boolean timestamp)
protected boolean decodeBSPCompliance(RequestData reqData) throws WSSecurityException
WSSecurityException
protected String decodePasswordType(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeMustUnderstand(RequestData reqData) throws WSSecurityException
WSSecurityException
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 decodeAllowUsernameTokenNoPassword(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 decodePasswordTypeStrict(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeUseSingleCertificate(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeRequireSignedEncryptedDataElements(RequestData reqData) throws WSSecurityException
WSSecurityException
protected boolean decodeBooleanConfigValue(RequestData reqData, String configTag, boolean defaultToTrue) throws WSSecurityException
WSSecurityException
public Crypto loadSignatureCrypto(RequestData requestData) throws WSSecurityException
requestData
- the RequestData objectWSSecurityException
protected Crypto loadDecryptionCrypto(RequestData requestData) throws WSSecurityException
requestData
- the RequestData objectWSSecurityException
protected Crypto loadEncryptionCrypto(RequestData requestData) throws WSSecurityException
requestData
- the RequestData objectWSSecurityException
protected Crypto loadCrypto(String cryptoPropertyFile, String cryptoPropertyRefId, RequestData requestData) throws WSSecurityException
requestData
- the RequestData objectWSSecurityException
protected Crypto loadCryptoFromPropertiesFile(String propFilename, RequestData reqData) throws WSSecurityException
propFilename
- The property file namereqData
- The RequestData objectWSSecurityException
public CallbackHandler getCallbackHandler(String callbackHandlerClass, String callbackHandlerRef, RequestData requestData) throws WSSecurityException
callbackHandlerClass
- The class name of the CallbackHandler instancecallbackHandlerRef
- The reference name of the CallbackHandler instancerequestData
- The RequestData which supplies the message contextWSSecurityException
public CallbackHandler getPasswordCallbackHandler(RequestData reqData) throws WSSecurityException
reqData
- The RequestData which supplies the message contextWSSecurityException
public WSPasswordCallback getPasswordCB(String username, int doAction, CallbackHandler callbackHandler, RequestData requestData) throws WSSecurityException
username
- The username to supply to the CallbackHandlerdoAction
- The action to performcallbackHandler
- The CallbackHandler instancerequestData
- The RequestData which supplies the message contextWSSecurityException
protected void decodeSignatureParameter2(RequestData reqData) throws WSSecurityException
WSSecurityException
protected void decodeDecryptionParameter(RequestData reqData) throws WSSecurityException
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 MessageContextCopyright © 2018 JBoss by Red Hat. All rights reserved.