public class AdminAuthorizedMBeanServer extends Object
This class wraps the normal GlassFish MBeanServer with a security checker. If control reaches this class then the incoming connection has already authenticated successfully. This class decides, depending on exactly what the request wants to do and what MBean is involved, whether to allow the current request or not. If so, it delegates to the real MBeanServer; if not it throws an exception.
Currently we allow all access to non-AMX MBeans. This permits, for example, the normal operations to view JVM performance characteristics. If the attempted access concerns an AMX MBean and we're running in the DAS then we allow it - it's OK to adjust configuration via JMX to the DAS. But if this is a non-DAS instance we make sure the operation on the AMX MBean is read-only before allowing it.
Constructor and Description |
---|
AdminAuthorizedMBeanServer() |
Modifier and Type | Method and Description |
---|---|
static MBeanServerForwarder |
newInstance(MBeanServer mbs,
boolean isInstance)
Returns an MBeanServer that will check security and then forward requests
to the real MBeanServer.
|
public static MBeanServerForwarder newInstance(MBeanServer mbs, boolean isInstance)
mbs
- the real MBeanServer to which to delegateisInstance
- Copyright © 2019. All rights reserved.