You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2009/11/06 17:52:48 UTC

svn commit: r833468 - /qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java

Author: robbie
Date: Fri Nov  6 16:52:48 2009
New Revision: 833468

URL: http://svn.apache.org/viewvc?rev=833468&view=rev
Log:
QPID-2189: use an ObjectName pattern instead of the precise key value in the queryNames call to avoid incorrectly tripping the security when connecting to pre-0.6 brokers as a non-admin user

Modified:
    qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java

Modified: qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java?rev=833468&r1=833467&r2=833468&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java (original)
+++ qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java Fri Nov  6 16:52:48 2009
@@ -45,7 +45,6 @@
 import javax.management.ReflectionException;
 
 import org.apache.qpid.management.common.mbeans.ServerInformation;
-import org.apache.qpid.management.common.mbeans.UserManagement;
 import org.apache.qpid.management.ui.ApiVersion;
 import org.apache.qpid.management.ui.ApplicationRegistry;
 import org.apache.qpid.management.ui.ManagedBean;
@@ -551,7 +550,8 @@
         
         //Detect the value of the 'version' key property on the UserManagement MBean ObjectName.
         //If present, we have a v1.2 API server. If null, we have a v1.1 API server.
-        objName = new ObjectName(server.getDomain() + ":type="+ UserManagement.TYPE + ",*");
+        //Use an ObjectName pattern (the ?) to match the 'type' and allow this to work for non-admin users
+        objName = new ObjectName(server.getDomain() + ":type="+ "UserManagemen?" + ",*");
         objectInstances = mbsc.queryNames(objName, null);
         
         if(objectInstances.size() != 0)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org