Thursday, August 5, 2010

SSL CA on JBoss AS application server

Recently I create a registraion system to the conference, of course JBoss Seam and JBoss platform based on (stable and everything works without a problem at all.)
There have however a problem, namely the SSL encrypted connection. Everywhere, the solution is given using keytool utility. The problem is that there just create the certificate to be signed by an authorized company. (Self signed out of the question). I received a certificate signed ready. Well, how can it run on JBoss AS?

The solution is not so obvious to the end, but as we read it, it will look. So, copy your private key file and certificate file to the conf directory in your JBoss configuration. In this configuration, enter the directory deploy \ jbossweb.sar and open the file server.xml. Edit the connector as follows:

<Connector protocol="HTTP/1.1" SSLEnabled="true"
   port="8443" address="${jboss.bind.address}"
   enableLookups="true" disableUploadTimeout="true"
   scheme="https" secure="true" clientAuth="false"
   sslProtocol = "TLS"
   SSLCertificateKeyFile="${jboss.server.home.dir}/conf/459659.pem"
   SSLCertificateFile="${jboss.server.home.dir}/conf/privatekey.crt" />

Sorry, but that's not all. Now a bit more difficult case, you must install JBoss Native Library to download from JBoss web page. After unpacking, copy the contents of the directory - they are dll files to the bin directory of our server. It was for Windows. If you have a Unix / Linux is the standard again you have anything else, or the bin directory create a directory "native", copy all files with the extensions "so", remembering to copy the file openssl.


Well now you can run JBoss. Access to page through https, and how you have set the port connector, which is the 8443. On Linux can be a problem with permissions to port 443, well unless it is our and we have access to the root.

Servers Administration

No comments:

Post a Comment