ActiveTransfer Server 10.5 | webMethods ActiveTransfer Documentation | Administering ActiveTransfer Server | Managing Events | Executing File Operations | Encrypting and Decrypting Files
 
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.
For information on the use of wildcards in ActiveTransfer Server, see Use of Special Characters in Search.
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:
*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.
*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 and decrypt actions as follows:
Select this option...
To...
Derive file name from input file
Retain the original filename of the encrypted file.
ASCII Armor
Wrap PGP files in BASE64-encoded format to make them more secure when emailing them.
Delete original file
Delete the original file and retain only the decrypted files (for decrypt action) and the encrypted files (for encrypt action).
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.
7. If you selected the Execute error action check box, define an error action as described in Defining an Error Action.
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 contains both the original files and the corresponding encrypted files, but only the encrypted files are passed on to the subsequent action for processing. If you have selected Delete original file, the original files are deleted. 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 creates decrypted files without the .PGP extension. The source folder location contains both the original files and the corresponding decrypted files. If you have selected Delete original file, the original files are deleted. For example, 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 a folder named incoming. You have also 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 with theDelete original file option selected.
After the event is executed successfully, the decrypted file (without the PGP extension) is available in the working folder, and ActiveTransfer deletes the original encrypted file. If you want to make the files from the incoming folder available to an action that is configured to execute after the decrypt action, ensure that you do the following:
*Do not select Delete original file for the decrypt action.
*Configure a Find action to find the original files from the incoming folder in the incoming folder.