Encrypt Data Files and Push to SFTP (How to)

Avatar

Avatar
Ignite 1
Level 2
sidheshwarc5116
Level 2

Likes

11 likes

Total Posts

38 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Ignite 1
Level 2
sidheshwarc5116
Level 2

Likes

11 likes

Total Posts

38 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 5
Give Back 3
Give Back
View profile
sidheshwarc5116
Level 2

06-07-2017

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

06-07-2017

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

Answers (5)

Answers (5)

Avatar

Avatar
Give Back 5
Level 3
guillermoL
Level 3

Likes

17 likes

Total Posts

61 posts

Correct reply

0 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 10
View profile

Avatar
Give Back 5
Level 3
guillermoL
Level 3

Likes

17 likes

Total Posts

61 posts

Correct reply

0 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 10
View profile
guillermoL
Level 3

07-07-2017

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);
}

Avatar

Avatar
Give Back 5
Level 3
guillermoL
Level 3

Likes

17 likes

Total Posts

61 posts

Correct reply

0 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 10
View profile

Avatar
Give Back 5
Level 3
guillermoL
Level 3

Likes

17 likes

Total Posts

61 posts

Correct reply

0 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 1
Validate 10
View profile
guillermoL
Level 3

04-12-2017

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

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

05-12-2017

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

Avatar

Avatar
Validate 1
Level 2
derrickr8850025
Level 2

Likes

8 likes

Total Posts

18 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
derrickr8850025
Level 2

Likes

8 likes

Total Posts

18 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
derrickr8850025
Level 2

23-10-2017

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?

Avatar

Avatar
Ignite 1
Level 2
sidheshwarc5116
Level 2

Likes

11 likes

Total Posts

38 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Ignite 1
Level 2
sidheshwarc5116
Level 2

Likes

11 likes

Total Posts

38 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 5
Give Back 3
Give Back
View profile
sidheshwarc5116
Level 2

22-07-2017

Thank You Everyone. It worked, appreciate all your help here.