Encrypting and Decrypting Files
After you create a basic file encryption or decryption action as described in
Creating a Basic File Operation
Action, use this procedure to set the properties of the action.
To set the properties of a file encrypt or decrypt action
1. In the Source Filter box, enter the name of the file whose transfer will trigger this event. By default, ActiveTransfer Server considers all files.
Note: | You can use wildcard characters to filter the file names. For example, enter *.zip to trigger the event only when zip files are uploaded or downloaded. To trigger an event based on a name string in the zip files, use the name string in the Source Filter box, preceded and followed by wildcard characters. For example, enter *invoice*.zip to trigger the event based on the file URLs, when zip files containing the character string invoice in their file names are uploaded or downloaded. If you define a Source Filter for an action, the action acts only on the files that are filtered out. |
2. If you want to use regular expression in the source filter, specify a valid regular expression in Source Filter and select Use regular expression.
Examples for regular expressions:
(.(?!purchaseorder))* | Excludes files with the file URL containing purchaseorder |
.*/out/.* | Include files with the file URL containing the folder out |
^abc(.*)123$ | Includes anything that starts with abc and ends with 123. Matches abc123, abcxyz123, but not abcxyz123def |
NEW-((*.doc)|(*_backup_*)) | Includes anything starting with NEW- that either ends in .doc, or is followed by the string _backup_ |
3. In the Encryption Key File box, do one of the following:
![*](bullet.gif)
For decrypt operations, enter the name of the private key file (for example,
xyz.pgp).
Note: | ActiveTransfer Server can decrypt the file only if the file was encrypted with the corresponding public key. |
![*](bullet.gif)
For encrypt operations, enter the name of the public key file (for example,
xyz.pgp).
4. For decrypt operations, enter the password for the encryption file, in the Password box.
5. Select additional properties for the file encrypt/decrypt action as follows:
Select this option... | To... |
ASCII Armor | Wrap PGP files in BASE64-encoded format to make them more secure when emailing them. |
Execute error action | Execute an error action if the file operation fails. |
Execute asynchronously | Execute the file operation in a different thread so that it does not interfere with other actions. |
6. Click Save.
8. If you are finished defining actions for this event, activate the event as described in Activating an Event. Result:
An “Encrypt” action encrypts files passed on from the previous action. ActiveTransfer supports only PGP- based file encryption. The encrypted file is saved with the name Original-filename.PGP. After the successful execution of an Encrypt action, the source folder location will have both original and encrypted files but only encrypted files will be passed on to the subsequent action for processing. If you configure a Move action after an Encrypt action, the Move action moves the encrypted file and not the original file.
A “Decrypt” action decrypts files passed on from the previous action and replaces the files with the decrypted files (without the.PGP extension).
For example, If you have configured a post-processing event which is triggered by a file uploaded to a virtual folder that points to a physical location say incoming and, you have configured the following actions in the event:
1. Move action: To move a file that matches the filter, *invoice*.PGP from the incoming folder to the working folder.
2. Decrypt action: To decrypt the file
After the event is executed successfully, the decrypted file (without the PGP extension) is available in the working folder. If you want to make the files from the incoming folder available to an action that is configured subsequent to the decrypt action, configure a find action to find files in the incoming folder.