Page 1 of 2

Confirm encrypted password is set to $PROJDEF?

Posted: Thu Jun 19, 2014 5:19 am
by syedmuhammedmehdi
Could you please advise is there any way to check and verify whether encrypted password in parallel job has value $PROJDEF not anything else directly through designer or is there any shortcut to verify this.

Posted: Thu Jun 19, 2014 6:16 am
by ArndW
The algorithm for encrypting within DataStage is not a complex one, so if you write a job and use $PROJDEF as a the value of an encrypted parameter that string can be used as comparison as it will always be the same encrypted value for the same input string.

Posted: Thu Jun 19, 2014 6:48 am
by syedmuhammedmehdi
ArndW wrote:The algorithm for encrypting within DataStage is not a complex one, so if you write a job and use $PROJDEF as a the value of an encrypted parameter that string can be used as comparison as it will alw ...
Can't view your premium content :(

Posted: Thu Jun 19, 2014 6:56 am
by ArndW
Well, we know how to fix the premium content problem.

But the answer is visible in the viewable portion. The same string will always get encoded the same way, even in different jobs. So if you know what the encrypted string for $PROJDEF looks like in one job, you can compare it with an encrypted string in another job and if the encryptions are identical then so are the source strings.

Posted: Thu Jun 19, 2014 11:20 am
by syedmuhammedmehdi
For me encrypted password is shown as ***** irrespective of what the password is.

Thanks, But this is not my query, usually what we do is when we add environment variables in our parallel job we forgot to change value of password to $PROJDEF and when we export these jobs to other enviroments that is from dev to production and when production password is different to dev password and when our job fails in production due to incorrect password there we identify that the password is not set to $PROJDEF. So, I'm searching out a simple way to identify whether password is set to $PROJDEF or not.

Posted: Thu Jun 19, 2014 11:31 am
by qt_ky
Export DSX files having the job in question and a job you know contains $PROJDEF. The comparisons suggested above can be done against the encoded text you find within the DSX files when using a text editor.

Posted: Thu Jun 19, 2014 1:25 pm
by chulett
... or look in the job's log. From what I recall you'll see the 'encrypted' value there rather than the stars you'll see in the prompt.

Posted: Thu Jun 19, 2014 10:47 pm
by syedmuhammedmehdi
yes, I too remember in v8.1 i used to see encrypted password but in v9.1 I'm seeing only stars. Is there any other simple way to find out password is $PROJDEF.

Posted: Fri Jun 20, 2014 5:10 am
by qt_ky
The simple way, export & view, has been suggested above. Have you tried it??

Posted: Fri Jun 20, 2014 5:58 am
by chulett
Ah... so they've "fixed" that, good to know. Yes, as Eric notes you should be looking in the export, can't get by with stars there.

Posted: Fri Jun 20, 2014 7:02 am
by Mike
You can see the encrypted string value in the DSParams file.

Or by issuing this command:
$DSHOME/bin/dsadmin -listenv MYPROJECT

Mike

Posted: Fri Jun 20, 2014 8:32 am
by FranklinE
There's an even simpler way: use the export to file function in Administrator's environment variables screen. You can temporarily create an encrypted variable, give it the "value" of $PROJDEF, and examine the exported file. Your encrypted string will be there.

Posted: Fri Jun 20, 2014 11:54 am
by syedmuhammedmehdi
qt_ky wrote:The simple way, export & view, has been suggested above. Have you tried it??
thanks, I'll try this on Monday morning.

Posted: Sat Jun 21, 2014 6:46 am
by qt_ky
chulett wrote:Ah... so they've "fixed" that, good to know.
What I found in 8.7:
- An env var with type=Encrypted still shows the "encoded" text in the job log
- A traditional parameter (non-env var) with type=Encrypted shows only stars in the job log, so that much is fixed. You can still export the parameter set and view the encoded text.

I did open a PMR about the ease of decoding, which I'm sure was after 9.1 GA. I have yet to re-visit this in 9.1 or 9.1.2 to see the extent of improvements, if any.

Posted: Mon Jun 23, 2014 6:20 am
by syedmuhammedmehdi
By exporting dsx of job having $PROJDEF for sure and my concern job dsx and by comparing their encoded password values I'm able to find out whether encrypted job parameter is having value $PROJDEF or not.

Thanks all for your help.