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.
Why and when to perform this task
This task is used to specify that a time stamp is embedded in a particular
element and that the element is encrypted. Complete the following steps to
specify the time stamp for confidentiality 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. In the following steps,
you must configure either the client-side extensions in step 2 or the server-side
extensions in step 3.
Steps for this task
- Start the assembly tool and 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 Confidentiality section. Confidentiality
refers to encryption while 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.
- Click Add to specify a time stamp for confidentiality.
The Confidentiality Dialog window is displayed. Complete the following
steps to specify a confidentiality configuration:
- Specify a name for the confidentiality element in the Confidentiality
Name field. For example, you might specify conf_tmstmp.
- 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.
- In the Timestamp section, click Add and select the Timestamp
dialect. The http://www.ibm.com/websphere/webservices/wssecurity/dialect-was
dialect specifies the message part that is encrypted using the keywords. If
you select this dialect, you can select one of the following keywords under
the Timestamp keyword heading:
- bodycontent
- Specifies the user data portion of the message. If this keyword is selected,
the time stamp is embedded in the Simple Object Access Protocol (SOAP) message
body and the body is encrypted.
- usernametoken
- Specifies a username token that contains the basic authentication information
such as a user name and a password. Usually, the username token is encrypted
so that the user information is secure. If you select this keyword, the timestamp
element is embedded in the username token element and it is encrypted.
- digestvalue
- Specifies a unique digest value. When a part of the Simple Object Access
Protocol (SOAP) message is signed, a unique digest value is created and is
used by the receiving party to check the integrity of the message. You can
encrypt the digestvalue element to secure the digest value. If you select
this keyword, the time stamp is embedded in the digestvalue element and the
element is encrypted.
- 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 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.
- 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
Message Parts section in order to specify a times tamp for confidentiality.
When you select the message part, you are encrypting the message part in addition
to the parent element of the time stamp.
- Click OK to save the configuration changes.
Note: These
configurations for the consumer and generator must match.
In addition
to the time stamp, you can specify that the nonce is signed. For more information,
see the following articles:
Example
For example, the following example is a part of a SOAP message
where a time stamp is inserted into the bodycontent element and is encrypted
using bodycontent keyword and the http://www.ibm.com/websphere/webservices/wssecurity/dialect-was
dialect.
Important: You cannot see the time stamp in the message
because it is encrypted.
<soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<EncryptedData Id="wssecurity_encryption_id_4349704672508984224" Type=
"http://www.w3.org/2001/04/xmlenc#Content" xmlns="http://www.w3.org/2001/
04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
<CipherData>
<CipherValue>IxSuTmF1vAygF/SBLCd8bgu8opPiwHmroIBLzZbENGr9JpxhSFt/0fV0sF
un0uxg/h/Y+1erE+NaysREuL+E9AQm0lxALNEdBX9zpeVf+ZffUCSzZfXXe9iosQlPe9jG
7yTp+rhZGdp/KOp26c3DZXCNDr0Wgz31wn3KNm6bGO6RmBzahEOSW8d0wR999DeqSpOY12
d8iWJa3HZ8gnGnineCiZ3wrHy9rOC58iijcsNv1fP3lExuA5WkHra6rndhbi8P7jDMhkzf
4Odj2yy1M3XURWalOLNYhNJ9YaWACsaYCY2ukcKtzw==</CipherValue>
</CipherData>
</EncryptedData>
</soapenv:Body>