|
|
||
Masoud Kalali's Blog
«SHIFT+ALT+ENTER, a cool NetBeans shortcut |
Main
| How to have your Own CA and configure Glassfish and your clients for mutual authentication?, Part II »
How to have your Own CA and configure Glassfish and your clients for mutual authentication?Posted by kalali on August 16, 2007 at 09:05 AM | Comments (0)One of the most repeated question in GlassFish mailing list is SSL, Certification, Mutual Authentication,.... In this Entry I will try to address some of this questions by giving an step by step guide for using EJBCA to issue certificate, use them in both glassfish and clients which connect to glassfish in some manner. clients like web browser, standalone java applications,... There are several tutorial and blog entry about configuring glassfish to use some specific certification in order to perform server authentication for clients over SSL and each of those weblog is an invaluable source of information. In this blog entry and perhaps the next one I will address another concerns which some people has for their GlassFish and client security. Some times we are running an application within an enterprise and we need to have mutual authentication for every clients that connect to server so we will need to have one certification for client and another one for our glassfish server. both of this certification should be valid (issued by an already known CA within glassfish trust store and client trust store). For these two entries I assume that our client and server will just accept certification issued by our own CA which is based on EJBCA. Before we start the main job you will need to download and install EJBCA from its web site, then you will need to install it according to its manual which you can find in documentation section. After you installed and could view EJBCA administration console then you can follow the rest of the entry. In order to create server certification we will need to perform following steps as described in 4 sections: Section 1: Creating servers certification profile:
Section 2: Create servers end entities profile:Now you have create a profile which in next sections you can create certifications which will comply with it. Now we will need to create an End Entity Profile so follow these steps to create it.
Now we are reaching an step in which we will create the real certificate that Glassfish will use in its SSL enabled listener. To create the certificate perform following steps: Section 3: Create server certification
Section 4: Use the certification in Application Server.You are done, the certification is ready to be downloaded and used.
By pressing OK a JKS file will download to your computer.
You are done, you application server should start normally, but you have some more steps before you complete the mutual authentication capability. Section 5: Enabling mutual authentication for a listener.Open application server administration console and from the left side menu select Configuration> HTTP Service> HTTP Listeners> http-listener-2, now you should check the Security check box and select SSL tab, now make sure that you have checked Client Authentication check box. You are done, point your browser to https://computer1.mydomain.com:8181 you will see that this page will only open for the browser that you have imported EJBCA administration certification. it means that both server and client must prove their identity before they could communicate. In next entry of this series I will demonstrate steps that you need to follow in order to create a stand alone web service client. Make sure that you need to delete the private key of you server from cacerts.jks (it is not necessary by the way). Best way to explore you key stores is using keytool which you can find more information about it Here. Also if you are may find more cool key store editor in NetBeans Module Portal For more information or maybe to find some of your questions answered you may take a look at:
Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment | ||
|
|