Thursday, June 13, 2013

com.sun.xml.wss.impl.WssSoapFaultException: Certificate validation failed

Lets talk about how to resolve certificate validation failed error while receiving SOAP based web service requests from clients. If you receive an error on the server side as given below, you are not alone. Lets see below how to resolve the error.

Exception stack trace:-

SEVERE: WSS1353: Error occurred while resolving key information
com.sun.xml.wss.impl.WssSoapFaultException: Certificate validation failed
at com.sun.xml.wss.impl.SecurableSoapMessage.newSOAPFaultException(
at com.sun.xml.wss.impl.dsig.KeySelectorImpl.resolveToken(
at com.sun.xml.wss.impl.dsig.KeySelectorImpl.resolve(
at com.sun.xml.wss.impl.dsig.SignatureProcessor.verify(
at com.sun.xml.wss.impl.filter.SignatureFilter.process(
at com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy(
at com.sun.xml.wss.impl.HarnessUtil.processDeep(
at com.sun.xml.wss.impl.SecurityRecipient.processMessagePolicy(
at com.sun.xml.wss.impl.SecurityRecipient.processMessagePolicy(
at com.sun.xml.wss.impl.SecurityRecipient.validateMessage(
at com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.verifyInboundMessage(

If you are exposing a secured web service using Spring WS and encountered the following error while handling client request, it means that your truststore does not have the certificate sent by the client. If you think the client is valid, add the certificate to your truststore.

How to import certificate into truststore?

keytool -import -trustcacerts -alias client1 -file clientcertificate.cer -keystore mytruststore.jks -storepass mypassword

No comments:

Post a Comment