java.lang.Object | |
↳ | com.sun.jmx.remote.security.MBeanServerAccessController |
![]() |
An object of this class implements the MBeanServer interface and, for each of its methods, calls an appropriate checking method and then forwards the request to a wrapped MBeanServer object. The checking method may throw a RuntimeException if the operation is not allowed; in this case the request is not forwarded to the wrapped object.
A typical use of this class is to insert it between a connector server
such as the RMI connector and the MBeanServer with which the connector
is associated. Requests from the connector client can then be filtered
and those operations that are not allowed, or not allowed in a particular
context, can be rejected by throwing a SecurityException
in the corresponding check*
method.
This is an abstract class, because in its implementation none of the checking methods does anything. To be useful, it must be subclassed and at least one of the checking methods overridden to do some checking. Some or all of the MBeanServer methods may also be overridden, for instance if the default checking behavior is inappropriate.
If there is no SecurityManager, then the access controller will refuse to create an MBean that is a ClassLoader, which includes MLets, or to execute the method addURL on an MBean that is an MLet. This prevents people from opening security holes unintentionally. Otherwise, it would not be obvious that granting write access grants the ability to download and execute arbitrary code in the target MBean server. Advanced users who do want the ability to use MLets are presumably advanced enough to handle policy files and security managers.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkCreate(className) , then forward this method to the
wrapped object. | |||||||||||
Call
checkCreate(className) , then forward this method to the
wrapped object. | |||||||||||
Call
checkCreate(className) , then forward this method to the
wrapped object. | |||||||||||
Call
checkCreate(className) , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Returns the MBeanServer object to which requests will be forwarded.
| |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkCreate(className) , then forward this method to the
wrapped object. | |||||||||||
Call
checkCreate(className) , then forward this method to the
wrapped object. | |||||||||||
Call
checkCreate(className) , then forward this method to the
wrapped object. | |||||||||||
Call
checkCreate(className) , then forward this method to the
wrapped object. | |||||||||||
Call
checkWrite() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkWrite() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkRead() , then forward this method to the
wrapped object. | |||||||||||
Call
checkWrite() , then forward this method to the
wrapped object. | |||||||||||
Call
checkWrite() , then forward this method to the
wrapped object. | |||||||||||
Sets the MBeanServer object to which requests will be forwarded
after treatment by this object.
| |||||||||||
Call
checkUnregister() , then forward this method to the
wrapped object. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check if the caller can create the named class.
| |||||||||||
Check if the caller can do read operations.
| |||||||||||
Check if the caller can unregister the named MBean.
| |||||||||||
Check if the caller can do write operations.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Call checkRead()
, then forward this method to the
wrapped object.
name | The name of the MBean on which the listener should be added. |
---|---|
listener | The listener object which will handle the notifications emitted by the registered MBean. |
filter | The filter object. If filter is null, no filtering will be performed before handling notifications. |
handback | The context to be sent to the listener when a notification is emitted. |
InstanceNotFoundException |
---|
Call checkRead()
, then forward this method to the
wrapped object.
name | The name of the MBean on which the listener should be added. |
---|---|
listener | The object name of the listener which will handle the notifications emitted by the registered MBean. |
filter | The filter object. If filter is null, no filtering will be performed before handling notifications. |
handback | The context to be sent to the listener when a notification is emitted. |
InstanceNotFoundException |
---|
Call checkCreate(className)
, then forward this method to the
wrapped object.
className | The class name of the MBean to be instantiated. |
---|---|
name | The object name of the MBean. May be null. |
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.Call checkCreate(className)
, then forward this method to the
wrapped object.
className | The class name of the MBean to be instantiated. |
---|---|
name | The object name of the MBean. May be null. |
params | An array containing the parameters of the constructor to be invoked. |
signature | An array containing the signature of the constructor to be invoked. |
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.Call checkCreate(className)
, then forward this method to the
wrapped object.
className | The class name of the MBean to be instantiated. |
---|---|
name | The object name of the MBean. May be null. |
loaderName | The object name of the class loader to be used. |
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.Call checkCreate(className)
, then forward this method to the
wrapped object.
className | The class name of the MBean to be instantiated. |
---|---|
name | The object name of the MBean. May be null. |
loaderName | The object name of the class loader to be used. |
params | An array containing the parameters of the constructor to be invoked. |
signature | An array containing the signature of the constructor to be invoked. |
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.Call checkRead()
, then forward this method to the
wrapped object.
name | The name of the MBean whose class loader should be used for the de-serialization. |
---|---|
data | The byte array to be de-sererialized. |
Call checkRead()
, then forward this method to the
wrapped object.
className | The name of the class whose class loader should be used for the de-serialization. |
---|---|
loaderName | The name of the class loader to be used for loading the specified class. If null, the MBean Server's class loader will be used. |
data | The byte array to be de-sererialized. |
Call checkRead()
, then forward this method to the
wrapped object.
className | The name of the class whose class loader should be used for the de-serialization. |
---|---|
data | The byte array to be de-sererialized. |
Call checkRead()
, then forward this method to the
wrapped object.
name | The object name of the MBean from which the attribute is to be retrieved. |
---|---|
attribute | A String specifying the name of the attribute to be retrieved. |
Call checkRead()
, then forward this method to the
wrapped object.
name | The object name of the MBean from which the attributes are retrieved. |
---|---|
attributes | A list of the attributes to be retrieved. |
Call checkRead()
, then forward this method to the
wrapped object.
loaderName | The ObjectName of the ClassLoader. May be null, in which case the MBean server's own ClassLoader is returned. |
---|
.loadClass(s)
is the
same as l.loadClass(s)
for any string s.
InstanceNotFoundException |
---|
Call checkRead()
, then forward this method to the
wrapped object.
mbeanName | The ObjectName of the MBean. |
---|
.loadClass(s)
is the
same as l.loadClass(s)
for any string s.
InstanceNotFoundException |
---|
Call checkRead()
, then forward this method to the
wrapped object.
Call checkRead()
, then forward this method to the
wrapped object.
Call checkRead()
, then forward this method to the
wrapped object.
Call checkRead()
, then forward this method to the
wrapped object.
Call checkRead()
, then forward this method to the
wrapped object.
name | The name of the MBean to analyze |
---|
MBeanInfo
allowing the
retrieval of all attributes and operations of this MBean.Returns the MBeanServer object to which requests will be forwarded.
Call checkRead()
, then forward this method to the
wrapped object.
name | The object name of the MBean. |
---|
ObjectInstance
associated with the MBean
specified by name. The contained ObjectName
is name
and the contained class name is
getMBeanInfo(name)
.getClassName()
.InstanceNotFoundException |
---|
Call checkCreate(className)
, then forward this method to the
wrapped object.
className | The class name of the object to be instantiated. |
---|---|
loaderName | The object name of the class loader to be used. |
params | An array containing the parameters of the constructor to be invoked. |
signature | An array containing the signature of the constructor to be invoked. |
Call checkCreate(className)
, then forward this method to the
wrapped object.
className | The class name of the object to be instantiated. |
---|---|
params | An array containing the parameters of the constructor to be invoked. |
signature | An array containing the signature of the constructor to be invoked. |
Call checkCreate(className)
, then forward this method to the
wrapped object.
className | The class name of the object to be instantiated. |
---|
Call checkCreate(className)
, then forward this method to the
wrapped object.
className | The class name of the MBean to be instantiated. |
---|---|
loaderName | The object name of the class loader to be used. |
Call checkWrite()
, then forward this method to the
wrapped object.
name | The object name of the MBean on which the method is to be invoked. |
---|---|
operationName | The name of the operation to be invoked. |
params | An array containing the parameters to be set when the operation is invoked |
signature | An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked. |
Call checkRead()
, then forward this method to the
wrapped object.
name | The ObjectName of the MBean. |
---|---|
className | The name of the class. |
InstanceNotFoundException |
---|
Call checkRead()
, then forward this method to the
wrapped object.
name | The object name of the MBean to be checked. |
---|
Call checkRead()
, then forward this method to the
wrapped object.
name | The object name pattern identifying the MBeans to be retrieved. If null or no domain and key properties are specified, all the MBeans registered will be retrieved. |
---|---|
query | The query expression to be applied for selecting MBeans. If null no query expression will be applied for selecting MBeans. |
ObjectInstance
objects for the selected MBeans. If no MBean satisfies the
query an empty list is returned.Call checkRead()
, then forward this method to the
wrapped object.
name | The object name pattern identifying the MBean names to be retrieved. If null or no domain and key properties are specified, the name of all registered MBeans will be retrieved. |
---|---|
query | The query expression to be applied for selecting MBeans. If null no query expression will be applied for selecting MBeans. |
Call checkWrite()
, then forward this method to the
wrapped object.
object | The MBean to be registered as an MBean. |
---|---|
name | The object name of the MBean. May be null. |
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
registered MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.Call checkRead()
, then forward this method to the
wrapped object.
name | The name of the MBean on which the listener should be removed. |
---|---|
listener | The object name of the listener to be removed. |
filter | The filter that was specified when the listener was added. |
handback | The handback that was specified when the listener was added. |
Call checkRead()
, then forward this method to the
wrapped object.
name | The name of the MBean on which the listener should be removed. |
---|---|
listener | The object name of the listener to be removed. |
Call checkRead()
, then forward this method to the
wrapped object.
name | The name of the MBean on which the listener should be removed. |
---|---|
listener | The listener to be removed. |
Call checkRead()
, then forward this method to the
wrapped object.
name | The name of the MBean on which the listener should be removed. |
---|---|
listener | The listener to be removed. |
filter | The filter that was specified when the listener was added. |
handback | The handback that was specified when the listener was added. |
Call checkWrite()
, then forward this method to the
wrapped object.
name | The name of the MBean within which the attribute is to be set. |
---|---|
attribute | The identification of the attribute to be set and the value it is to be set to. |
Call checkWrite()
, then forward this method to the
wrapped object.
name | The object name of the MBean within which the attributes are to be set. |
---|---|
attributes | A list of attributes: The identification of the attributes to be set and the values they are to be set to. |
Sets the MBeanServer object to which requests will be forwarded after treatment by this object.
mbs | the MBeanServer object to which requests will be forwarded. |
---|
Call checkUnregister()
, then forward this method to the
wrapped object.
name | The object name of the MBean to be unregistered. |
---|
Check if the caller can create the named class. The default
implementation of this method calls checkWrite()
.
Check if the caller can do read operations. This method does nothing if so, otherwise throws SecurityException.
Check if the caller can unregister the named MBean. The default
implementation of this method calls checkWrite()
.
Check if the caller can do write operations. This method does nothing if so, otherwise throws SecurityException.