WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

Encrypting the message elements in generator security constraints with an XPath expression

You can specify which message parts to encrypt by using an XPath expression when you configure the consumer security constraints for either the request generator or the response generator. The request generator is configured for the client, and the response generator is configured for the server.

Before you begin

Prior to completing this task, you must import your application into an assembly tool.

For information on how to import your application, see Importing enterprise applications. For information about importing an enterprise application EAR file, see the Application Server Toolkit documentation.

The following information explains the difference between using an XPath expression and using keywords to specify which part of the message to sign:
XPath expression
Specify any part of the message using an XPath expression. XPath is a language that is used to address parts of an XML document. You can find information on XPath syntax at the following Web site: http://www.w3.org/TR/1999/REC-xpath-19991116.
Keywords
Specify only elements within the message using predefined keywords.

About this task

Complete the following steps. You must configure either the client-side extensions in step 2 or the server-side extensions in step 3.

Procedure

  1. Start the assembly tool.
  2. Switch to the Java 2 Platform, Enterprise Edition (J2EE) perspective. Click Window > Open Perspective > J2EE.
  3. Optional: Locate the client-side extensions using the Project Explorer window. The Client Deployment Descriptor window is displayed. This Web service contains the extensions that you must configure. Complete the following steps to configure the client-side extensions:
    1. Expand the Web Services > Client section and double-click the name of the Web service.
    2. Click the WS Extension tab and expand the Request Generator Configuration section.
  4. Optional: Locate the server-side extensions using the Project Explorer window. The Web Services Editor window is displayed. This Web service contains the extensions that you must configure. Complete the following steps to configure the server-side extensions:
    1. Expand the Web Services > Services section and double-click the name of the Web service.
    2. Click the Extensions tab and expand the Response Generator Service Configuration Details section.
  5. Expand the Confidentiality section. Confidentiality refers to encryption and integrity refers to digital signing. Confidentiality reduces the risk of someone intercepting the message as it moves across a network. With confidentiality specifications, the message is encrypted before it is sent and decrypted when it is received at the intended target. For more information on encryption, see XML encryption .
  6. Click Add to specify which parts of the message to encrypt. The Confidentiality Dialog window is displayed. Complete the following steps to specify a configuration:
    1. Specify a name for the confidentiality element in the Confidentiality Name field. For example, you might specify conf_xpath.
    2. Specify an order in the Order field. The value, which must be a positive integer value, specifies the order in which the encryption is processed. An order value of 1 specifies that the encryption is done first.
  7. Click Add under the Message parts section of the Confidentiality Dialog window. Complete the following steps to specify the message parts:
    1. Select the message parts dialect from the Message parts section. The http://www.w3.org/TR/1999/REC-xpath-19991116 dialect specifies which message part is encrypted using an XPath expression.
    2. Specify the message part to be encrypted using an XPath expression in the Message parts keyword field. For example, to specify that the body is encrypted, you might add the following expression in the Message parts keyword field as one continuous line:
      /*[namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/' 
      and local-name()='Envelope']/*[namespace-uri()='http://schemas.xmlsoap.org/
      soap/envelope/' and local-name()='Body']
    Note: These configurations for the generator and the consumer must match.
  8. Click OK to save your configuration.

What to do next

After you specify which message parts to encrypt, you must specify which method is used to encrypt the message parts. For more information, see Configuring encryption information for the generator binding with an assembly tool .



Sub-topics
Adding timestamps for confidentiality to generator security constraints with an XPath expression
Adding the nonce for confidentiality to generator security constraints with an XPath expression
Related tasks
Adding timestamps for confidentiality to generator security constraints with keywords
Adding the nonce for confidentiality to generator security constraints with keywords
Configuring encryption information for the generator binding with an assembly tool
Configuring Web services security while assembling Web services applications
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/twbs_specencryptxpathgenbind.html

© Copyright IBM Corporation 2004, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)