users@glassfish.java.net

How to setup SSL in Glassfish 4 for client authentication?

From: Trevor Holyoak <trevorh_at_uuinsurance.com>
Date: Mon, 17 Jun 2013 21:59:11 +0000

I have created a SOAP web service in Netbeans that I've tested and is working correctly in Glassfish 4 both at port 8080 and at port 8181 with the default SSL configuration that comes with Glassfish 4.

The company that will be using the web service has provided me with an SSL certificate that they want me to use to verify them, along with a certificate bundle from GoDaddy.

I tried setting this up with the previous version of Glassfish, and wasn't able to make it work. The other company said the connection got terminated during the SSL handshake. Since I don't have access to the client certificate, I'm completely reliant on the client to test it for me, which makes things rather difficult.

I've set up regular SSL on web servers before without any trouble, but Glassfish is a different animal (pardon the pun), and I have no prior experience with it, other than playing around with the earlier version off and on over the last month. I'm also coming at Java EE after having certified on Java 2 about a decade ago but not using it since.

So, my question is, how do I set this up? I've been looking at the Java EE 7 Tutorial, but it seems to be aimed at self-signed certificates.

Thanks,
Trevor