From cc5f1d0c341d10ebe47cc0ce36a9852c4f85146d Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Thu, 16 Feb 2012 11:49:14 +0000 Subject: QPID-3844: allow queryMBeans to succeed without ACL checking, tools like JConsole / Qpid MC need this to function at all Applied patch from Oleksandr Rudyy git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1244946 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/qpid/server/management/MBeanInvocationHandlerImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'qpid/java/broker/src/main') diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java index 2aeef1c2a4..651372db16 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java @@ -87,8 +87,8 @@ public class MBeanInvocationHandlerImpl implements InvocationHandler, Notificati return true; } - // Allow querying available object names - if (methodName.equals("queryNames")) + // Allow querying available object names and mbeans + if (methodName.equals("queryNames") || methodName.equals("queryMBeans")) { return true; } @@ -108,7 +108,7 @@ public class MBeanInvocationHandlerImpl implements InvocationHandler, Notificati public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - final String methodName = getMethodName(method, args); + String methodName = method.getName(); if (methodName.equals("getMBeanServer")) { @@ -173,6 +173,7 @@ public class MBeanInvocationHandlerImpl implements InvocationHandler, Notificati security = _appRegistry.getVirtualHostRegistry().getVirtualHost(vhost).getSecurityManager(); } + methodName = getMethodName(method, args); if (isAccessMethod(methodName) || impact == MBeanOperationInfo.INFO) { // Check for read-only method invocation permission -- cgit v1.2.1