Following-up on my own thread again...
If I edit my server's XWS policy configuration file to look like:
Server Configuration:
Code:
<xwss:SecurityConfiguration>
<!-- All response messages to be signed -->
<xwss:Sign includeTimestamp="false">
<xwss:X509Token certificateAlias="oscert_rsa" />
</xwss:Sign>
<!-- All response messages to be encrypted using client's public key -->
<xwss:Encrypt />
<!-- Require that all inbound messages from clients need to be encrypted -->
<xwss:RequireEncryption />
<!-- All inbound messages from clients are required to have a signature associated with them -->
<xwss:RequireSignature requireTimestamp="false" />
</xwss:SecurityConfiguration>
Client configuration:
Code:
<xwss:SecurityConfiguration>
<!-- All requests need to be signed -->
<xwss:Sign includeTimestamp="false">
<xwss:X509Token certificateAlias="osclientcert" />
</xwss:Sign>
<!-- All requests to be encrypted using server's public key -->
<xwss:Encrypt>
<xwss:X509Token certificateAlias="oscert_rsa" />
</xwss:Encrypt>
<!-- All response messages from the server are required to be encrypted -->
<xwss:RequireEncryption />
<!-- All response messages from the server are required to have a signature associated with them -->
<xwss:RequireSignature requireTimestamp="false" />
</xwss:SecurityConfiguration>
I get the following error on the server when the client submits a request:
Code:
2008-08-01 22:34:37,695 [org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor] (AbstractWsSecurityInterceptor.java:241) ERROR - Could not secure response: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Unable to locate certificate for the alias ''; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Unable to locate certificate for the alias ''
org.springframework.ws.soap.security.xwss.XwsSecuritySecurementException: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Unable to locate certificate for the alias ''; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Unable to locate certificate for the alias ''
at org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor.secureMessage(XwsSecurityInterceptor.java:139)
at org.springframework.ws.soap.security.AbstractWsSecurityInterceptor.handleResponse(AbstractWsSecurityInterceptor.java:136)
at org.springframework.ws.server.MessageDispatcher.triggerHandleResponse(MessageDispatcher.java:347)
at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:224)
at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:168)
at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Unable to locate certificate for the alias ''
at com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.secureOutboundMessage(XWSSProcessor2_0Impl.java:96)
at org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor.secureMessage(XwsSecurityInterceptor.java:135)
... 25 more
Caused by: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Unable to locate certificate for the alias ''
at com.sun.xml.wss.impl.filter.EncryptionFilter.process(EncryptionFilter.java:164)
at com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy(HarnessUtil.java:81)
at com.sun.xml.wss.impl.HarnessUtil.processDeep(HarnessUtil.java:251)
at com.sun.xml.wss.impl.SecurityAnnotator.processMessagePolicy(SecurityAnnotator.java:172)
at com.sun.xml.wss.impl.SecurityAnnotator.secureMessage(SecurityAnnotator.java:133)
at com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.secureOutboundMessage(XWSSProcessor2_0Impl.java:94)
... 26 more
Caused by: com.sun.xml.wss.XWSSecurityException: Unable to locate certificate for the alias ''
at com.sun.xml.wss.impl.misc.DefaultSecurityEnvironmentImpl.getCertificate(DefaultSecurityEnvironmentImpl.java:360)
at com.sun.xml.wss.impl.filter.EncryptionFilter.process(EncryptionFilter.java:156)
... 31 more
I'm sort of stuck here...any help would be greatly appreciated.
-Paul