Adding a nonce for integrity in consumer security constraints with keywords

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, configure either the client-side bindings in step 2 or the server-side bindings in step 3.

  1. Click Window > Open Perspective > J2EE.

  2. 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:

    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 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:

    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 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.

  5. Click Add to specify a nonce for integrity. The Required Integrity Dialog window is displayed. Complete the following steps to specify a configuration:

    1. Specify a name for the integrity element in the Required Integrity Name field.

    2. 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.

  6. 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.

  7. 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.

  8. In the Message Parts section, select the message parts keyword.

  9. 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:

After you specify which message parts to digitally sign, specify which method is used to digitally sign the message. For more information, see Configuring signing information for the consumer binding.

 

Related concepts

XML digital signature

 

Related tasks

Adding a stand-alone time stamp in consumer security constraints

Adding time stamps for integrity in consumer security constraints with keywords

Adding time stamps for integrity in consumer security constraints with an XPath expression

Adding a nonce for integrity in consumer security constraints with an XPath expression

Configuring signing information for the consumer binding