3 Replies Latest reply on Dec 1, 2006 6:09 AM by Marilen Corciovei

    Autentication through Java client for JAAS failing

    Krishna Murthy Nazare Newbie


      I'm new to JBoss/JAAS. Working on a project to retrieve JMX information from JBoss in secure environment.

      The client program written with code

      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.LoginInitialContextFactory");
      props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
      props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      props.put(Context.SECURITY_PRINCIPAL, name);
      props.put(Context.SECURITY_CREDENTIALS, password);

      is failing with "java.lang.SecurityException: Unable to locate a login configuration" errors.

      The JBoss command line utility twiddle.bat works fine with the authentication information retrieving the data from JBoss.

      Can somebody help in this regard to get this working as making the client connect with security is very essential.