Getting Started: Using a policy set and default bindings to sign and encrypt a message
This procedure describes how to configure the message-level WS-Security policy set and bindings to sign and encrypt a SOAP message that uses a custom policy set and default bindings. This task is intended to help we get familiar with adding WS-Security constraints to a JAX-WS application.
Before you begin
This task assumes that the service provider and client that we are configuring are in the JaxWSServicesSamples application. For more information about how to obtain and install the application, see Accessing Samples.
Use the following trace specification on the server. We can debug any future configuration problems that might occur using these specifications.
*=info:com.ibm.wsspi.wssecurity.*=all:com.ibm.ws.webservices.wssecurity.*=all: com.ibm.ws.wssecurity.*=all: com.ibm.xml.soapsec.*=all: com.ibm.ws.webservices.trace.*=all: com.ibm.ws.websvcs.trace.*=all:com.ibm.ws.wssecurity.platform.audit.*=off:
About this task
This procedure explains the actions that we need to complete to configure a WS-Security policy set to use the asymmetric XML-Digital Signature and Encryption WS-Security constraints. Since you are not attaching any binding in this procedure, the default bindings are used for both the client and the provider.
To apply the policy set and bindings to this application, in the administrative console click Applications > Application types > WebSphere enterprise applications > JaxWSServicesSamples. When we are using your own applications, you can use the following paths as an alternative way to access the provider and client for attachment of the policy set and bindings:
- Services > Service providers > AppName
- Services > Service clients > AppName
Procedure
Results
The JaxWSServicesSamples web services application is configured to use asymmetrical XML Digital Signature and Encryption to protect your SOAP requests and responses that use client and provider default general bindings.What to do next
After you complete the task, you can move on to more involved configurations such as:
- Configure a policy set and bindings for Asymmetric XML Digital Signature and/or XML Encryption with client and provider general bindings
- Configure a policy set and bindings for Asymmetric XML Digital Signature and/or XML Encryption with client and provider application specific bindings
- Configure a policy set and bindings for XML Digital Signature with client and provider application specific bindings