Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to identify when a context variable type is a password in a tJavaRow but I don't know how to do it. Is there a way to do it?
Thank you
Of course, I used a tJavaFlex and then a tFilterRow in order to filter the null values. I don't know which is the minor version to compile the code but it must be greater than v6.1 because the context method "getContextType(String)" doesn't exist.
Here it goes:
There is no way to do this within a tJavaRow. However, you could simply put a pswd_ prefix on all of your password contexts and identify them that way.
Hi Francois,
I'm trying to do a generic job for integrations in order to encrypt all password fields of the context. I load the variables reading a properties file in plain text and then using a tContextLoad. I want to identify which variables are passwords and encrypt them using AES to save them into a file.
Thanks
Are you sure this is what you want? You are keeping your data in plain text in a file and only wishing to encrypt once inside the Talend job? That seems like a bit of a strange use case.
Hi rhall_2_0,
Nowadays I have a process that identifies from the plain text file if a specific variable is blank or not. If it is not blank, I encrypt it in AES and I save it in other file, then, I blank the value in the plain text file. On the other hand, if the value of the variable is blank in the plain text file it means that an encrypt file with the password exists. I read the encrypted file, decode the password and assign the value to the variable of context. Now, I want to convert this process into a generic detecting which variables of context are password type.
I'm afraid there is no way to identify which contexts are password contexts within the job. You *could* make use of the the .item file (which is an XML file) and look for the a contextParameter element of type "id_Password". These can be found here ....
/talendfilerocessType/context/
That might be a way of doing this, BUT be careful not to modify the .item files.
Hi,
Finally I found the way to do it, unfortunately I had issues when I tried to do it in Talend 6.1. In Talend 7 I was able to develop a Java code to identify password types using context methods.
Thank you for all the replies
That's great. I was looking at the code for v621 and couldn't see how it was possible. Would you mind sharing your code?