public interface JMXSecurityMBean
Modifier and Type | Interface and Description |
---|---|
static class |
JMXSecurityMBean.SecurityMBeanOpenTypeInitializer |
Modifier and Type | Field and Description |
---|---|
static String[] |
CAN_INVOKE_RESULT_COLUMNS
The columns contained in a
CAN_INVOKE_RESULT_ROW_TYPE . |
static CompositeType |
CAN_INVOKE_RESULT_ROW_TYPE
A row as returned by the
CAN_INVOKE_TABULAR_TYPE . |
static TabularType |
CAN_INVOKE_TABULAR_TYPE
The Tabular Type returned by the
canInvoke(Map) operation. |
Modifier and Type | Method and Description |
---|---|
TabularData |
canInvoke(Map<String,List<String>> bulkQuery)
Bulk operation to check whether the current user can access the requested MBeans or invoke the
requested methods.
|
boolean |
canInvoke(String objectName)
Checks whether the current user can invoke any methods on a JMX MBean.
|
boolean |
canInvoke(String objectName,
String methodName)
Checks whether the current user can invoke any overload of the given method.
|
boolean |
canInvoke(String objectName,
String methodName,
String[] argumentTypes)
Checks whether the current user can invoke the given method.
|
static final TabularType CAN_INVOKE_TABULAR_TYPE
canInvoke(Map)
operation. The rows consist of
CAN_INVOKE_RESULT_ROW_TYPE
entries.
It has a composite key with consists of the "ObjectName" and "Method" columns.static final CompositeType CAN_INVOKE_RESULT_ROW_TYPE
CAN_INVOKE_TABULAR_TYPE
. The columns of the row are defined
by CAN_INVOKE_RESULT_COLUMNS
.static final String[] CAN_INVOKE_RESULT_COLUMNS
CAN_INVOKE_RESULT_ROW_TYPE
. The data types for these columns are
as follows:
SimpleType.STRING
SimpleType.STRING
SimpleType.BOOLEAN
boolean canInvoke(String objectName) throws Exception
objectName
- The Object Name of the JMX MBean.true
if there is at least one method on the MBean that the
user can invoke.Exception
boolean canInvoke(String objectName, String methodName) throws Exception
objectName
- The Object Name of the JMX MBean.methodName
- The name of the method to check.true
if there is an overload of the specified method that the
user can invoke.Exception
boolean canInvoke(String objectName, String methodName, String[] argumentTypes) throws Exception
objectName
- The Object Name of the JMX MBean.methodName
- The name of the method to check.argumentTypes
- The argument types of to method.true
if the user is allowed to invoke the method, or any of the methods with
the given name if null
is used for the arguments. There may still
be certain values that the user does not have permission to pass to the method.Exception
TabularData canInvoke(Map<String,List<String>> bulkQuery) throws Exception
bulkQuery
- A map of Object Name to requested operations. Operations can be specified
with or without arguments types. An operation without arguments matches any overloaded method
with this name. If an empty list is provided for the operation names, a check is done whether the
current user can invoke any operation on the MBean.
Example:
Map<String, List<String>> query = new HashMap<>();
String objectName = "org.acme:type=SomeMBean";
query.put(objectName, Arrays.asList(
"testMethod(long,java.lang.String)", // check this testMethod
"otherMethod")); // check any overload of otherMethod
query.put("org.acme:type=SomeOtherMBean",
Collections.<String>emptyList()); // check any method of SomeOtherMBean
TabularData result = mb.canInvoke(query);
CAN_INVOKE_TABULAR_TYPE
.Exception
Copyright © 2022 JBoss by Red Hat. All rights reserved.