0 Replies Latest reply on Oct 25, 2002 3:55 PM by annapurna

    JAAS authentication Principal=null

    annapurna

      Hi all,

      There seeems to be lots of threads on this issue.. but I could not find an answer to my problem..

      I am using JBoss3.0.3 with Tomcat4.0.5

      Tried to created LoginContext this way..

      CallbackHandler handler = new UsernamePasswordHandler("admin",
      null);
      LoginContext lc = null;
      try {
      lc = new LoginContext("simple",handler);

      lc.login();
      }catch (javax.security.auth.login.LoginException ex){

      ex.printStackTrace();
      }


      and then in the jboss.xml used the security domain

      <security-domain>java:/jaas/other</security-domain>

      I got an error saying user.properties not found

      I added these users in the files and placed in the conf dir

      # users.properties
      admin=admin
      # admin is the user - admin is the password


      # roles.properties
      admin=Tester
      admin.CallerPrincipal=caller_test
      # test is the user - Tester is the role
      #
      # The first line could be test.Roles (but Roles is the default RoleGroup)
      # The second line maps the user test in the CallerPrincipal RoleGroup to caller_test

      This is just what I did.. sure there is something more to be done..

      Now I get an error Authetication Exception: principal=null

      Need help badly...

      Thanks,
      Anna