public final class SystemPermission
extends java.security.BasicPermission
Permission | Description | Risk |
---|---|---|
"jmx" "control" | Controls the ability of JMX clients to control Derby and view security sensitive attributes through Derby's MBeans. | JMX clients may be able to change the state of the running system |
"jmx" "monitor" | Controls the ability of JMX clients to
monitor Derby through Derby's MBeans, such as viewing number of current connections and
configuration settings. Note: security related settings require control
action on jmx | JMX clients can see information about a runing system including software versions. |
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
actions
Actions for this permission.
|
static java.lang.String |
CONTROL
Action (
"control" ) to perform control actions through JMX
on engine, server or jmx. |
static java.lang.String |
ENGINE
Permission target name (
"engine" ) for actions applicable
to the core database engine. |
static java.lang.String |
JMX
Permission target name (
"jmx" ) for actions applicable
to management of Derby's JMX MBeans. |
private static java.util.List<java.lang.String> |
LEGAL_ACTIONS
Set of legal actions in their canonical form.
|
private static java.util.Set<java.lang.String> |
LEGAL_NAMES
The legal system permission names.
|
static java.lang.String |
MONITOR
Action (
"monitor" ) to perform monitoring actions through JMX
on engine and server. |
private static long |
serialVersionUID |
static java.lang.String |
SERVER
Permission target name (
"server" ) for actions applicable
to the network server. |
static java.lang.String |
SHUTDOWN
The server and engine shutdown action (
"shutdown" ). |
Constructor and Description |
---|
SystemPermission(java.lang.String name,
java.lang.String actions)
Creates a new SystemPermission with the specified name.
|
Modifier and Type | Method and Description |
---|---|
(package private) static java.lang.String |
buildActionsString(java.lang.Iterable<java.lang.String> actions)
Build a comma-separated actions string suitable for returning from
getActions() . |
boolean |
equals(java.lang.Object other)
Does this permission equal another object.
|
private static int |
getActionMask(java.lang.String actions)
Get a mask of bits that represents the actions
and can be used for the implies method.
|
java.lang.String |
getActions()
Return the permission's actions in a canonical form.
|
private static java.lang.String |
getCanonicalForm(java.lang.String actions)
Return a canonical form of the passed in actions.
|
boolean |
implies(java.security.Permission permission)
Does this permission imply another.
|
(package private) static java.util.Set<java.lang.String> |
parseActions(java.lang.String actions)
Get a set of all actions specified in a string.
|
private void |
readObject(java.io.ObjectInputStream s)
Called upon deserialization for restoring the state of this
SystemPermission from a stream.
|
private void |
validateNameAndActions(java.lang.String name,
java.lang.String actions)
Check if name and actions are valid, and normalize the actions
string.
|
private static final long serialVersionUID
public static final java.lang.String SERVER
"server"
) for actions applicable
to the network server.public static final java.lang.String ENGINE
"engine"
) for actions applicable
to the core database engine.public static final java.lang.String JMX
"jmx"
) for actions applicable
to management of Derby's JMX MBeans.public static final java.lang.String SHUTDOWN
"shutdown"
).public static final java.lang.String CONTROL
"control"
) to perform control actions through JMX
on engine, server or jmx.
For JMX control permission is required to get attributes that are deemed sensiive from a security aspect, such as the network server's port number, security mechanisms and any information about the file system.
public static final java.lang.String MONITOR
"monitor"
) to perform monitoring actions through JMX
on engine and server.private static final java.util.Set<java.lang.String> LEGAL_NAMES
private static final java.util.List<java.lang.String> LEGAL_ACTIONS
private java.lang.String actions
public SystemPermission(java.lang.String name, java.lang.String actions)
name
- the name of the SystemPermissionjava.lang.NullPointerException
- if name or actions is nulljava.lang.IllegalArgumentException
- if name is empty or not a legal SystemPermissionBasicPermission.BasicPermission(String)
private void validateNameAndActions(java.lang.String name, java.lang.String actions)
name
- the name of the permissionactions
- the actions of the permissionjava.lang.NullPointerException
- if actions is nulljava.lang.IllegalArgumentException
- if name is not a legal SystemPermissionpublic java.lang.String getActions()
getActions
in class java.security.BasicPermission
private static java.lang.String getCanonicalForm(java.lang.String actions)
static java.util.Set<java.lang.String> parseActions(java.lang.String actions)
actions
- the specified actions stringstatic java.lang.String buildActionsString(java.lang.Iterable<java.lang.String> actions)
getActions()
.actions
- the list of actionspublic boolean equals(java.lang.Object other)
equals
in class java.security.BasicPermission
public boolean implies(java.security.Permission permission)
implies
in class java.security.BasicPermission
private static int getActionMask(java.lang.String actions)
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
Apache Derby V10.11 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.