Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Encrypted password in tSendMail

In the tSendMail component, we can use context variables.
For the password of the account used for the SMTP server, you can have also a context variable.
So the encrypted version of the password is saved in default.properties file
now the question is: if I  move my job and need to reconfigure the job with a new smtp server how can I do it?
If I modify the encrypted password, of course it does not work anymore.
So I am looking for a component to be able to reencrypt the new password.
I don't need to know the encryption algorithm.
I just want to enter "password" to get the encrypted version to update the default.properties
Hello Talend experts, is it a dream?
Is there a solution
Why it does not exist?
Thanks
Didier
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I have checked that in Talend Open Studio in release 5.5.1 and in my job the password is clear text in the default.properties.
Actually the encryption takes place only if you enter the password directly in the input field and do not use a context variable.
I have seen this is not the case in 6.1.1 ! This is perhaps a problem for migration scenarios.
In 6.1.1 indeed the password is stored as encrypted value. This is actually not that bad and an old requirement.
You can build a job to encrypt a clear text password using the routine routines.system.PasswordEncryptUtil
or you can define the context variable simply as String, it will used as password as well but without encrypting the value in the default.properties.

View solution in original post

17 Replies
Anonymous
Not applicable
Author

I have checked that in Talend Open Studio in release 5.5.1 and in my job the password is clear text in the default.properties.
Actually the encryption takes place only if you enter the password directly in the input field and do not use a context variable.
I have seen this is not the case in 6.1.1 ! This is perhaps a problem for migration scenarios.
In 6.1.1 indeed the password is stored as encrypted value. This is actually not that bad and an old requirement.
You can build a job to encrypt a clear text password using the routine routines.system.PasswordEncryptUtil
or you can define the context variable simply as String, it will used as password as well but without encrypting the value in the default.properties.
Anonymous
Not applicable
Author

Ok I test it
Anonymous
Not applicable
Author

You are right. With a clear text password it works!
now the question is to encrypt it for security reason.
Does the PasswordEncryptUtil routine is a standard routine in talend ou do I need to create it?
Does the encrypted password will be automaticaly decrypted by the tSendMail component?
Thanks for your help
Didier
Anonymous
Not applicable
Author

The mentioned routine is a standard routine. You should be able to create a small simple job to encrypt passwords for your self.
Anonymous
Not applicable
Author

So I would like to create a job like:

0683p000009MCxv.png
0683p000009MD1w.png

in the java component:
PasswordEncryptUtil.encryptPassword((String)globalMap.get("tMsgBox_1_RESULT"));

but currently I have the following error:

0683p000009MCii.png
so something like "the tMsgBox requires an input link"
So what can I insert as input component of the tMsgBox component??
Thanks
Didier
Anonymous
Not applicable
Author

I would not use the message box. It is quite enough to use a input context variable and set them as prompt.
Anonymous
Not applicable
Author

sorry the whole job is not displayed:

0683p000009MD21.png
Anonymous
Not applicable
Author

Here a job with the message box:
0683p000009MCew.pngThe answer of the message box is given by a return variable (see the Outline view).
((String)globalMap.get("tMsgBox_1_RESULT"))
Anonymous
Not applicable
Author

now I have the same error on the tJava component:

0683p000009MD26.png
Encrypt_PWD.zip_20160121-1149.zip