1 Reply Latest reply on Dec 28, 2001 11:39 AM by Tom Gullo

    Putting it all together

    Tom Gullo Newbie

      Security is pretty important and I can't wait to get it to work. My problem is I keep getting the error message:
      "Unable to locate a login configuration".
      I know this issue has been discussed a bit, but if anyone could post an example showing all the files that need to be set up, I would greatly appreciate it.

      I am attempting to run the example written by Scott Stark in his helpful article at javaworld:

      If interested, here are what my files look like:

      server auth.conf
      example1 {
      org.jboss.security.auth.spi.UsersRolesLoginModule required

      client auth.conf
      example1 {
      org.jboss.security.ClientLoginModule required;

      users.properties in the jar file
      # The username to password mapping properties file

      roles.properties in the jar file
      # The username to role(s) mapping properties file

      and the client attempt to get a LoginContext (that fails):

      AppCallbackHandler handler = new AppCallbackHandler("java", "echoman");
      LoginContext lc = new LoginContext("example1", handler);

      Any help would be greatly appreciated.

        • 1. Re: Putting it all together
          Tom Gullo Newbie

          On M$ Windows, I placed the client auth.conf in a directory, Jboss will find it if you specify the following line of code:

          System.setProperty("java.security.auth.login.config", "file:/C:/auth.conf");

          By doing this, I got Scott Stark's example SessionClient working.