users@saaj.java.net

Re: [SAAJ-USR] SAAJ AND CLIENT CERTIFICATE AUTHENTICATION

From: Evaristo José Camarero <evaristojosec_at_yahoo.es>
Date: Thu, 20 Jul 2006 15:58:12 +0200 (CEST)

Hi again:

I have been investigating the HttpSOAPConnection code
of the SAAJ RI 1.3, and it seems that it employs the
java.net.URL to manage the Http client connections.

If its like that it should be possible to employ
something like this to manage client certs:

                Security.addProvider( new
com.sun.net.ssl.internal.ssl.Provider( ) );
                System.setProperty(
"java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol" );
               
System.setProperty("javax.net.ssl.keyStore",
"C:\\ericsson-b.jks");
               
System.setProperty("javax.net.ssl.keyStorePassword",
"changeit");
                System.setProperty(
"java.protocol.handler.pkgs",
               
"com.sun.net.ssl.internal.www.protocol" );
                String caCert =
SPConfigHelper.getCaKeyStore( );
                System.setProperty(
"java.protocol.handler.pkgs",
                                   
"com.sun.net.ssl.internal.www.protocol" );
                System.setProperty(
"javax.net.ssl.trustStore",
                                   
this.context.getRealPath( caCert ) );
                System.setProperty(
"javax.net.ssl.trustStorePassword", "changeit" );


Is that correct. Because I'm trying that, but it is
not working.

I get the following stack Trace:

INFO: SSL Error getting client Certs
javax.net.ssl.SSLHandshakeException: null cert chain
        at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.clientCertificate(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown
Source)
        at java.io.InputStream.read(Unknown Source)
        at
org.apache.tomcat.util.net.jsse.JSSE14Support.synchronousHandshake(JSSE14Support.java:87)
        at
org.apache.tomcat.util.net.jsse.JSSE14Support.handShake(JSSE14Support.java:66)
        at
org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:120)
        at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1106)
        at org.apache.coyote.Request.action(Request.java:363)
        at
org.apache.catalina.authenticator.SSLAuthenticator.authenticate(SSLAuthenticator.java:134)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
20-jul-2006 15:53:53
org.apache.coyote.http11.Http11Processor action
ADVERTENCIA: Exception getting SSL Cert
javax.net.ssl.SSLHandshakeException: null cert chain
        at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.clientCertificate(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown
Source)
        at java.io.InputStream.read(Unknown Source)
        at
org.apache.tomcat.util.net.jsse.JSSE14Support.synchronousHandshake(JSSE14Support.java:87)
        at
org.apache.tomcat.util.net.jsse.JSSE14Support.handShake(JSSE14Support.java:66)
        at
org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:120)
        at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1106)
        at org.apache.coyote.Request.action(Request.java:363)
        at
org.apache.catalina.authenticator.SSLAuthenticator.authenticate(SSLAuthenticator.java:134)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
20-jul-2006 15:53:53
org.apache.tomcat.util.net.jsse.JSSE14Support
synchronousHandshake
INFO: SSL Error getting client Certs
javax.net.ssl.SSLHandshakeException: null cert chain
        at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.clientCertificate(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown
Source)
        at java.io.InputStream.read(Unknown Source)
        at
org.apache.tomcat.util.net.jsse.JSSE14Support.synchronousHandshake(JSSE14Support.java:87)
        at
org.apache.tomcat.util.net.jsse.JSSE14Support.handShake(JSSE14Support.java:66)
        at
org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:120)
        at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1106)
        at org.apache.coyote.Request.action(Request.java:363)
        at
org.apache.catalina.authenticator.SSLAuthenticator.authenticate(SSLAuthenticator.java:134)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
20-jul-2006 15:53:53
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection
post
GRAVE: SAAJ0009: Message send failed
20-jul-2006 15:53:53
org.apache.coyote.http11.Http11Processor action
ADVERTENCIA: Exception getting SSL Cert
javax.net.ssl.SSLHandshakeException: null cert chain
        at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.clientCertificate(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown
Source)
        at java.io.InputStream.read(Unknown Source)
        at
org.apache.tomcat.util.net.jsse.JSSE14Support.synchronousHandshake(JSSE14Support.java:87)
        at
org.apache.tomcat.util.net.jsse.JSSE14Support.handShake(JSSE14Support.java:66)
        at
org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:120)
        at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1106)
        at org.apache.coyote.Request.action(Request.java:363)
        at
org.apache.catalina.authenticator.SSLAuthenticator.authenticate(SSLAuthenticator.java:134)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)

ERROR (SamlHttpSoapBinding.java:129) - Exception
during SOAP
communicationcom.sun.xml.messaging.saaj.SOAPExceptionImpl:
java.security.PrivilegedActionException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:146)
        at
com.ericsson.saml2.bindings.SamlHttpSoapBinding.syncSendDoc(SamlHttpSoapBinding.java:106)
        at
com.ericsson.saml2.bindings.SamlHttpSoapBinding.syncSendMessage(SamlHttpSoapBinding.java:157)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.send(SingleLogoutUserInitiatedServlet.java:328)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.singleLogout(SingleLogoutUserInitiatedServlet.java:136)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.service(SingleLogoutUserInitiatedServlet.java:79)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
com.ericsson.saml2.sp.authentication.NoCacheFilter.doFilter(NoCacheFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:129)
        at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.security.PrivilegedActionException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at java.security.AccessController.doPrivileged(Native
Method)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:140)
        ... 27 more
Caused by:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:344)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:169)
        ... 29 more
Caused by: java.net.SocketException: Software caused
connection abort: recv failed
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
        at java.lang.reflect.Constructor.newInstance(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown
Source)
        at java.security.AccessController.doPrivileged(Native
Method)
        at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
        at java.net.HttpURLConnection.getResponseCode(Unknown
Source)
        at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getResponseCode(Unknown
Source)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:331)
        ... 30 more
Caused by: java.net.SocketException: Software caused
connection abort: recv failed
        at java.net.SocketInputStream.socketRead0(Native
Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at
com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.waitForClose(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.sendChangeCipherSpec(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.sendChangeCipherAndFinish(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown
Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read1(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at
sun.net.www.http.HttpClient.parseHTTPHeader(Unknown
Source)
        at sun.net.www.http.HttpClient.parseHTTP(Unknown
Source)
        at sun.net.www.http.HttpClient.parseHTTP(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
        at java.net.HttpURLConnection.getResponseCode(Unknown
Source)
        at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getResponseCode(Unknown
Source)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:311)
        ... 30 more

CAUSE:

java.security.PrivilegedActionException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at java.security.AccessController.doPrivileged(Native
Method)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:140)
        at
com.ericsson.saml2.bindings.SamlHttpSoapBinding.syncSendDoc(SamlHttpSoapBinding.java:106)
        at
com.ericsson.saml2.bindings.SamlHttpSoapBinding.syncSendMessage(SamlHttpSoapBinding.java:157)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.send(SingleLogoutUserInitiatedServlet.java:328)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.singleLogout(SingleLogoutUserInitiatedServlet.java:136)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.service(SingleLogoutUserInitiatedServlet.java:79)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
com.ericsson.saml2.sp.authentication.NoCacheFilter.doFilter(NoCacheFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:129)
        at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
Caused by:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:344)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:169)
        ... 29 more
Caused by: java.net.SocketException: Software caused
connection abort: recv failed
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
        at java.lang.reflect.Constructor.newInstance(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown
Source)
        at java.security.AccessController.doPrivileged(Native
Method)
        at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
        at java.net.HttpURLConnection.getResponseCode(Unknown
Source)
        at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getResponseCode(Unknown
Source)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:331)
        ... 30 more
Caused by: java.net.SocketException: Software caused
connection abort: recv failed
        at java.net.SocketInputStream.socketRead0(Native
Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at
com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.waitForClose(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.sendChangeCipherSpec(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.sendChangeCipherAndFinish(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown
Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read1(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at
sun.net.www.http.HttpClient.parseHTTPHeader(Unknown
Source)
        at sun.net.www.http.HttpClient.parseHTTP(Unknown
Source)
        at sun.net.www.http.HttpClient.parseHTTP(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
        at java.net.HttpURLConnection.getResponseCode(Unknown
Source)
        at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getResponseCode(Unknown
Source)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:311)
        ... 30 more

ERROR (SPExceptionManager.java:46) - SP PROBLEM: Error
sending
Logoutcom.ericsson.saml2.bindings.BindingException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl:
java.security.PrivilegedActionException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at
com.ericsson.saml2.bindings.SamlHttpSoapBinding.syncSendDoc(SamlHttpSoapBinding.java:130)
        at
com.ericsson.saml2.bindings.SamlHttpSoapBinding.syncSendMessage(SamlHttpSoapBinding.java:157)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.send(SingleLogoutUserInitiatedServlet.java:328)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.singleLogout(SingleLogoutUserInitiatedServlet.java:136)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.service(SingleLogoutUserInitiatedServlet.java:79)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
com.ericsson.saml2.sp.authentication.NoCacheFilter.doFilter(NoCacheFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:129)
        at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
Caused by:
com.sun.xml.messaging.saaj.SOAPExceptionImpl:
java.security.PrivilegedActionException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:146)
        at
com.ericsson.saml2.bindings.SamlHttpSoapBinding.syncSendDoc(SamlHttpSoapBinding.java:106)
        ... 26 more
Caused by: java.security.PrivilegedActionException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at java.security.AccessController.doPrivileged(Native
Method)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:140)
        ... 27 more
Caused by:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:344)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:169)
        ... 29 more
Caused by: java.net.SocketException: Software caused
connection abort: recv failed
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
        at java.lang.reflect.Constructor.newInstance(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown
Source)
        at java.security.AccessController.doPrivileged(Native
Method)
        at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
        at java.net.HttpURLConnection.getResponseCode(Unknown
Source)
        at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getResponseCode(Unknown
Source)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:331)
        ... 30 more
Caused by: java.net.SocketException: Software caused
connection abort: recv failed
        at java.net.SocketInputStream.socketRead0(Native
Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at
com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.waitForClose(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.sendChangeCipherSpec(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.sendChangeCipherAndFinish(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown
Source)
        at
com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown
Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read1(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at
sun.net.www.http.HttpClient.parseHTTPHeader(Unknown
Source)
        at sun.net.www.http.HttpClient.parseHTTP(Unknown
Source)
        at sun.net.www.http.HttpClient.parseHTTP(Unknown
Source)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
        at java.net.HttpURLConnection.getResponseCode(Unknown
Source)
        at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getResponseCode(Unknown
Source)
        at
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:311)
        ... 30 more

ERROR (StandardWrapperValve.java:253) -
Servlet.service() para servlet
SingleLogoutUserInitiatedServlet lanzó
excepciónjavax.servlet.ServletException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl:
java.security.PrivilegedActionException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message
send failed
        at
com.ericsson.saml2.sp.util.SPExceptionManager.manageException(SPExceptionManager.java:47)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.send(SingleLogoutUserInitiatedServlet.java:357)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.singleLogout(SingleLogoutUserInitiatedServlet.java:136)
        at
com.ericsson.saml2.sp.web.session.SingleLogoutUserInitiatedServlet.service(SingleLogoutUserInitiatedServlet.java:79)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
com.ericsson.saml2.sp.authentication.NoCacheFilter.doFilter(NoCacheFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:129)
        at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)


Any clue?

Regards,

Evaristo

 --- Ashutosh Shahi <Ashutosh.Shahi_at_Sun.COM> escribió:

> Hi,
>
> As far as my understanding goes, client
> certificate authentication is not provided at SAAJ
> layer.
>
> Having said that, it is possible to achieve the
> same through JAX-RPC; see:
>
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security7.html#wp498398
>
> Specifically you need to set the following
> properties:
>
> | System.setProperty("javax.net.ssl.keyStore",
> keyStore);
>
> System.setProperty("javax.net.ssl.keyStorePassword",
> keyStorePassword);
> System.setProperty("javax.net.ssl.trustStore",
> trustStore);
>
>
System.setProperty("javax.net.ssl.trustStorePassword",
> trustStorePassword);
>
> As detailed in the link, you will have to make
> corresponding changes in server to enable
> client-authentication.
>
> I'll try to find out if this can be done at saaj
> layer also and get back to you.
> |
>
>
> Thanks,
>
> Ashutosh
>
>
> Evaristo José Camarero wrote:
> > No documentation, nothing in the web, and no
> answer so
> > I guess that TLS client certificate authentication
> it
> > is not supported by SAAJ SOAPConnection...
> >
> > --- Evaristo José Camarero
> <evaristojosec_at_yahoo.es>
> > escribió:
> >
> >
> >> Hello:
> >>
> >> I have seen that SAAJ support HTTP Basic
> >> Authentication, but does it support TLS client
> >> certificate authentication?
> >>
> >> Regards,
> >>
> >> Evaristo Camarero
> >>
> >>
> >>
> >> ______________________________________________
> >> LLama Gratis a cualquier PC del Mundo.
> >> Llamadas a fijos y móviles desde 1 céntimo por
> >> minuto.
> >> http://es.voice.yahoo.com
> >>
> >>
> >>
> >
>
---------------------------------------------------------------------
> >
> >> To unsubscribe, e-mail:
> >> users-unsubscribe_at_saaj.dev.java.net
> >> For additional commands, e-mail:
> >> users-help_at_saaj.dev.java.net
> >>
> >>
> >>
> >
> >
> >
> >
> > ______________________________________________
> > LLama Gratis a cualquier PC del Mundo.
> > Llamadas a fijos y móviles desde 1 céntimo por
> minuto.
> > http://es.voice.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe_at_saaj.dev.java.net
> > For additional commands, e-mail:
> users-help_at_saaj.dev.java.net
> >
> >
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_saaj.dev.java.net
> For additional commands, e-mail:
> users-help_at_saaj.dev.java.net
>
>



                
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com