|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.security.WSSecurityEngine
public class WSSecurityEngine
WS-Security Engine.
| Field Summary | |
|---|---|
static QName |
binaryToken
wsse:BinarySecurityToken as defined by WS Security specification |
static QName |
DERIVED_KEY_TOKEN_05_02
wsc:DerivedKeyToken as defined by WS-SecureConversation specification |
static QName |
DERIVED_KEY_TOKEN_05_12
wsc:DerivedKeyToken as defined by WS-SecureConversation specification in WS-SX |
static QName |
ENCRYPTED_DATA
xenc:EncryptedData as defined by XML Encryption specification,
enhanced by WS Security specification |
static QName |
ENCRYPTED_KEY
xenc:EncryptedKey as defined by XML Encryption specification,
enhanced by WS Security specification |
static QName |
REFERENCE_LIST
xenc:ReferenceList as defined by XML Encryption specification, |
static QName |
SAML_TOKEN
saml:Assertion as defined by SAML specification |
static QName |
SAML2_TOKEN
|
static QName |
SECURITY_CONTEXT_TOKEN_05_02
wsc:SecurityContextToken as defined by WS-SecureConversation specification |
static QName |
SECURITY_CONTEXT_TOKEN_05_12
wsc:SecurityContextToken as defined by WS-SecureConversation specification in
WS-SX |
static QName |
SIGNATURE
ds:Signature as defined by XML Signature specification,
enhanced by WS Security specification |
static QName |
signatureConfirmation
wsse11:signatureConfirmation as defined by OASIS WS Security specification, |
static QName |
timeStamp
wsu:Timestamp as defined by OASIS WS Security specification, |
static QName |
usernameToken
wsse:UsernameToken as defined by WS Security specification |
static String |
VALUE_TYPE
|
| Constructor Summary | |
|---|---|
WSSecurityEngine()
|
|
| Method Summary | |
|---|---|
static WSSecurityEngine |
getInstance()
Get a singleton instance of security engine. |
WSSConfig |
getWssConfig()
|
Vector |
processSecurityHeader(Document doc,
String actor,
CallbackHandler cb,
Crypto crypto)
Process the security header given the soap envelope as W3C document. |
Vector |
processSecurityHeader(Document doc,
String actor,
CallbackHandler cb,
Crypto sigCrypto,
Crypto decCrypto)
Process the security header given the soap envelope as W3C document. |
protected Vector |
processSecurityHeader(Element securityHeader,
CallbackHandler cb,
Crypto sigCrypto,
Crypto decCrypto)
Process the security header given the wsse:Security DOM
Element. |
WSSConfig |
setWssConfig(WSSConfig cfg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VALUE_TYPE
public static final QName binaryToken
wsse:BinarySecurityToken as defined by WS Security specification
public static final QName usernameToken
wsse:UsernameToken as defined by WS Security specification
public static final QName timeStamp
wsu:Timestamp as defined by OASIS WS Security specification,
public static final QName signatureConfirmation
wsse11:signatureConfirmation as defined by OASIS WS Security specification,
public static final QName SIGNATURE
ds:Signature as defined by XML Signature specification,
enhanced by WS Security specification
public static final QName ENCRYPTED_KEY
xenc:EncryptedKey as defined by XML Encryption specification,
enhanced by WS Security specification
public static final QName ENCRYPTED_DATA
xenc:EncryptedData as defined by XML Encryption specification,
enhanced by WS Security specification
public static final QName REFERENCE_LIST
xenc:ReferenceList as defined by XML Encryption specification,
public static final QName SAML_TOKEN
saml:Assertion as defined by SAML specification
public static final QName SAML2_TOKEN
public static final QName DERIVED_KEY_TOKEN_05_02
wsc:DerivedKeyToken as defined by WS-SecureConversation specification
public static final QName SECURITY_CONTEXT_TOKEN_05_02
wsc:SecurityContextToken as defined by WS-SecureConversation specification
public static final QName DERIVED_KEY_TOKEN_05_12
wsc:DerivedKeyToken as defined by WS-SecureConversation specification in WS-SX
public static final QName SECURITY_CONTEXT_TOKEN_05_12
wsc:SecurityContextToken as defined by WS-SecureConversation specification in
WS-SX
| Constructor Detail |
|---|
public WSSecurityEngine()
| Method Detail |
|---|
public static WSSecurityEngine getInstance()
public final WSSConfig getWssConfig()
public final WSSConfig setWssConfig(WSSConfig cfg)
cfg - the WSSConfig instance for this WSSecurityEngine to use
public Vector processSecurityHeader(Document doc,
String actor,
CallbackHandler cb,
Crypto crypto)
throws WSSecurityException
wsse:Security is available with the
defined actor.
doc - the SOAP envelope as Documentactor - 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.
WSSecurityExceptionprocessSecurityHeader(Element securityHeader, CallbackHandler cb,
Crypto sigCrypto, Crypto decCrypto)
public Vector processSecurityHeader(Document doc,
String actor,
CallbackHandler cb,
Crypto sigCrypto,
Crypto decCrypto)
throws WSSecurityException
wsse:Security is available with the
defined actor.
doc - the SOAP envelope as Documentactor - 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 handlingsigCrypto - the object that implements the access to the keystore and the
handling of certificates for SignaturedecCrypto - the object that implements the access to the keystore and the
handling of certificates for Decryption
WSSecurityExceptionprocessSecurityHeader(
Element securityHeader, CallbackHandler cb, Crypto sigCrypto, Crypto decCrypto)
protected Vector processSecurityHeader(Element securityHeader,
CallbackHandler cb,
Crypto sigCrypto,
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:
Note that additional child elements can be processed if appropriate
Processors have been registered with the WSSCondig instance set
on this class.
securityHeader - the wsse:Security header elementcb - a callback hander to the caller to resolve passwords during
encryption and UsernameTokenhandlingsigCrypto - the object that implements the access to the keystore and the
handling of certificates used for SignaturedecCrypto - the object that implements the access to the keystore and the
handling of certificates used for Decryption
WSSecurityEngineResult. Each element in the
the Vector represents the result of a security action. The elements
are ordered according to the sequence of the security actions in the
wsse:Signature header. The Vector maybe empty if no security processing
was performed.
WSSecurityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||