I have a server that runs JBoss. When I type bad URL to that server it gives me version like this: JBossWeb/2.0.1.GA - what version of JBoss that would be? A SSL certificate will be bought and provided for me so that I could install it in JBoss. I would really appreciate any HOWTO or any information how to install ready SSL certificate on JBoss. Do I need to generate any files with openssl, when this SSL certificate will be bought from some other company that sells SSL certificates?
Thanks in advance for any help.
I know this post is quite old, bui i want to share the steps needed for a much more recent version of Wildfly (JBoss AS in early times).
First of all you need to create your self-signed certificate. If you already have a keystore, you can skip this steps.
jbossWildfly
and click ok, and then insert the password that will be used to unlock this alias. I highly suggest to save this data somewhere in your computer.keystore.jks
in the keystore folder that we have created previously, then insert a new password that will be used to unlock the keystore. You can use the same of the previously one if you want.Now open the
standalone.xml
file located in:And add a new Security Realm inside the
<security-realms>
tag:Again change $WILDFLY_HOME$ with the real path to the home dir and change the password to what you've typed.
Now you need to assign your new Security realm to the HTTPS listener of the default-server:
Remember that by default the HTTPS listener is binded to the 8443 port:
So your calls to the server would be something like this: (accessing on localhost)
Hope it can help! :)
You can generate your own SSL certificate:
First off you need to create a self-signed certificate. You do this using the keytools application that comes with Java. Open a command prompt and run the following command. You will need to change the path to your Jboss conf directory to reflect your install:
When prompted use a password of changeit everywhere. It’s important that you answer localhost to the first question:
Finally add two System properties to your Jboss startup command to get the javax.net.ssl library to use your new keystore. These are only needed if you need to make SSL calls back to yourself. I needed them because I had CAS and 3 apps authenticating with CAS all running in the same dev Jboss instance:
Ok now browse to
http://localhost:8443/
Your browser will complain about a self-signed certificate. Just follow your browser’s instructions to add this certificate as a security exception so you won’t be prompted again and you are all done.