summaryrefslogtreecommitdiff
path: root/java/management/eclipse-plugin/src
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2009-11-06 16:51:56 +0000
committerRobert Gemmell <robbie@apache.org>2009-11-06 16:51:56 +0000
commitb4430e6a309f83fdaa7146bd6f3f7e3b1dca589c (patch)
treefa8f94138a60e34a4406fac4faed1b9b4d5fe2e8 /java/management/eclipse-plugin/src
parentf62c3a289863b3998cb98dcb1465eb90ff836619 (diff)
downloadqpid-python-b4430e6a309f83fdaa7146bd6f3f7e3b1dca589c.tar.gz
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
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@833467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/management/eclipse-plugin/src')
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java
index 69a466c943..5234535fe5 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java
@@ -45,7 +45,6 @@ import javax.management.ObjectName;
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 @@ public class MBeanUtility
//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)