Java Dynamic Management Kit 3.2 Programming Guide | ||||
---|---|---|---|---|
![]() | ![]() | Chapter 11. Security | ![]() | ![]() |
The default JavaŽ 2 SDK permissions have been extended in the Java Dynamic Management Kit to protect the framework and public static methods from unauthorized code.
When any code attempts to perform an operation on the framework, the framework checks for the required framework permissions implemented by the com.sun.jaw.reference.agent.cmf.FrameworkPermission class. The com.sun.jaw.reference.agent.cmf.FrameworkPermission class represents a permission and a set of target names that define the permission, as shown in Table 11-1. These permissions must be granted to your application using policytool.
Table 11-1. Framework Extended Permissions
Target Name | Checked in Methods |
accessCoreMethods | getMoRepSrvIf() |
getFilterSrvIf() | |
setFilterSrvIf() | |
getClassLoader() | |
setClassLoader() | |
getRelationSrvIf() | |
setRelationSrvIf() | |
getMetaDataSrvIf() | |
setMetaDataSrvIf() | |
getThreadAllocatorSrvIf() | |
setThreadAllocatorSrvIf() | |
accessObjects | contains() |
getClass() | |
getObject() | |
retrieveObject() | |
registerObjects | newObj() |
addObject() | |
addDBObject() | |
newObject() | |
newDBObject() | |
initCmfInvoker() | |
unregisterObjects | delObject() |
fastDelObject() | |
accessRelationMethods | addRelation() |
newRelation() | |
getRelations() |
When any code attempts to invoke one of the Java Dynamic Management Kit public static methods shown in Table 11-2, the required permission defined by the com.sun.jaw.reference.common.JawStaticMethodPermission class is checked. The com.sun.jaw.reference.common.JawStaticMethodPermission class represents a permission and a set of target names that define the permission. These permissions must be granted to your application using policytool. In this case, the target name is the fully qualified name of the Java class containing the public static method.
Table 11-2. Public Static Methods Extended Permissions
Target Name | Checked in Methods |
com.sun.jaw.reference.common.Debug | |
public static PrintWriter getLog() | |
public static boolean isLevelSet(int atLevel) | |
public static int getLevel() | |
public static void flush() | |
public static void parseDebugProperties() | |
public static void print(Object arg) | |
public static void print(boolean condition, Object arg) | |
public static void print(int atLevel, Object arg) | |
public static void printException(Exception e) | |
public static void printFormatted(Object arg) | |
public static void println(Object arg) | |
public static void println(boolean condition, Object arg) | |
public static void println(int atLevel, Object arg) | |
public static void setDefault(boolean mode) | |
public static void setLevel(int l) | |
public static void setLog(PrintWriter l) | |
public static void setOff(int forLevel) | |
public static void setOffAll() | |
public static void setOn(int forLevel) | |
public static void setOnAll() | |
com.sun.jaw.reference.common.LoaderRepository | |
public static void addClassLoader() | |
public static Class loadClass() | |
public static Class loadClassWithout() | |
public static void removeClassLoader() | |
com.sun.jaw.impl.common.DefaultPaths | |
public static void setEtcDir() | |
public static void setInstallDir() | |
public static void setTmpDir() | |
public static void setVarDir() |
![]() | ![]() | ![]() |
Running an Agent | ![]() | Security in Class Loading Services |