7 Replies Latest reply on Mar 31, 2003 6:45 AM by sachinshah

    SSL for JBoss

    sachinshah

      Hi All,

      I am trying to implement communication over SSL between client and JBoss server. i followed the steps mentioned in the documentation( I have subscribed for jboss docs). But the classes mentioned in documentation are missing they are RMISSLServerSocketFactory and RMISSLClientSocketFactory. I am using JBoss-2.4.3_Tomcat-3.2.3

      Following are my questions :
      1) Where can i get above mentioned classes?
      2) How do i check that the communication is actually happening using SSL?
      3) Is it advisable to implement SSL communications?
      4) Approximately by how much % the performance of communication between client and server is affected?

      Waiting for your reply. It is urgent

      Sachin

        • 1. Re: SSL for JBoss
          olaso
          • 2. Re: SSL for JBoss
            sachinshah

            Thanks for reply,

            I downloaded the classes, but not able to compile the classes. It is giving errors for jboss related classes. i checked up each and every jar file but was unable to locate some of the important classes like org.jboss.security.plugins.JaasSecurityDomain etc. I belive these classes are required for normal working of JBoss then how come they are not present in jar file or am i missing something?

            • 3. Re: SSL for JBoss
              olaso

              The jars needed to compile are jbosssx.jar jboss-common.jar and jboss-system.jar

              • 4. Re: SSL for JBoss
                sachinshah

                D:\JBossBook\JBossBook-2.4.x\examples\src\main\org\jboss\chap8\ex3\be\ac\rug\security\ssl\RMISSLServerSocketFactory.java:38: cannot resolve symbol
                symbol : method setKeyStoreURL (java.lang.String)
                location: class org.jboss.security.plugins.JaasSecurityDomain
                securityDomain.setKeyStoreURL(keyStoreURL);
                ^
                D:\JBossBook\JBossBook-2.4.x\examples\src\main\org\jboss\chap8\ex3\be\ac\rug\security\ssl\RMISSLServerSocketFactory.java:41: cannot resolve symbol
                symbol : method setSecurityDomain (org.jboss.security.plugins.JaasSecurityDomain)
                location: class be.ac.rug.security.ssl.RMISSLServerSocketFactory
                setSecurityDomain(securityDomain);
                ^
                D:\JBossBook\JBossBook-2.4.x\examples\src\main\org\jboss\chap8\ex3\be\ac\rug\security\ssl\RMISSLServerSocketFactory.java:55: cannot resolve symbol
                symbol : method setSecurityDomain (org.jboss.security.plugins.JaasSecurityDomain)
                location: class be.ac.rug.security.ssl.RMISSLServerSocketFactory
                setSecurityDomain(securityDomain);
                ^
                3 errors
                Finished

                Got above errors what to do. Even i got jboss-common and jboss-system from JBoss3.0 and the same is not present in JBoss 2.4.3

                This is bit urgent please !!!


                Thanks in advance
                Sachin

                • 5. Re: SSL for JBoss
                  olaso

                  The class JaasSecurityDomain "protected static JaasSecurityDomain securityDomain = null;" is in jbosssx.jar

                  And the only thing I changed was the constructor:

                  public RMISSLServerSocketFactory(String securityDomainName, String keyStoreURL, String keyStorePass) {
                  super();
                  try {
                  securityDomain = new JaasSecurityDomain(securityDomainName);
                  securityDomain.setKeyStoreURL(keyStoreURL);
                  securityDomain.setKeyStorePass(keyStorePass);
                  securityDomain.setLoadSunJSSEProvider(true);
                  securityDomain.start();
                  setSecurityDomain(securityDomain);
                  }
                  catch(Exception e) {
                  }
                  }

                  Apart from that I did nothing else and It works. (I'm using jboss-3.0.6)
                  I had no problems compiling so I don't know what can be wrong in your program.

                  • 6. Re: SSL for JBoss
                    sachinshah

                    Hi,

                    I tried compiling the code with JBoss 3.0.6 this time but still the method setSecuritySystem(JaasSecurityManager) not available and Log related methods were also not found. so i removed this method and replaced log.info with System.outs. Now the code is compiled, but when i try to start the JBoss server it is giving following Error loading class org.jboss.system.JBossRMIClassLoader property java.rmi.server.RMIClassLoaderSpi not set.
                    I am attaching the log file for your reference.

                    Any help will be greatly appreciated.

                    • 7. Re: SSL for JBoss
                      sachinshah

                      Hi All,

                      i was finally able to enable SSL communication with JBOSS following the instruction at the above mentioned site. Only doubt that i have now is how do i check that this is actually enabled or not.
                      i am getting this error if run the client without providing the keystore through option -Djavax.net.ssl.trustStore, but works with option provided, so does that mean SSL communication for JBoss enabled.

                      Secondly, i want to secure entire communication with JBoss from client and i am using JMS as well, so by doing above mentioned changes does JMS also gets secured or something more has to be done to enable SSL communication for Messeging.

                      Waiting for your reply as always :)

                      Sachin