2 Replies Latest reply on Nov 14, 2002 4:49 AM by gorlum

    java.lang.SecurityException: Unable to locate a login config

      We are trying to use the JBoss security model on 3.0.1 as described by Scott Stark in the javaworld article on JBoss security. We have the roles.properties and users.properties in our .jar which in the .ear and we think have set the security descriptors, roles and domain as per the article correctly.

      The application policy we would like to use from login-config is <application-policy name = "other">

      I don't think our jboss.xml is conifgured for using the security service as a resource. Is this correct? and how would we do this?


      The command line test client code is:
      try {
      AppCallbackHandler handler = new AppCallbackHandler(name, password);
      System.out.println("handler OK.");
      LoginContext lc = new LoginContext("client-login", handler);
      System.out.println("Created LoginContext");
      lc.login();
      } catch (LoginException le) {
      System.out.println("Login failed");
      le.printStackTrace();
      }

        • 1. Re: java.lang.SecurityException: Unable to locate a login co

          Ok, putting a JVM arg on the client for auth.conf did the trick. Works now.

          • 2. Re: java.lang.SecurityException: Unable to locate a login co
            gorlum

            I'm using the same example.
            When I'm trying tu run it with ClientLoginModule all is ok.
            But when I'm using DatabaseServerLoginModule
            and make changes in auth.conf
            other {
            org.jboss.security.auth.spi.DatabaseServerLoginModule required
            dsJndiName="java:/InformixDS"
            principalsQuery="select Password from Principals where PrincipalID=?"
            rolesQuery="select Password from Roles where PrincipalID=?"
            ;
            };

            I've got follows error
            ... InformixDS not bound
            ....

            But when I'm trying to connect to InformixDS from my other EJB's all works properly.

            Can anybody help me?