WAS v8.5 > Develop applications > Develop web services - Security (WS-Security) > Configure Web Services Security during application assembly > Configure XML encryption for v5.x web services with an assembly toolConfigure the server for response encryption: encrypting the message parts
We can specify which parts of the response message to encrypt when configuring the server for response encryption.
There is an important distinction between v5.x and v6.0.x and later applications. The information in this article supports v5.x applications only used with WebSphere Application Server v6.0.x and later. The information does not apply to v6.0.x and later applications.
Prior to completing these steps, read either of the following topics to become familiar with the WS Extensions tab and the WS Bindings tab in the Web services editor within an assembly tool:
- Configure the server security bindings using an assembly tool
- Configure the server security bindings
These two tabs are used to configure the Web Services Security extensions and the Web Services Security bindings, respectively. To specify which parts of the response message to encrypt when configuring the server for response encryption:
- Launch an assembly tool. For more information, see the related information on Assembly Tools.
- Switch to the Java EE perspective. Click Window > Open Perspective > J2EE.
- Click EJB Projects > application_name > ejbModule > META_INF.
- Right-click the webservices.xml file, select Open with > Web services editor.
- Click the Extensions tab, located at the bottom of the Web Services Editor within the assembly tool.
- Expand Response sender service configuration details > Confidentiality. Confidentiality refers to encryption while integrity refers to digital signing. Confidentiality reduces the risk of someone understanding the message flowing across the Internet. With confidentiality specifications, the response is encrypted before it is sent and decrypted when it is received at the correct target.
- Select the parts of the response to encrypt by clicking Add and selecting Bodytoken or Usernametoken. The following information describes the message parts:
- Bodycontent
- User data portion of the message.
- Usernametoken
- Basic authentication information, if selected.
A user name token does not appear in the response so we do not need to select this option for the response. If selected, verify you also select it for the client response receiver. If we do not select this option, make sure that we do not select it for the client response receiver.
After we specify which message parts to encrypt, specify which method to use message encryption. See the task for choosing the encryption method when configuring the server for response encryption.
Related concepts:
XML encryption
Development and assembly tools
Related
Configure the server for response encryption: choosing the encryption method
Configure key locators using an assembly tool
Configure key locators
Configure the server security bindings using an assembly tool
Configure the server security bindings