Configure the server for response signing: Digitally signing message parts

Prior to completing these steps, read either of the following topics to become familiar with the Security Extensions tab and the Binding Configurations tab in the Web Services Editor within the Assembly Toolkit:

These two tabs are used to configure the Web services security extensions and the Web services security bindings, respectively. Complete the following steps to specify which message parts to digitally sign when configuring the server for response signing...

  1. Launch the WAS Toolkit and click Windows > Open Perspective > J2EE.

  2. Select the Web services-enabled Enterprise JavaBean (EJB) or Web module.

  3. In the Package Explorer window, locate the META-INF directory for an EJB module or the WEB-INF directory for a Web module.

  4. Right-click the webservices.xml file and click Open With > Web Services Editor.

  5. Click the Security Extensions tab, which is located at the bottom of the Web Services Editor within the Assembly Toolkit.

  6. Expand Response Sender Service Configuration Details > Integrity. Integrity refers to digital signature while confidentiality refers to encryption. Integrity decreases the risk of data modification while the data is transmitted across the Internet. For more information on digitally signing SOAP messages, see XML digital signature.

  7. Indicate the parts of the message to sign by clicking Add, and selecting Body, Timestamp, or Securitytoken.

    The following list contains descriptions of the message parts...

    Body The body is the user data portion of the message.

    Timestamp The time stamp determines if the message is valid based on the time that the message is sent and then received. If timestamp if selected, proceed to the next step and click Add Created Time Stamp, which indicates that the time stamp is added to the message.

    Securitytoken The security token is used for authentication. If this option is selected, the authentication information is added to the message.

  8. (Optional)   Expand the Add Created Time Stamp section. Select this option if you want a time stamp added to the message.You can specify an expiration time for the time stamp, which helps defend against replay attacks. The lexical representation for duration is the ISO 8601 extended format, PnYnMnDTnHnMnS, where...

    • nY represents the number of years.

    • nM represents the number of months.

    • nD represents the number of days.

    • T is the date and time separator.

    • nH represents the number of hours.

    • nM represents the number of minutes.

    • nS represents the number of seconds. The number of seconds can include decimal digits to arbitrary precision.

    For example, to indicate a duration of 1 year, 2 months, 3 days, 10 hours, and 30 minutes, the format is: P1Y2M3DT10H30M. Typically, you configure a message time stamp for about 10 to 30 minutes. 10 minutes is represented as: P0Y0M0DT0H10M0S. The P character precedes time and date values.

If you configure the client and server signing information correctly, but receive a Soap body not signed error when executing the client, you might need to configure the actor. You can configure the actor in the following locations on the client in the Web Services Client Editor within the Assembly Toolkit:

You must configure the same actor strings for the Web service on the server, which processes the request and sends the response back. Configure the actor in the following locations in the Web Services Editor within the WAS Toolkit...

The actor information on both the client and server must refer to the same exact string. When the actor fields on the client and server match, the request or response is acted upon instead of being forwarded downstream. The actor fields might be different when you have Web services acting as a gateway to other Web services. However, in all other cases, make sure that the actor information matches on the client and server. When Web services are acting as a gateway and they do not have the same actor configured as the request passing through the gateway, Web services do not process the message from a client. Instead, these Web services send the request downstream. The downstream process that contains the correct actor string processes the request. The same situation occurs for the response. Therefore, it is important that you verify that the appropriate client and server actor fields are synchronized.

You have specified which message parts to digitally sign when the server sends a response to the client.

After you specifying which message parts to digitally sign, specify which method is used to digitally sign the message. See Configuring the server for response signing: Choosing the digital signature method for more information.

 

See Also

XML digital signature
Response sender
Response receiver
Securing Web services using XML digital signature
Configuring the client security bindings using the Assembly Toolkit
Configuring the server security bindings using the Assembly Toolkit
Configuring the server security bindings using the administrative console
Configuring the server for response signing: choosing the digital signature method
Configuring the client for response digital signature verification: Verifying the message parts
Configuring the client for response digital signature verification: choosing the verification method
Configuring the server security bindings using the Assembly Toolkit
Configuring the server security bindings using the administrative console