User management in Talend

One Star

User management in Talend

Hi the community,
I want to deploy Talend as an ETL , i have already did the jobs for the processing. but my problem is that i want to manage users in Talend.
I want to secure it by forcing a user to connect to Talend(login+password) first before launching the JOB.
Is it possible? or is there another way to secure my jobs ?
thank you in advance
One Star

Re: User management in Talend

Hi
Sorry. For the user management feature, it's only supported by Talend Enterprise version.
Regards,
Pedro
One Star

Re: User management in Talend

Thank you Pedro, so there is no way to secure my jobs ?
Even using specific components?
One Star

Re: User management in Talend

Hi
You might use tMsgBox as workaround.
tMsgBox
|
Run-if
|
Subjobs
tMsgBox: You'd better select 'Question' for 'Buttons' option.
Regards,
Pedro
One Star

Re: User management in Talend

Hi,
Nice solution here Pedro.
I would suggest hasuhing the password prior to storing it in hte context and use the same hash function (MD5?) before the comparison inside the "If" statement, but this would mean you'd have to import some additional libraries. The password will be stored in plain text inside the job (and on the file system) otherwise.
Regards,
Arno
One Star

Re: User management in Talend

thank you pedro,
As said avdbrink, the password here will be in clear text to the user that will clic on the components properties.
Now how can i hash the password to make it crypted ??
One Star

Re: User management in Talend

Pedro,
So can u confirm my understanding of your solution?
- Textbox component
- run-if link
- tjava component
- link ???
- jobs
thank you
One Star

Re: User management in Talend

Hi
I'm using TOS 5.1.0 now. You will see an option called 'Mask Answer' on tMsgBox, which is able to change the clear text into ***.
- tjava component
- link ???
- jobs
Use 'OnSubjobOK' here.
Regards,
Pedro
One Star

Re: User management in Talend

Hi,
Sure, using the "Mask Answer" option in the MsgBox will hide the password rfmo the user when entering, but when the user just opens the job and clicks the If condition row he/she will see the password.
I've used an MD5 library to hash values before. Found it on Talend exchange: http://www.talendforge.org/exchange/tos/extension_view.php?eid=137
You can than use a function like this:
MD5.getHashString("MyPassword");

First use this code in a dummy tJava to print it to the console (using System.out.print) then copy paste the hash value in the If condition.
Hope this helps.
Regards,
Arno
One Star

Re: User management in Talend

Hi Arno
Great! Thanks for your perfect solution.
Regards,
Pedro
One Star

Re: User management in Talend

Hi avdbrink,
I followed your process and calculated the hashvalue 1st using a dummy java: it gave me "dc647eb65e6711e155375218212b3964" for "Password".
Then what is the process after? because when i tried to paste this hash value in the equals() funtion is gave me error
thank you
One Star

Re: User management in Talend

Hi,
You could use somthing like this for your If statement:
((String)globalMap.get("tMsgBox_1_RESULT")).equals("dc647eb65e6711e155375218212b3964")

What error did you get?
Regards,
Arno
One Star

Re: User management in Talend

Hi arno,
I did as u said and when i execute the "IF" statement still false despite i am typing the right password as hashed by the MD5 function.
regards
One Star

Re: User management in Talend

Hi,
I'm very sorry, I wasn't paying attention.
The correct code should be:
MD5.getHashString((String)globalMap.get("tMsgBox_1_RESULT")).equals("dc647eb65e6711e155375218212b3964")

In the previous code the entered password will not be crypted and thus won't match the crypted version.
Regards,
Arno
One Star

Re: User management in Talend

Super, Arno its working !
One more thing, is it possible to have more than 1 condition is IF link(case when there is more than 1 password) ?
The purpose is to have more than 1 user executing the job, so is it possible to have many passwords ? If yes how can i implement it?
Regards
One Star

Re: User management in Talend

Hi,
You could use a structure like this:
MD5.getHashString((String)globalMap.get("tMsgBox_1_RESULT")).equals("hash_of_1st_password") || MD5.getHashString((String)globalMap.get("tMsgBox_1_RESULT")).equals("hash_of_2nd_password") || MD5.getHashString((String)globalMap.get("tMsgBox_1_RESULT")).equals("hash_of_3rd_password")

and so on...
Another option would be to use some more extended functionality where you could use some database lookup to perform the check if the user entered a correct password, but that would be a completely different approach.
Regards,
Arno