Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-490 Domain Management Role Based Access Control
  3. WFLY-1983

MBeans for unaddressable resources available through JMX

XMLWordPrintable

      MBeans for resources which are unaddressable for authenticated user still has its corresponding MBeans registered - e.g. security-realm=ManagementRealm

      Map<String, String[]> env = new HashMap<String, String[]>();
      String[] credentials = {"monitor", "asd1asd!"};
      env.put(JMXConnector.CREDENTIALS, credentials);
      
      JMXServiceURL url = new JMXServiceURL("service:jmx:remoting-jmx://localhost:9999");
      JMXConnector jmxConnector = JMXConnectorFactory.connect(url, env);
      MBeanServerConnection mBeanServerConnection = jmxConnector.getMBeanServerConnection();
      
      ObjectName mgmtRealm = new ObjectName("jboss.as:core-service=management,security-realm=ManagementRealm");
      MBeanInfo info = mBeanServerConnection.getMBeanInfo(mgmtRealm);
      System.out.println(info.getClassName());
      
      >>> org.jboss.as.controller.ModelController
      

              kkhan1@redhat.com Kabir Khan
              jcechace@redhat.com Jakub Čecháček
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: