You can specify that a time stamp be embedded in a particular element
and that the element be signed. You can specify the time stamp for integrity
by using keywords when you configure the generator 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.
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
- Start the assembly tool.
- Switch to the Java 2 Platform, Enterprise Edition (J2EE) perspective.
Click Window > Open Perspective > J2EE.
- 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 need to configure.
Complete the following steps to locate the client-side extensions.
- Expand the Web Services > Client section and double-click the
name of the Web service.
- Click the WS Extension tab and expand the Request Generator
Configuration section.
- 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 need to configure. Complete
the following steps to locate the server-side extensions.
- Expand the Web Services > Services section and double-click
the name of the Web service.
- Click the Extensions tab and expand the Response Generator
Service Configuration Details section.
- Expand the Integrity section. Integrity refers to digital
signature while confidentiality refers to encryption. Integrity decreases
the risk of data modification when you transmit data across a network. For
more information on digitally signing Simple Object Access Protocol (SOAP)
messages, see XML digital signature
.
- Click Add to specify a time stamp for integrity. The
Integrity Dialog window is displayed. Complete the following steps to specify
a configuration:
- Specify a name for the integrity element in the Integrity Name
field. For example, you might specify int_tmstmp.
- Specify an order in the Order field. The value, which
must be a positive integer value, specifies the order in which the digital
signature is processed. An order value of 1 specifies that the signing is
done first.
- Click Add in the Timestamp section of the Integrity Dialog
window. Complete the following steps to specify a time stamp configuration:
- Select the Timestamp dialect from the Timestamp section.
The XML Path Language (XPath) dialect specifies the message
part to which the time stamp is added and signed using the XPath expression.
- Select the message part in the Timestamp keyword field to which
the time stamp is added and signed using an XPath expression. For
example, to specify that the time stamp is added to the body and is signed,
you might specify the following expression for the Timestamp keyword:
/*[namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/'
and local-name()='Envelope']/*[namespace-uri()='http://schemas.
xmlsoap.org/soap/envelope/' and local-name()='Body']
- Specify an expiration time for the time stamp in the Timestamp
expires field. The time stamp helps defend against replay attacks.
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 arbitrary 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, to indicate 1 year, 2 months, 3 days, 10 hours,
and 30 minutes, the format is P1Y2M3DT10H30M. Typically, you might
configure a message time stamp for between 10 and 30 minutes. For example,
10 minutes is represented as P0Y0M0DT0H10M0S or PT10M.
- In the Message Parts section, click Add and select http://www.ibm.com/websphere/webservices/wssecurity/dialect-was
in the Message parts dialect field.
- In the Message Parts section, select the message parts keyword.
Important: You must define at least one message part in
the Message Parts section in order to specify a time stamp for integrity.
This message part is signed as well as the parent element of the time stamp.
- Click OK to save the configuration changes.
Note: These
configurations for the generator and the consumer must match.
In
addition to the time stamp, you can specify that the nonce is signed. For
more information, see the following articles: