This topic explains how to configure and apply the XML Encryption tool in SOAtest and Virtualize. This tool encrypts XML documents for security purposes.

Sections include:

Understanding XML Encryption

In order to securely send data across the Internet during a Web service transaction, security standards must be put in place to ensure that outside parties cannot view or read any of the private transaction data. The XML Encryption standard recommended by the W3C defines a process that allows any data in XML documents to be encrypted and decrypted. It specifies the data to be encrypted, as well giving information about the cipher or key used to encrypt the data.

The XML Encryption tool supports the W3C XML Encryption standard and the WS-Security standard from OASIS. The XML Encryption Tool allows you to encrypt and decrypt data to be sent as Web service transactions. The XML Encryption tool also allows you to encrypt individual elements of the XML document, or the entire document itself. This feature is especially useful for Web service transactions that are performed between multiple partners or endpoints. For example, a credit card transaction can be encrypted where the user’s name and address are visible, but the user’s credit card number is encrypted.

Configuring the XML Encryption Tool

The XML Encryption Tool allows you to either Encrypt or Decrypt data. Depending on the Encryption Mode you select, the options for Encrypt mode and Decrypt will vary.

Before using the XML Encryption Tool, you must download the Unlimited Strength Java Cryptograpy Extension. For more information, see Unlimited Strength Java Cryptography Extension.

Tool Settings

The following options display in the left pane of the Tool Settings tab:

General

When selecting General from the left pane of the Tools Settings tab, the following options are available:

WS-Security

When selecting WS-Security from the left pane of the Tools Settings tab, the following options are available—if  Encrypt and WS-Security are selected in the General tab:

Target Elements

When selecting Target Elements from the left pane of the Tools Settings tab, the following options are available—if Encrypt is selected in the General tab:

Emulation Options

When selecting Emulation Options from the left pane of the Tools Settings tab, the following options are available:

The following options are available only if WS-Security Mode is selected in the General tab.

Encryption Options

With Encryption Options selected in the left pane of the Tools Settings tab, the following options are available:

Decryption Options

With Decryption Options selected in the left pane of the Tools Settings tab, the following options are available:

The following options are available only if the Decrypt radio button is selected in the General tab.

Input Type Tab

The Input Type tab is only available if the XML Encryption tool is added as a standalone tool and not chained to another tool. The following options are available from the Input Type tab:

Usage Notes

You can use the XML Encryption tool as a stand-alone tool at the test suite level by right-clicking the main test suite node and selecting Add New> Test from the shortcut menu and then selecting XML Encryption from the dialog that opens. 

You can also chain the XML Encryption tool to a tool by right-clicking the desired tool node and selecting Add Output from the shortcut menu and then selecting XML Encryption from the dialog that opens. The tool will use the transformed XML.

You can chain the XML Encryption tool and the XML Signer tool to a messaging tool to perform both encryption and XML signature on a message. For more information on the XML Signer tool, see XML Signer.

 You can also chain any tool, such as an Edit or Browse tool, to the XML Encryption Tool by right-clicking the desired XML Encryption Tool node and selecting Add Output from the shortcut menu and then selecting XML Encryption from the dialog that open

Unlimited Strength Java Cryptography Extension

In order to perform security operations using the XML Signature Verifier, XML Signer, or XML Encryption tools, or if using Key Stores, you will need to download and install the Unlimited Strength Java Cryptography Extension. For details, see JCE Prerequisite.

Related Tutorials

The following tutorial lesson demonstrates how to use this tool: