I am trying to push the data in a file to a SFTP location but I want that file to be encrypted.
Is there any activity / componennt in AC v7 which has a provision to specify encryption command before it pushes the file to SFTP server ?
Also, is there a utility in AC which can be invoked from workflow to unzip the files before ingesting ?
Your help is all appreciated.
Sid
Solved! Go to Solution.
Hi Sid,
If your instance is hosted by Adobe, ask support to install GPG utility on the server.
Get public private key pair generated for outbound transfer.
While doing export, inside the JS code activity, you can encrypt the file on Campaign server and also provide the public key to external sFTP server team for decrypting the file.
Regards,
Vipul
Hi Sid,
If your instance is hosted by Adobe, ask support to install GPG utility on the server.
Get public private key pair generated for outbound transfer.
While doing export, inside the JS code activity, you can encrypt the file on Campaign server and also provide the public key to external sFTP server team for decrypting the file.
Regards,
Vipul
Hi Sid,
After setting gpg on the server and importing the public key as Vipul said, a function like this below can help within the workflow:
function encryptFile(file) {
var systemCommand = "gpg --encrypt --recipient recipientToEncryptTo " + file;
var result = execCommand(systemCommand, true);
}
Thank You Everyone. It worked, appreciate all your help here.
Views
Replies
Total Likes
Morning
What's the inverse of that?
Say you have a file that is encrypted and you need A.Campaign to decrypt it.
How do you specify the key to you?
Also, what if your instance has multiple keys? Say BrandA has keyA and BrandB uses keyB.
How do you handle that situation?
Views
Replies
Total Likes
Hi,
Sorry for the delay. The inverse is:
function decryptImportFile(file) {
var fullName = file.fullName.toString();
var outputFile = 'decryptedFile.xxx';
var systemCommand = "gpg --output " + outputFile + " --decrypt " + fullName;
var result = execCommand(cmd, true);
}
To handle multiple keys you will need to import all of them into your gpg and the use one or another to encrypt by using the switch -r or --recipient when calling gpg.
I hope it makes sense.
Thanks
Guillermo
Hi Sid,
Regarding the compression/uncompression method, it is provided OOTB by Adobe Campaign unfortunately.
So you must call an operation system script activity (command line) in your import workflow in order to do the unzip job.
If Linux server, you can use gunzip command.
If Windows server, I do recommend you to install 7Zip tool (free and very powerful, and all compression algorithms supported).
Please take care that recent AC build prohibits use of system script activity in workflow, so you would have to allow the commands to allow (unzip, gpg) on the server themselves (or ask to Adobe for configuration level if they can accept it, if not hosted On Premise).
Regards.
Jean-Serge
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies