Web services security troubleshooting tips
Review configurations in the Assembly Toolkit.
A client request sender configuration must match a server request receiver configuration. The public key of the receiver must be exported to the sender and this key must be configured properly in the encryption information.
For authentication, specify the method used by the client in the login mapping of the server. Also, correctly specify the actor URI at each point in the configuration with the same URI string.
Troubleshooting steps include...
- Verify that the client security extensions and server security extensions match on each downstream call for the following senders and receivers:
- Verify that when the Add Created Time Stamp option is enabled on the client-side that the server has the Add Received Time Stamp option configured. You must configure the security extensions in the Assembly Toolkit
- Verify that the client security bindings and the server security bindings are correctly configured. When the client authentication method is signature, make sure that the server has a login mapping. When the client uses the public key cn=Bob,o=IBM,c=US to encrypt the body, verify that this Subject is a personal certificate in the server key store so that it can decrypt the body with the private key. You can configure the security bindings using either the Assembly Toolkit or the WAS administrative console.
- Check $WAS_HOME/logs/server/SystemOut.log
- Enable trace for Web services security by using the following trace specification... com.ibm.xml.soapsec.*=all=enabled:com.ibm.ws.webservices.*=all=enabled... com.ibm.wsspi.wssecurity.*=all=enabled:com.ibm.ws.security.*=all=enabled... SASRas=all=enabled
Type the previous three lines as one continuous line.
- Specific symptons:
Symptom: WSEC5061E: The SOAP Body is not signed
Solution: This error usually occurs whenever the SOAP security handler does not load properly, and does not sign the SOAP body not to be signed. The SOAP security handler is typically the first validation that occurs on the server-side, so a multitude of problems can cause this message to display. The error might be caused by invalid actor URI configurations. You can configure the actor Universal Resource Identifier (URI) at the following locations within the Assembly Toolkit...
From the Web services client editor within the Assembly Toolkit for client configurations:
- Click Security Extensions > Client Service Configuration Details and indicate the actor information in the ActorURI field.
- Click Security Extensions > Request Sender Configuration section > Details and indicate the actor information in the Actor field.
From the Web Services Editor within the Assembly Toolkit for server configurations:
- Click Security Extensions > Server Service Configuration section. Verify that the actor URI has the same actor string as the client-side.
- Click Security Extensions > Response Sender Service Configuration Details > Details and indicate the actor information in the Actor field.
The actor information on both the client and the server must refer to the same string. When the actor fields on the client and the server match, the request or response is acted upon instead of being forwarded downstream. The actor fields might be different when you have Web services acting as a gateway to other Web services. However, in all other cases, verify that the actor information matches on the client and server. When the Web services implementation is acting as a gateway and it does not have the same actor configured as the request passing through the gateway, this Web services implementation does not process the message from the client. Instead, it sends the request downstream. The downstream process that contains the correct actor string processes the request. The same situation occurs for the response. Therefore, it is important that you verify that the appropriate client and server actor fields are synchronized.
Additionally, the error can appear when you do not specify that the body is signed in the client configuration. To sign the body part of the message using the Web service client editor in the Assembly Toolkit, click Security Extensions > Request Sender Configuration > Integrity and select the message parts to sign.
- Symptom: WSEC5075E: No security token found that satisfies any one of the authentication methods.
Solution: Verify that the client and server login configuration information matches in the security extensions. Also, verify that the client has a valid login binding and that the server has a valid login mapping in the security bindings. You can check this information by looking at the following locations in the Assembly Toolkit...
From the Web services client editor within the Assembly Toolkit for client configurations:
- Click Security Extensions > Request Sender Configuration > Login Configuration verify the authentication method.
- Click Port Binding > Security Request Sender Binding Configuration > Login Binding verify the authentication method and other parameters.
From the Web Services Editor within the Assembly Toolkit for server configurations...
- Click Security Extensions > Request Receiver Service Configuration Details > Login Configuration and verify the authentication method.
- Click Binding Configurations > Request Receiver Binding Configuration Details > Login Mapping and verify the authentication method and other parameters.
Also, make sure that the actor URI specified on the client and server matches. You can configure the actor URI at the following locations within the Assembly Toolkit:
From the Web services client editor within the Assembly Toolkit for client configurations...
- Click Security Extensions > Client Service Configuration Details and indicate the actor information in the ActorURI field.
- Click Security Extensions > Request Sender Configuration section > Details and indicate the actor information in the Actor field.
From the Web services editor within the Assembly Toolkit for server configurations:
- Click Security Extensions > Server Service Configuration section. Verify that the Actor URI field has the same actor string as the client side.
- Click Security Extensions > Response Sender Service Configuration Details > Details and indicate the actor information in the Actor field.
- Symptom: WSEC5094E: No UsernameToken of trusted user was found or the login failed for the user while the TrustMode is BasicAuth.
Solution: This situation occurs when you have IDAssertion configured in the login configuration as the authentication method. On the sending Web service, configure a trusted basic authentication entry in the login binding. Then, on the server side, verify that the trusted ID evaluator has a property set that contains the user name of this basic authentication entry. To configure the client for identity assertion, see...
- Configuring the client for identity assertion authentication: Specifying the method
- Configuring the client for identity assertion authentication: Collecting the authentication information
To configure the server for identity assertion, see...
- Configuring the server to handle identity assertion authentication
- Configuring the server to validate identity assertion authentication information
- Symptom: The following authorization error occurs with UNAUTHENTICATED as the security name: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)com/ibm/wssvt/tc/pli/ejb/Beneficiary findBeneficiaryBySsNo(java.lang.String):2 securityName: /UNAUTHENTICATED;accessID: null is not granted any of the required roles: AgentRole
Solution: This situation occurs because a login configuration is not being configured or Web services Security is not configured from a client to a server. When the request arrives at the server and authentication information is not received, the UNAUTHENTICATED user is set on the thread. Authorization returns this error if there are any roles assigned to the resource except for the special "Everyone" role, which supports access by anyone.
If the client successfully authenticates to an EJB file but the EJB file calls a downstream Enterprise JavaBean (EJB) file that is not configured with Web services security or transport security, such as HTTP user ID and password, an error can occur for this downstream request. Using the Assembly Toolkit, verify that the EAR file for both client and server has the correct security extensions and security bindings. For more information, see...
- Configuring the client security bindings using the Assembly Toolkit
- Configuring the security bindings on a server acting as a client using the administrative console
- Configuring the server security bindings using the Assembly Toolkit
- Configuring the server security bindings using the administrative console
See Also
Troubleshooting by component: What is not working?
Configuring the client for identity assertion: specifying the method
Configuring the client for identity assertion: Collecting the authentication method
Configuring the server to handle identity assertion authentication
Configuring the server to validate identity assertion authentication information
Configuring the client security bindings using the Assembly Toolkit
Configuring the security bindings on a server acting as a client using the administrative console
Configuring the server security bindings using the Assembly Toolkit
Configuring the server security bindings using the administrative console
Troubleshooting installation problems