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
Nonce for integrity is used to specify that a nonce is embedded in
a particular element. The parent element of the nonce is signed with the message
parts in the required integrity. Complete the following steps to specify a
nonce for integrity using keywords 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, you must configure either
the client-side bindings in step 2 or the server-side bindings in step 3.
Steps for this task
- Start the assembly tool and click Window > Open Perspective
> J2EE.
- Optional: Locate the client-side bindings 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 bindings:
- Expand the Web Services > Client section and double-click the
name of the Web service.
- Click the WS Extension tab and expand the Response Consumer
Configuration section.
- Optional: Locate the server-side bindings using the
Project Explorer window. The Web Services Editor window is displayed.
This Web service contains the bindings that you need to configure. Complete
the following steps to locate the server-side bindings:
- Expand the Web Services > Services section and double-click
the name of the Web service.
- Click the Extensions tab and expand the Request Consumer
Service Configuration Details section.
- Expand the Required 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 nonce for integrity. The
Required Integrity Dialog window is displayed. Complete the following steps
to specify a configuration:
- Specify a name for the integrity element in the Required Integrity
Name field.
- Specify a usage type in the Usage type field. This
field specifies the requirement for the integrity element. The value of this
attribute is either Required or Optional.
- Required
- If you select Required and the required message parts or elements
are not signed, then the consumer rejects the message and issues a SOAP fault.
- Optional
- If you select Optional and the message parts or elements are signed,
then the digital signature is verified. However, the consumer does not reject
the message if the selected message parts or elements are not signed.
- Under Nonce, click Add and select the nonce dialect.
The http://www.ibm.com/websphere/webservices/wssecurity/dialect-was
dialect specifies the message part to which a nonce is added as a child element
and signed with the message parts in the required integrity. If you select
this dialect, you can select one of the following keywords under Nonce keyword:
- body
- Specifies the user data portion of the message. If this option is selected,
a nonce is embedded in the Simple Object Access Protocol (SOAP) body element.
Also, the parent of the nonce (SOAP body) is expected to be signed with the
message parts in the required integrity.
- timestamp
- Specifies that the nonce is embedded in the stand-alone timestamp element
within the message. Also, the parent of the nonce (timestamp) is expected
to be signed with the message parts in the required integrity. If timestamp
keyword is selected, make sure that there is a standalone timestamp element
in the message. If not, refer to the Adding a stand-alone time stamp in consumer security constraints article.
- securitytoken
- Specifies that the nonce element is expected to exist within the security
token element. Also, the parent of the nonce (securitytoken) is expected to
be signed with the message parts in the required integrity.
- dsigkey
- Specifies that the nonce is inserted into the key information element,
which is used for digital signature, and the key information element is signed.
- enckey
- Specifies that the nonce is inserted into the key information element,
which is used for encryption, and the key information element is signed.
- messageid
- Specifies that the nonce is inserted into the <wsa:MessageID> element
and that the <wsa:MessageID> element is signed.
- to
- Specifies that the nonce is inserted into the <wsa:To> element
within the message and that the <wsa:To> element is signed.
- action
- Specifies that the <wsa:Action> element is signed.
- relatesto
- Specifies that the nonce is inserted into the <wsa:RelatesTo> element
within the message and that the <wsa:RelatesTo> element is signed.
- If you have not previously specified message part in required integrity,
click Add in the Message Parts section to add the message parts. You
must define at least one message part in required integrity to specify a nonce
in required integrity.
- In the Message Parts section, select the message parts keyword.
- Click OK to save the configuration changes.
Note: These
configurations on the consumer side and the generator side must match.
In
addition to the nonce, you can specify that the timestamp element is signed.
For more information, see the following articles: