3 Replies Latest reply on Mar 1, 2002 3:21 AM by stephenw

    standalone client: SecurityException: no protocol: auth.conf

    dkarr

      I'm trying to set up the file-based JAAS sample described in the docs, but with my own beans, instead of the beans in the sample, and I'm using a standalone client, instead of a servlet.

      I think I have everything set up, including putting the "client/auth.conf" into the client jar file.

      Unfortunately, when my client tries to create the LoginContext, I get the following exception:

      --------------------
      java.lang.SecurityException: no protocol: auth.conf
      at com.sun.security.auth.login.ConfigFile.getAppConfigurationEntry(ConfigFile.java:221)
      at javax.security.auth.login.LoginContext.init(LoginContext.java:172)
      at javax.security.auth.login.LoginContext.(LoginContext.java:319)
      --------------------

      I know that the client is reading the auth.conf file, because before I copied the "client/auth.conf" file and set the "java.security.auth.login.config" property, I was getting a different exception, "Unable to locate a login configuration".
      What could be going wrong here? Is there some way to get more information? Is there someplace where this is well-documented?

      Just in case, I'll include the "auth.conf" file here:
      ------------------
      other {
      // Put your login modules that work without jBoss here

      // jBoss LoginModule
      org.jboss.security.ClientLoginModule required;

      // Put your login modules that need jBoss here
      };
      ------------------

        • 1. Re: standalone client: SecurityException: no protocol: auth.
          dkarr

          Ok, I'm getting a clue now. The problem is that I'm setting the "java.security.auth.login.config" property at runtime (from my ant script). Originally, I just set it to "auth.conf". The value of this isn't a file path, it's supposed to be a URL. So the error is saying that it couldn't find the "protocol" part of the URL. However, I did try changing the value to be the relative path to where the file was stored BEFORE I put it into the client jar file (being "properties/auth.conf"). This actually worked. However, what I really need is to have it pull the file out of the jar file. How can I get this to get the "auth.conf" file out of the jar file?

          • 2. Re: standalone client: SecurityException: no protocol: auth.
            mark30000

            I have the problem that you probable solved.
            I try to put auth.conf into jar file.
            How did you specify the URL when the auth.conf file is in the jar file (or in the classpath)?
            I succed to work only with absolute pathes, like d:\...\client\auth.conf.
            Thank you in advance.

            • 3. Re: standalone client: SecurityException: no protocol: auth.
              stephenw

              Hi jsut a quick question,
              where did you put the auth.conf file in the client jar file?? which dir is it in??
              Stephen