3 Replies Latest reply on Apr 2, 2008 7:42 PM by pete007

    How to configure JBoss AS to use SSL (https)

      Hello,

      I have two seam applications (EARs) and I want to secure only one of them to use the https-protocol. My knowledge of this is very small, so it would be nice, if someone can give me some hints.

      What type of certificate/key/whatever do I need for this? How can I generate it? Where do I put the keyfile? Which configfiles do I have to change?

      Thanks in advance for any help, Peter

      ps: not that important, but interesting: if I have a domain, where do I get a trusted key for it?

        • 1. Re: How to configure JBoss AS to use SSL (https)
          jaikiran
          • 2. Re: How to configure JBoss AS to use SSL (https)
            jaikiran

             

            "pete007" wrote:


            ps: not that important, but interesting: if I have a domain, where do I get a trusted key for it?


            Certificate Authorities http://en.wikipedia.org/wiki/Certificate_authority.





            • 3. Re: How to configure JBoss AS to use SSL (https)

              Hello,

              thank you for the links, now I understand it a little better.

              The rest of my post was intended as a please-help-me-request, but I managed to solve the problem by myself. :))

              So, interested readers can use it as a guideline for setting up SSL for a single Seam application on a JBoss Server. (Seam 2.0.0 and Jboss 4.2.0)

              Thanks a lot and have fun, Pete

              btw: the other non-https-application on the same server is still working.

              ---------------------------

              Enabled SSL in the file "server.xml" in my deploy-directory by uncommenting the following entry:

              <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150"
              scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" />

              Added the following parameters to the above tag:
              keystoreFile="${jboss.server.home.dir}/conf/myapp.keystore"
              keystorePass="topsecretpwd"

              Enabled SSL in the desired seam application by editing pages.xml:
              <page view-id="*" scheme="https"> ...

              Created a key with the keytool with the following command:
              keytool -keystore jboss-dir\server}default\conf\myapp.keystore -genkey -alias myalias -keypass mypassword

              I was prompted for the keystore-password, where I used the one from the server.xml (topsecretpwd) and I can see the key, when I list all keys with:
              keytool -keystore jboss-dir\server}default\conf\myapp.keystore -list
              myalias, 02.04.2008, keyEntry,
              Zertifikatsfingerabdruck (MD5): XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:04:E4:F7:8A:6A:FE