The AquaLogic Interaction Development Kit (IDK) provides standard methods for encrypting and decrypting credentials stored in the ALI database. In version 6.0, portlets can access the authentication settings stored in the central credential vault. For details, see Using the Credential Vault.
Portlets can use four types of encryption:
Advanced Encryption Standard (AES) is private key encryption using 128-bit keys.
RC2 is private key encryption using 64-bit keys.
Base64 converts binary data into ASCII text and vice versa. Base64 does not require a key for decryption. Base64 is used by the credential vault if no RSA key is provided.
RSA is the public key/private key encryption type used by the credential vault. To use RSA encryption with IDK methods, you must use the credential vault. For details, see Using the Credential Vault.
If you are not using the credential vault, you must set the encryption type and associated key, and the setting type and setting names. You can enter these parameters in the IDK web.xml/Web.config file, or set them programmatically using the methods in ICredentialSetter and ICredentialProvider.
Note: The encryption settings in the configuration file will override any values set programmatically.
To configure encryption in the web.xml/Web.config file, enter values for the following parameters:
|
Parameter |
Accepted Values |
|
CredentialSettingType |
Portal setting type:
|
|
UsernameParameterName |
The setting name for the user name setting (e.g., DctmUserName). |
|
PasswordParameterName |
The setting name for the password setting (e.g., DctmPassword). |
|
CredentialEncryptionType |
Encryption type:
(RSA encryption is only available with the credential vault.) |
|
RC2PrivateKey |
String of private key for RC2 encryption. |
|
AESPrivateKey |
String of private key for AES encryption. |
If you do not include these settings in the configuration file, you must set them programmatically as explained below.
The IDK encryption methods allow you to set the encryption type and key, and define the setting type and setting names.
Note: The encryption settings in the configuration file will override any values set programmatically.
To encrypt and store credentials in the portal database, use ICredentialSetter.
Java:
|
// get an ICredentialSetter instance from IPortletContext // set the header type and parameter names // set the encryption type and key // set the user name and password |
C#:
|
// get an ICredentialSetter instance from IPortletContext // set the header type and parameter names // set the encryption type and key // set the user name and password |
To decrypt credentials stored in the portal database, use ICredentialProvider.
Java:
|
// get an ICredentialProvider instance from IPortletContext // set the header type and parameter names // set the encryption type and key // get the username and password |
C#:
|
// get an ICredentialProvider instance from IPortletContext // set the header type and parameter names // set the encryption type and key // get the username and password |