There are two ways to secure passwords in PDI: Kettle obfuscation or Advanced Encryption Standard (AES). Kettle obfuscation is applied by default, or you can use AES to increase security. The password security method you choose is applied to all passwords including those in database connections, transformation steps, and job entries.
To learn more about AES, see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard.
Install the Java Cryptography Extension (JCE)
Back up the files in your lib/security folder for the instance of Java that your instance of Pentaho is using. The exact location of the folder depends on whether you are pointing to a standalone version of the JDK or JRE, or whether you are using the version of Java that is bundled with the Wizard.
- Wizard: <pentaho installation directory>/java/lib/security
- JDK: <java jdk installation directory>/jre/lib/security
- JRE: <java jre installation directory>/lib security
Download the "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" from the Oracle website:Components Reference for the version of Java that Pentaho supports.
Stop the server.
Unzip the JCE files and copy the local_policy.jar and US_export_policy.jar files into the lib/security folder.
Restart the server.
Create the AES key file.
Create an AES key file
Create a text file that contains a key phrase, such as !@ExampleKey#123.Leading and trailing white spaces are ignored.
Save and close the file.NoteSafeguard the key file. If the key file becomes corrupted or lost, passwords cannot be decrypted.
Specify AES variables in kettle.properties
Open the kettle.properties file for Spoon. By default, the kettle.properties file is in the user’s home directory.
Add the following variables and values.
Variable Description Value KETTLE_PASSWORD_ENCODER_PLUGIN
Indicates the type of plugin used.
Indicates the path to the key file.
Path to the key file. Relative paths are resolved against the Kettle working directory, NOT the location of the kettle.properties file. Example: c:/securearea/keyfile.txt KETTLE_AES_KETTLE_PASSWORD_HANDLING
(Optional)Maintain backwards compatibility by setting this variable to Decode. If this is not set, Kettle encoded passwords are not decoded.
Save and close the kettle.properties file.
Repeat this process for other kettle.properties files on the Pentaho Server and cluster nodes.
You might need to stop and restart Spoon, Pentaho Server, and the cluster nodes for the kettle.properties file to take effect.
You must configure Tomcat for AES encryption.
Perform the following steps to configure Tomcat:
Navigate to the server\pentaho-server\tomcat\webapps\pentaho\WEB-INF\classes directory and open the kettle-password-encoder-plugins.xml file with any text editor.
Add or uncomment the following code:
<password-encoder-plugin id="AES"> <description>AES Password Encoder</description> <classname>org.pentaho.support.encryption.AESTwoWayPasswordEncoder</classname> <default-encoder>true</default-encoder> </password-encoder-plugin>
Save and close the file.
Verify correct application
Create a blank transformation.
Add a database connection that requires a password.
Save, then close the transformation.
Use a text editor to open the transformation you just saved, then search for the name of the connection you created.
Examine the password.If the password is preceded by the letters AES, the encryption was applied correctly.
Close the transformation.