com.ibm.websphere.wssecurity.wssapi.decryption
Interface WSSDecryption
-
public interface WSSDecryption
This interface is responsible for the decryption component. There are the values to set as default.- Target of decryption
- BODY_CONTENT, SIGNATURE
- data encryption method
- AES128
- key encryption method
- KW_RSA_OAEP
WSSFactory factory = WSSFactory.getInstance(); WSSConsumingContext concont = factory.newWSSConsumingContext(); X509ConsumeCallbackHandler callbackhandler = generateCallbackHandler(); // see X509ConsumeCallbackHandler WSSDecryption dec = factory.newWSSDecryption(X509Token.class, callbackhandler); concont.add(dec);
- See Also:
WSSDecryptPart
- Target of decryption
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
AES128
The URI for the data encryption algorithm, AES 128: http://www.w3.org/2001/04/xmlenc#aes128-cbc.static java.lang.String
AES192
The URI for the data encryption algorithm, AES 192: http://www.w3.org/2001/04/xmlenc#aes192-cbc.static java.lang.String
AES256
The URI for the data encryption algorithm, AES 256: http://www.w3.org/2001/04/xmlenc#aes256-cbc.static int
BODY_CONTENT
The keyword for the body content of the SOAP message as a decrypt target.static java.lang.String
KW_AES128
The URI for the key wrap algorithm, key wrap AES 128: http://www.w3.org/2001/04/xmlenc#kw-aes128.static java.lang.String
KW_AES192
The URI for the key wrap algorithm, key wrap AES 192: http://www.w3.org/2001/04/xmlenc#kw-aes192.static java.lang.String
KW_AES256
The URI for the key wrap algorithm, key wrap AES 256: http://www.w3.org/2001/04/xmlenc#kw-aes256.static java.lang.String
KW_RSA_OAEP
The URI for the key wrap algorithm, key wrap RSA-OAEP: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p.static java.lang.String
KW_RSA15
The URI for the key wrap algorithm, key wrap RSA 1.5 : http://www.w3.org/2001/04/xmlenc#rsa-1_5.static java.lang.String
KW_TRIPLE_DES
The URI for the key wrap algorithm, key wrap triple DES: http://www.w3.org/2001/04/xmlenc#kw-tripledes.static int
SIGNATURE
The keyword for the signature element as a decrypt target.static java.lang.String
TRIPLE_DES
The URI for the data encryption algorithm, triple DES: http://www.w3.org/2001/04/xmlenc#tripledes-cbc.static int
USERNAME_TOKEN
The keyword for the user name token element as a decrypt target.
-
Method Summary
Methods Modifier and Type Method and Description void
addAllowedEncryptionMethod(java.lang.String algorithm)
Adds the data encryption method to decrypted data.void
addAllowedKeyEncryptionMethod(java.lang.String algorithm)
Adds the key encryption method to decrypt the shared key.void
addRequiredDecryptHeader(javax.xml.namespace.QName header)
Adds the header in the SOAP Header, specified by QName, as a decrypted part.void
addRequiredDecryptPart(int keyword)
void
addRequiredDecryptPart(WSSDecryptPart part)
Adds the WSSDecryptPart object as a decrypted part.void
addRequiredDecryptPart(WSSVerification verification)
Adds the WSSVerification object as a decrypted part.void
addRequiredDecryptPartByXPath(java.lang.String xpath)
Adds an XPath expression as a decrypted part.void
addToken(java.lang.Class tokenClass, javax.security.auth.callback.CallbackHandler callbackHandler)
Adds the information of the candidate token used to decrypt.void
addToken(java.lang.Class tokenClass, javax.security.auth.callback.CallbackHandler callbackHandler, java.lang.String loginConfigName)
Adds the information of the candidate token that is used for the decryption.void
encryptKey(boolean isEncrypt)
Call this method with true as an argument, when the shared key is encrypted.
-
-
-
Field Detail
-
BODY_CONTENT
static final int BODY_CONTENT
The keyword for the body content of the SOAP message as a decrypt target.- See Also:
- Constant Field Values
-
USERNAME_TOKEN
static final int USERNAME_TOKEN
The keyword for the user name token element as a decrypt target.- See Also:
- Constant Field Values
-
SIGNATURE
static final int SIGNATURE
The keyword for the signature element as a decrypt target.- See Also:
- Constant Field Values
-
TRIPLE_DES
static final java.lang.String TRIPLE_DES
The URI for the data encryption algorithm, triple DES: http://www.w3.org/2001/04/xmlenc#tripledes-cbc.- See Also:
- Constant Field Values
-
AES128
static final java.lang.String AES128
The URI for the data encryption algorithm, AES 128: http://www.w3.org/2001/04/xmlenc#aes128-cbc.- See Also:
- Constant Field Values
-
AES192
static final java.lang.String AES192
The URI for the data encryption algorithm, AES 192: http://www.w3.org/2001/04/xmlenc#aes192-cbc.- See Also:
- Constant Field Values
-
AES256
static final java.lang.String AES256
The URI for the data encryption algorithm, AES 256: http://www.w3.org/2001/04/xmlenc#aes256-cbc.- See Also:
- Constant Field Values
-
KW_TRIPLE_DES
static final java.lang.String KW_TRIPLE_DES
The URI for the key wrap algorithm, key wrap triple DES: http://www.w3.org/2001/04/xmlenc#kw-tripledes.
It is an algorithm for the WS-Secure Conversation.- See Also:
- Constant Field Values
-
KW_AES128
static final java.lang.String KW_AES128
The URI for the key wrap algorithm, key wrap AES 128: http://www.w3.org/2001/04/xmlenc#kw-aes128.
It is an algorithm for the WS-Secure Conversation.- See Also:
- Constant Field Values
-
KW_AES192
static final java.lang.String KW_AES192
The URI for the key wrap algorithm, key wrap AES 192: http://www.w3.org/2001/04/xmlenc#kw-aes192.
It is an algorithm for the WS-Secure Conversation.- See Also:
- Constant Field Values
-
KW_AES256
static final java.lang.String KW_AES256
The URI for the key wrap algorithm, key wrap AES 256: http://www.w3.org/2001/04/xmlenc#kw-aes256.
It is an algorithm for the WS-Secure Conversation.- See Also:
- Constant Field Values
-
KW_RSA15
static final java.lang.String KW_RSA15
The URI for the key wrap algorithm, key wrap RSA 1.5 : http://www.w3.org/2001/04/xmlenc#rsa-1_5.- See Also:
- Constant Field Values
-
KW_RSA_OAEP
static final java.lang.String KW_RSA_OAEP
The URI for the key wrap algorithm, key wrap RSA-OAEP: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p.- See Also:
- Constant Field Values
-
-
Method Detail
-
addRequiredDecryptPart
void addRequiredDecryptPart(int keyword) throws WSSException
- Parameters:
keyword
- part to be decrypted- Throws:
WSSException
- if the keyword is not valid.
-
addRequiredDecryptPart
void addRequiredDecryptPart(WSSDecryptPart part)
Adds the WSSDecryptPart object as a decrypted part.- Parameters:
part
- part to be decrypted
-
addRequiredDecryptPart
void addRequiredDecryptPart(WSSVerification verification)
Adds the WSSVerification object as a decrypted part.- Parameters:
verification
- part to be decrypted
-
addRequiredDecryptHeader
void addRequiredDecryptHeader(javax.xml.namespace.QName header)
Adds the header in the SOAP Header, specified by QName, as a decrypted part.- Parameters:
header
- part to be decrypted
-
addRequiredDecryptPartByXPath
void addRequiredDecryptPartByXPath(java.lang.String xpath)
Adds an XPath expression as a decrypted part.- Parameters:
xpath
- part to be decrypted
-
addAllowedEncryptionMethod
void addAllowedEncryptionMethod(java.lang.String algorithm) throws WSSException
Adds the data encryption method to decrypted data.- Parameters:
algorithm
- data encryption method- Throws:
WSSException
- the algorithm is not supported.
-
addAllowedKeyEncryptionMethod
void addAllowedKeyEncryptionMethod(java.lang.String algorithm) throws WSSException
Adds the key encryption method to decrypt the shared key.- Parameters:
algorithm
- key encryption method- Throws:
WSSException
- the algorithm is not supported.
-
encryptKey
void encryptKey(boolean isEncrypt)
Call this method with true as an argument, when the shared key is encrypted. Call this method with false as an argument, when the shared key is not encrypted. The default is true.- Parameters:
isEncrypt
- true if the shared key which is encrypted is required.
false if the shared key which is not encrypted is required.
-
addToken
void addToken(java.lang.Class tokenClass, javax.security.auth.callback.CallbackHandler callbackHandler, java.lang.String loginConfigName) throws WSSException
Adds the information of the candidate token that is used for the decryption.- Parameters:
tokenClass
- class of the security tokencallbackHandler
- callback handlerloginConfigName
- name of the JAAS login module- Throws:
WSSException
- if the arguments are not valid.
-
addToken
void addToken(java.lang.Class tokenClass, javax.security.auth.callback.CallbackHandler callbackHandler) throws WSSException
Adds the information of the candidate token used to decrypt.- Parameters:
tokenClass
- class of the security tokencallbackHandler
- callback handler- Throws:
WSSException
-
-