Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6714954

Description of MBeanPermission checking in MBeanServer javadoc is inacurrate

    Details

    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      1) regarding queryMBeans/queryNames:
      ====================================

      the doc says:

      ----------------------------------------------------------------
      For the queryMBeans method, the caller's permissions must imply MBeanPermission(mbeanServerName, null, null, name, "queryMBeans"). Additionally, for each MBean that matches name, if the caller's permissions do not imply MBeanPermission(mbeanServerName, className, null, name, "queryMBeans"), the MBean server will behave as if that MBean did not exist.

      --- [snip] ---

      For the queryNames method, the checks are the same as for queryMBeans except that "queryNames" is used instead of "queryMBeans" in the MBeanPermission objects. Note that a "queryMBeans" permission implies the corresponding "queryNames" permission.
      ----------------------------------------------------------------

      In fact it should say that queryMBeans checks for:
      MBeanPermission(mbeanServerName, null, null, null, "queryMBeans").
      and not for
      MBeanPermission(mbeanServerName, null, null, name, "queryMBeans").

      2) regarding className
      ======================

      The javadoc of MBeanServer says that the className used to check
      permissions is always the value returned by getMBeanInfo().getClassName().
      This is not true for "instantiate", where the classname is the classname
      passed as parameter to instantiate (or createMBean, when the "instantiate"
      permission is checked by "createMBean").

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emcmanus Eamonn McManus
                Reporter:
                dfuchs Daniel Fuchs
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: