Managing password encryption/decryption in Talend Administration Center
If you are using LDAP authentication in Talend Administration Center, you may want to
encrypt the SVN password that is stored in it. Once you have encrypted your password,
you need to compile a Java class that will allow you to manage password decryption in
Talend Administration Center.
Before you begin
- You have previously encrypted your password using the library of your choice. This library will be used both to encrypt and decrypt your password.
- The Tomcat server holding Talend Administration Center is stopped.
Procedure
-
Create a class file named DecryptLdapSvnPassword.java
based on the following code:
import org.talend.administrator.common.crypto.LDAPCrypto; /** * */ public class DecryptLdapSvnPassword implements LDAPCrypto { @Override public String decrypt(String encryptedSvnPasword) throws Exception { String decryptedSvnPasword = null; // // instructions to decrypt password // return decryptedSvnPasword; } }
-
If you are using an IDE:
- Add the <TalendAdministrationCenterPath>/WEB-INF/classes folder of your Talend Administration Center application to the classpath of your project.
- Add your algorithm library to the classpath.
- Insert required instructions to decrypt the SVN password stored in LDAP.
If you are not using an IDE:
-
Execute the following command to compile the .jar
used for your decryption library as well as the java class in the
directory of your choice:
On UNIX systems:
cd <directoryOfMyJavaClass_DecryptLdapSvnPassword> javac -classpath .:/org.talend.administrator-6.0.1-SNAPSHOT/WEB-INF/classes/:<myDirectory>/encryptionAlgorithm.jar DecryptLdapSvnPassword.java
On Windows systems:
cd directoryOfMyJavaClass_DecryptLdapSvnPassword javac -classpath .;c:\org.talend.administrator-6.0.1-SNAPSHOT\WEB-INF\classes\;c:\my\directory\encryptionAlgorithm.jar DecryptLdapSvnPassword.java
- Get the compiled class DecryptLdapSvnPassword.class and copy it to the following directory: <TalendAdministrationCenterPath>/WEB-INF/classes
-
Open the file
<TalendAdministrationCenterPath>/WEB-INF/classes/configuration.properties,
uncomment the
ldap.decryption.class=
line and enter the class you have compiled as value of the property. - Copy the .jar file used for the encryption algorithm in the following folder: <TalendAdministrationCenterPath>/WEB-INF/lib
- Restart the Tomcat server.