0 Replies Latest reply on Apr 2, 2013 7:41 PM by Yaron Levy

    [Remoting 3]: context lookup authentication in JBoss AS 6

    Yaron Levy Newbie

      any idea how to do the authentication from remote client?

      Running on jboss as 6.1.0.final

       

      I tried:

       

      java.util.Properties p = new java.util.Properties();
      p.put("java.naming.provider.url", "jnp://localhost:1199");
      p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");  //also: p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
      p.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      p.put(Context.SECURITY_PRINCIPAL, username);
      p.put(Context.SECURITY_CREDENTIALS, pwd);
      
      javax.naming.InitialContext context = new javax.naming.InitialContext(p);
      context.lookup("jmx/invoker/RMIAdaptor");
      

       

      but got:

       

      java.lang.SecurityException: JMXConnectorAuthenticator requires userid/password credentials to be passed in