One Star

Need to see password from repository entry

An ex-employee created some repository entries for databases we need to connect to. Unfortunately we are now having problems connecting to one of these. When I pull up the repository entry for the connection, I can see everything except for the db password - he, unfortunately did not write this down anywhere else, so, my question, is how do I get talend to display the password instead of asterisks? On built-in connections the passwords are in full view, so i am hoping it is just a parameter that I need to change. thanks for your assistance.
5 REPLIES
One Star

Re: Need to see password from repository entry

Build a simple job with just a database connection to the database.
Start the job.
Go to your workspace.
Navigate to the folder .Java/src/%project_name%/%job_name%/contexts
Open any .properties file.
It contains the password in clear text.
OR build a job with the repository context parameters added and add a tJava with
System.out.println(context.DATABASENAME_Password);
in it.
One Star

Re: Need to see password from repository entry

Unfortunately, neither of these methods worked. I did find it though in a metadata connections property file from an export the previous employee created.
I would like to get either one of the suggestions working though, for other projects where i do not have an export. The context file was available, but it had nothing in it (except for a comment line with the date on it); the tJava did not recognize the variable to be printed. So what am I missing?
Seven Stars

Re: Need to see password from repository entry

JimmyRussels suggestion works if the connection setting have been converted to context variables.
If not, just drag the repository item into a job and then change the property type to built-in and the password will be in the clear.
Pretty hopeless security really!
One Star

Re: Need to see password from repository entry

Well of course you have to change DATABASENAME to your database name.
What exactly do you mean by "repository entries"? Database connections in the metadata section?
OK another way:
Create a tYourDatbaseTypeInput component with the database connection and put a tJavaRow behind it.
Create a correct SQL Statement (SELECT 1 FROM DUAL on Oracle e.g.).
Write the following in your tJavaRow:
System.out.println(password_tYourDatabaseTypeInput_1);

For Oracle e.g:
tOracleInput -> tJavaRow
System.out.println(password_tOracleInput_1);

If that still does not work, the passwords are encrypted with DES, Key "Talend-Key". See
http://talendforge.org/svn/tos/branches/jobserver-karaf/org.talend.commons.runtime/src/org/talend/co...
(Ignore that it's jobserver-karaf, it's the same for all Talend versions).
One Star

Re: Need to see password from repository entry

JimmyRussels suggestion works if the connection setting have been converted to context variables.
If not, just drag the repository item into a job and then change the property type to built-in and the password will be in the clear.
Pretty hopeless security really!

Great answer Alevy!!!
For same issue I was thinking since the password encryption type is PBEWithMD5AndDES, I was looking for SALT and PASSWORD text, silly me!!!