1 Reply Latest reply on Jul 5, 2010 6:50 PM by Ron Sigal

    Secure JMX Invoker

    Rupali Desai Newbie

      Hello,

       

      I have enabled authentication for the JMX invoker. However when I try to access the MBeans, I get the following error.

       


      java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
          at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:88)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
          at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       

      Here is the client side code snippet.

       

      Hashtable env = new Hashtable();

       

                  String factory = "org.jboss.security.jndi.JndiLoginInitialContextFactory";

                  env.put(Context.INITIAL_CONTEXT_FACTORY, factory);

                  env.put(Context.SECURITY_CREDENTIALS, "test");

                  env.put(Context.SECURITY_PRINCIPAL, "test");
                   env.put(Context.SECURITY_PROTOCOL, "testLoginInitialContext");

                   ctx = new InitialContext(env);
             
                     server = (MBeanServerConnection) ctx
                          .lookup("jmx/invoker/RMIAdaptor")

       

      Any idea, what I am missing here.

       

      Thanks

      RTD