users@glassfish.java.net

Glassfish 3.1 SSL issues

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Oct 2010 09:12:01 PDT

Hi all, I'm upgrading my glassfish from 3.0.1 to 3.1

My application was running smooth on 3.0.1 with SSL but when I changed to 3.1 (b25) I got some issues.

First of all, if I try to change the certificate I'm using in "http-listener" config, it shows this exception

org.jvnet.hk2.config.ValidationException: Constraints for this bean violated. Message = keyStoreType must match "(JKS|NSS)"

I was able to change it in domain.xml file but anyway when I run the application I get some handshake erros (unexpected handshake message)

I debbuged it on the glassfish and I'm getting some errors, but the one that caught my attention was this one:

javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

This exception is caught at the code and lately it throws another exception, the one shown in glassfish logs.

java.lang.RuntimeException: java.lang.IllegalStateException
        at com.sun.enterprise.security.webservices.SecurityServiceImpl.doSecurity(SecurityServiceImpl.java:206)
        at org.glassfish.webservices.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:180)
        at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:131)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
        at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1002)
        at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:942)
        at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:404)
        at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:354)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException
        at com.sun.grizzly.tcp.http11.GrizzlyRequest.getUserPrincipal(GrizzlyRequest.java:1837)
        at com.sun.grizzly.http.servlet.HttpServletRequestImpl.getUserPrincipal(HttpServletRequestImpl.java:895)
        at com.sun.enterprise.security.webservices.SecurityServiceImpl.doSecurity(SecurityServiceImpl.java:133)
        ... 24 more

So, if anyone know whats happening or if this sounds like a bug, please let me know and I can give more information if it's necessary.
[Message sent by forum member 'rudibravo']

http://forums.java.net/jive/thread.jspa?messageID=485753