Adding a stand-alone time stamp in consumer security constraints

 

Before you begin

Prior to completing this task, import your application into an assembly tool. For information on how to import your application, see Import enterprise applications.

 

Overview

The timestamp determines if the message is valid based upon the time that the message is sent by one machine and then received by another machine.

Complete the following steps to specify a stand-alone time stamp when you configure the consumer security constraints for either the response consumer or the request consumer. The response consumer is configured for the client and the request consumer is configured for the server. In the following steps, configure either the client-side extensions in step 2 or the server-side extensions in step 3.

 

Procedure

  1. Start the assembly tool and click Window > Open Perspective > J2EE.

  2. 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 we need to configure. Complete the following steps to locate 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 Response Consumer Configuration section.

  3. 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 we need to configure. Complete the following steps to locate 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 Request Consumer Service Configuration Details section.

  4. Expand the Add Timestamp section and select Use Add Timestamp option. When you select this option, a time stamp is added to the message that is sent.

  5. Specify an expiration time for the time stamp, which helps defend against replay attacks. Complete the following steps to configure the time stamp:

    1. Expand the Expires subsection within the Add Timestamp section.

    2. Select the Use Expires option.

    3. Specify an expiration time for the time stamp. The lexical representation for the duration is the [ISO 8601] extended format PnYnMnDTnHnMnS, where:

      P

      Precedes the date and time values.

      nY

      Represents the number of years in which the time stamp is in effect. Select a value from 0 to 99 years.

      nM

      Represents the number of months in which the time stamp is in effect. Select a value from 0 to 11 months.

      nD

      Represents the number of days in which the time stamp is in effect. Select a value from 0 to 30 days.

      T

      Separates the date and time values.

      nH

      Represents the number of hours in which the time stamp is in effect. Select a value from 0 to 23 hours.

      nM

      Represents the number of minutes in which the time stamp is in effect. Select a value from 0 to 59 minutes.

      nS

      Represents the number of seconds in which the time stamp is in effect. The number of seconds can include decimal digits to aribrary precision. You can select a value from 0 to 59 for the seconds and from 0 to 9 for tenths of a second.

      For example, 1 year, 2 months, 3 days, 10 hours, and 30 minutes is represented as P1Y2M3DT10H30M. Typically, you might configure a message time stamp for between 10 and 30 minutes. For example, 10 minutes is represented as P0Y0M0DT0H10M0S.