5 Replies Latest reply on Feb 1, 2011 9:30 AM by jlevente

    Jass configuration file name and location

    franticprogramer

      I found a lot of documentation on how JASS configuration but can't find where this configuration should reside in, such as location and file name.  Can someone help me? i am using servicemix 4.3.

        • 1. Re: Jass configuration file name and location
          davsclaus

          Was the documentation the ESB security guide?

          http://fusesource.com/docs/esb/4.3/esb_security/index.html

           

          If it was, maybe you can provide feedback where things are not clear to you.

          • 2. Re: Jass configuration file name and location
            franticprogramer

            For example, in activemq security documentation, I found:

             

            #

             

            Set a system property?set the value of the system property, java.security.auth.login.config, to the location of the login configuration file. For example, you could set this system property on the command line, as follows:

             

            java -Djava.security.auth.login.config=/var/activemq/config/login.config ...

             

            #

             

            But I couldn't find it for servicemix

            • 3. Re: Jass configuration file name and location
              franticprogramer

              I guess I didn't reply correctly

               

              For example, in activemq security documentation, I found:

               

              #

               

              Set a system property?set the value of the system property, java.security.auth.login.config, to the location of the login configuration file. For example, you could set this system property on the command line, as follows:

               

              java -Djava.security.auth.login.config=/var/activemq/config/login.config ...

               

              #

               

              But I couldn't find it for servicemix

              • 4. Re: Jass configuration file name and location
                jlevente

                I'm sorry but I have the same opinion, the doc is not clear. And please do not take this as an offend.

                 

                OK. So what should be the correct one? If you read through your documentation than you must not use the login.config file for the osgi embedded ActiveMQ broker.

                 

                See:  http://fusesource.com/docs/esb/4.3/esb_security/SecureBroker-JAASOverview.html -- How not to define JAAS realms

                 

                so reading further

                http://fusesource.com/docs/esb/4.3/esb_security/Arch-JAAS.html you have to convert the file to XML.

                BUT can you tell me where I should put the file specified by the property value: org.apache.activemq.jaas.properties.user=users.properties

                Does it have to be in the non existent conf directory of servicemix or in etc or where? Can we specify absolute path?

                 

                In the whole document it is a big confusion that it talks about activemq but most of the time it is not clear about which. It should talk about the embedded ActiveMQ configuration and not the standalone (that has it's own documentation). Please be more specific.

                 

                So I made one configuration file for a broker which contains the (converted) jaas realm (PropertiesLogin) for activemq but my camel route cannot connect to the queue because of the username or password invalid error message I got.

                 

                How could I debug the authentication to find out what is used. In this situation I mean the files  (users.properties, groups.properties) So which one was tried to be opened or not found because nothing in the log.

                 

                 

                Oh yes and the example is not found I cannot test: http://fusesource.com/docs/esb/4.3/esb_security/SecureBroker-JAAS.html#SecureBroker-JAAS-Deploy

                 

                Regards,

                Levente

                 

                BTW I like the Draft feature of the site because my Firefox crashed and when I logged in again it saved me  typing everything from scratch.

                • 5. Re: Jass configuration file name and location
                  jlevente

                  OK. Finally I found the (users.properties, groups.properties) files' location by debugging servicemix and checking out the source code for JAAS.

                  If you define the  env.var as  franticprogramer suggested e.g.:

                  • -Djava.security.auth.login.config=/opt/apache-servicemix-4.3.0-fuse-03-00/jaas/login.config

                  then JAAS will define the baseDir (in this case "/opt/apache-servicemix-4.3.0-fuse-03-00/jaas")

                  • otherwise its "." which turned out to be at the end the install dir.

                  ($karaf.home = /opt/apache-servicemix-4.3.0-fuse-03-00 )

                   

                  the code is:

                   

                  if (System.getProperty("java.security.auth.login.config") != null) {

                  baseDir = new File(System.getProperty("java.security.auth.login.config")).getParentFile();

                  } else {

                  baseDir = new File(".");

                  }

                  So either create for java the -Djava.security.auth.login.config env.var and put the files into the baseDir or just put them into your install dir.

                   

                  Regards,

                  Levente

                   

                  Edited by: jlevente on Feb 1, 2011 2:28 PM