Page 1 of 1

Using openssl with AES from Source Stage.

Posted: Tue Nov 24, 2009 2:27 pm
by Ultramundane
Trying to use openssl within datastage to encrypt a file from the source stage.

Source_Stage ====> Sequentile_File_Stage(Log_File)

In the source stage I specify this string:
openssl enc -e -aes-256-cbc -salt -pass pass:#AES_PASSWORD# -in #FilePath#/Seq/Aes256Bit_Infile.seq -out #FilePath#/Seq/Aes256Bit_Outfile.seq

However, the job aborts with these error messages:
External_Source_17: Error occurred during initializeFromArgs().

External_Source_17: Invalid data source specified: Invalid hostname: openssl enc -e -aes-256-cbc -salt -pass pass.

So, it looks like datastage is trying to parse the string for some reason and it is breaking at the ":".

Apart from putting the commands in a few shell scripts, is there another way to prevent datastage from erroring out at the ":"?

Thanks.

Re: Using openssl with AES from Source Stage.

Posted: Tue Nov 24, 2009 9:11 pm
by Ultramundane
This string works and is more secure:

echo #AES_PASSWORD# | openssl enc -e -aes-256-cbc -salt -pass stdin -in #FilePath#/Seq/Aes256Bit_Infile.seq -out #FilePath#/Seq/Aes256Bit_Outfile.seq 2>&1

Thanks.
Ultramundane wrote:Trying to use openssl within datastage to encrypt a file from the source stage.

Source_Stage ====> Sequentile_File_Stage(Log_File)

In the source stage I specify this string:
openssl enc -e -aes-256-cbc -salt -pass pass:#AES_PASSWORD# -in #FilePath#/Seq/Aes256Bit_Infile.seq -out #FilePath#/Seq/Aes256Bit_Outfile.seq

However, the job aborts with these error messages:
External_Source_17: Error occurred during initializeFromArgs().

External_Source_17: Invalid data source specified: Invalid hostname: openssl enc -e -aes-256-cbc -salt -pass pass.

So, it looks like datastage is trying to parse the string for some reason and it is breaking at the ":".

Apart from putting the commands in a few shell scripts, is there another way to prevent datastage from erroring out at the ":"?

Thanks.