public class WSSecurityEngine extends Object
Constructor and Description |
---|
WSSecurityEngine() |
Modifier and Type | Method and Description |
---|---|
CallbackLookup |
getCallbackLookup()
Get the CallbackLookup object to use to locate elements
|
WSSConfig |
getWssConfig() |
WSHandlerResult |
processSecurityHeader(Document doc,
RequestData requestData)
Process the security header given the soap envelope as W3C document.
|
WSHandlerResult |
processSecurityHeader(Document doc,
String actor,
CallbackHandler cb,
Crypto crypto)
Process the security header given the soap envelope as W3C document.
|
WSHandlerResult |
processSecurityHeader(Document doc,
String actor,
CallbackHandler cb,
Crypto sigVerCrypto,
Crypto decCrypto)
Process the security header given the soap envelope as W3C document.
|
WSHandlerResult |
processSecurityHeader(Element securityHeader,
RequestData requestData)
Process the security header given the
wsse:Security DOM
Element. |
WSHandlerResult |
processSecurityHeader(Element securityHeader,
String actor,
CallbackHandler cb,
Crypto sigVerCrypto,
Crypto decCrypto)
Process the security header given the
wsse:Security DOM
Element. |
void |
setCallbackLookup(CallbackLookup callbackLookup)
Set the CallbackLookup object to use to locate elements
|
WSSConfig |
setWssConfig(WSSConfig cfg) |
public final WSSConfig getWssConfig()
public final WSSConfig setWssConfig(WSSConfig cfg)
cfg
- the WSSConfig instance for this WSSecurityEngine to usepublic void setCallbackLookup(CallbackLookup callbackLookup)
callbackLookup
- the CallbackLookup object to use to locate elementspublic CallbackLookup getCallbackLookup()
public WSHandlerResult processSecurityHeader(Document doc, String actor, CallbackHandler cb, Crypto crypto) throws WSSecurityException
wsse:Security
is available with the
defined actor.doc
- the SOAP envelope as Document
actor
- the engine works on behalf of this actor
. Refer
to the SOAP specification about actor
or role
cb
- a callback hander to the caller to resolve passwords during
encryption and UsernameToken handlingcrypto
- the object that implements the access to the keystore and the
handling of certificates.WSSecurityException
WSSecurityEngine#processSecurityHeader(Element securityHeader, CallbackHandler cb,
Crypto sigVerCrypto, Crypto decCrypto)
public WSHandlerResult processSecurityHeader(Document doc, String actor, CallbackHandler cb, Crypto sigVerCrypto, Crypto decCrypto) throws WSSecurityException
wsse:Security
is available with the
defined actor.doc
- the SOAP envelope as Document
actor
- the engine works on behalf of this actor
. Refer
to the SOAP specification about actor
or role
cb
- a callback hander to the caller to resolve passwords during
encryption and UsernameToken handlingsigVerCrypto
- the object that implements the access to the keystore and the
handling of certificates for Signature verificationdecCrypto
- the object that implements the access to the keystore and the
handling of certificates for DecryptionWSSecurityException
WSSecurityEngine#processSecurityHeader(
Element securityHeader, CallbackHandler cb, Crypto sigVerCrypto, Crypto decCrypto)
public WSHandlerResult processSecurityHeader(Element securityHeader, String actor, CallbackHandler cb, Crypto sigVerCrypto, Crypto decCrypto) throws WSSecurityException
wsse:Security
DOM
Element.
This function loops over all direct child elements of the
wsse:Security
header. If it finds a known element, it
transfers control to the appropriate handling function. The method
processes the known child elements in the same order as they appear in
the wsse:Security
element. This is in accordance to the WS
Security specification.
Currently the functions can handle the following child elements:
ds:Signature
xenc:EncryptedKey
xenc:ReferenceList
wsse:UsernameToken
wsu:Timestamp
securityHeader
- the wsse:Security
header elementcb
- a callback hander to the caller to resolve passwords during
encryption and UsernameToken handlingsigVerCrypto
- the object that implements the access to the keystore and the
handling of certificates used for Signature verificationdecCrypto
- the object that implements the access to the keystore and the
handling of certificates used for DecryptionWSSecurityException
public WSHandlerResult processSecurityHeader(Document doc, RequestData requestData) throws WSSecurityException
wsse:Security
is available with the
defined actor.doc
- the SOAP envelope as Document
requestData
- the RequestData associated with the request. It should
be able to provide the callback handler, cryptos, etc...
as needed by the processingWSSecurityException
public WSHandlerResult processSecurityHeader(Element securityHeader, RequestData requestData) throws WSSecurityException
wsse:Security
DOM
Element.
This function loops over all direct child elements of the
wsse:Security
header. If it finds a known element, it
transfers control to the appropriate handling function. The method
processes the known child elements in the same order as they appear in
the wsse:Security
element. This is in accordance to the WS
Security specification.
Currently the functions can handle the following child elements:
ds:Signature
xenc:EncryptedKey
xenc:ReferenceList
wsse:UsernameToken
wsu:Timestamp
securityHeader
- the wsse:Security
header elementrequestData
- the RequestData associated with the request. It should
be able to provide the callback handler, cryptos, etc...
as needed by the processingWSSecurityException
Copyright © 2017 JBoss by Red Hat. All rights reserved.