Class AgentServerSecurityManager
Class AgentServerSecurityManager
java.lang.Object
|
+----java.lang.SecurityManager
|
+----AgentServerSecurityManager
- class AgentServerSecurityManager
- extends SecurityManager
A class that implements security for the AgentServer.
Brute-force strategy that simply uses a flag for each of the
methods in SecurityManager. Can configure itself using a
SecurityDialog. Initializes with ALL ACCESS ALLOWED.
-
v
-
-
AgentServerSecurityManager()
- Build a vector of SecurityItems, one for each of the check
methods in SecurityManager.
-
checkAccept(String, int)
- Checks to see if a socket connection to the specified
port on the specified host has been accepted.
-
checkAccess(Thread)
- Checks to see if the specified Thread is allowed to
modify the Thread group.
-
checkAccess(ThreadGroup)
- Checks to see if the specified Thread group is allowed
to modify this group.
-
checkConnect(String, int)
- Checks to see if a socket has connected to the specified
port on the the specified host.
-
checkConnect(String, int, Object)
- Checks to see if the current execution context and the
indicated execution context are both allowed to connect to the
indicated host and port.
-
checkCreateClassLoader()
- Checks to see if the ClassLoader has been created.
-
checkDelete(String)
- Checks to see if a file with the specified system
dependent file name can be deleted.
-
checkExec(String)
- Checks to see if the system command is executed by
trusted code.
-
checkExit(int)
- Checks to see if the system has exited the virtual
machine with an exit code.
-
checkLink(String)
- Checks to see if the specified linked library exists.
-
checkListen(int)
- Checks to see if a server socket is listening to the
specified local port that it is bounded to.
-
checkPackageAccess(String)
- Checks to see if an applet can access a package.
-
checkPackageDefinition(String)
- Checks to see if an applet can define classes in a
package.
-
checkPropertiesAccess()
- Checks to see who has access to the System properties.
-
checkPropertyAccess(String)
- Checks to see who has access to the System property
named by key.
-
checkPropertyAccess(String, String)
- Checks to see who has access to the System property
named by key and def.
-
checkRead(FileDescriptor)
- Checks to see if an input file with the specified file
descriptor object gets created.
-
checkRead(String)
- Checks to see if an input file with the specified
system dependent file name gets created.
-
checkRead(String, Object)
- Checks to see if the current context or the indicated
context are both allowed to read the given file name.
-
checkSetFactory()
- Checks to see if an applet can set a
networking-related object factory.
-
checkTopLevelWindow(Object)
- Checks to see if top-level windows can be created by
the caller.
-
checkWrite(FileDescriptor)
- Checks to see if an output file with the specified
file descriptor object gets created.
-
checkWrite(String)
- Checks to see if an output file with the specified
system dependent file name gets created.
-
configure()
- Allow the user to configure this security manager by
filling out a SecurityDialog.
-
setFlagState(String, boolean)
- Change the state of a SecurityItem based on the name of the
item.
v
public static Vector v
AgentServerSecurityManager
public AgentServerSecurityManager()
- Build a vector of SecurityItems, one for each of the check
methods in SecurityManager. Initialize each SecurityItem to
true (access allowed). Can be changed later using configure.
setFlagState
public void setFlagState(String name,
boolean state)
- Change the state of a SecurityItem based on the name of the
item. This is called for each SecurityItem by the
SecurityDialog when the the OK button is hit.
- Parameters:
- name - The name of the SecurityItem.
- state - The state true/false we want to set the
SecurityItem to.
configure
public void configure()
- Allow the user to configure this security manager by
filling out a SecurityDialog.
checkAccept
public void checkAccept(String host,
int port)
- Checks to see if a socket connection to the specified
port on the specified host has been accepted.
- Overrides:
- checkAccept in class SecurityManager
checkAccess
public void checkAccess(Thread t)
- Checks to see if the specified Thread is allowed to
modify the Thread group.
- Overrides:
- checkAccess in class SecurityManager
checkAccess
public void checkAccess(ThreadGroup tg)
- Checks to see if the specified Thread group is allowed
to modify this group.
- Overrides:
- checkAccess in class SecurityManager
checkConnect
public void checkConnect(String host,
int port)
- Checks to see if a socket has connected to the specified
port on the the specified host.
- Overrides:
- checkConnect in class SecurityManager
checkConnect
public void checkConnect(String host,
int port,
Object o)
- Checks to see if the current execution context and the
indicated execution context are both allowed to connect to the
indicated host and port.
- Overrides:
- checkConnect in class SecurityManager
checkCreateClassLoader
public void checkCreateClassLoader()
- Checks to see if the ClassLoader has been created.
- Overrides:
- checkCreateClassLoader in class SecurityManager
checkDelete
public void checkDelete(String filename)
- Checks to see if a file with the specified system
dependent file name can be deleted.
- Overrides:
- checkDelete in class SecurityManager
checkExec
public void checkExec(String cmdname)
- Checks to see if the system command is executed by
trusted code.
- Overrides:
- checkExec in class SecurityManager
checkExit
public void checkExit(int i)
- Checks to see if the system has exited the virtual
machine with an exit code.
- Overrides:
- checkExit in class SecurityManager
checkLink
public void checkLink(String libname)
- Checks to see if the specified linked library exists.
- Overrides:
- checkLink in class SecurityManager
checkListen
public void checkListen(int port)
- Checks to see if a server socket is listening to the
specified local port that it is bounded to.
- Overrides:
- checkListen in class SecurityManager
checkPackageAccess
public void checkPackageAccess(String pkgname)
- Checks to see if an applet can access a package.
- Overrides:
- checkPackageAccess in class SecurityManager
checkPackageDefinition
public void checkPackageDefinition(String pkgname)
- Checks to see if an applet can define classes in a
package.
- Overrides:
- checkPackageDefinition in class SecurityManager
checkPropertiesAccess
public void checkPropertiesAccess()
- Checks to see who has access to the System properties.
- Overrides:
- checkPropertiesAccess in class SecurityManager
checkPropertyAccess
public void checkPropertyAccess(String property)
- Checks to see who has access to the System property
named by key.
- Overrides:
- checkPropertyAccess in class SecurityManager
checkPropertyAccess
public void checkPropertyAccess(String property,
String s)
- Checks to see who has access to the System property
named by key and def.
- Overrides:
- checkPropertyAccess in class SecurityManager
checkRead
public void checkRead(FileDescriptor fd)
- Checks to see if an input file with the specified file
descriptor object gets created.
checkRead
public void checkRead(String filename)
- Checks to see if an input file with the specified
system dependent file name gets created.
- Overrides:
- checkRead in class SecurityManager
checkRead
public void checkRead(String filename,
Object o)
- Checks to see if the current context or the indicated
context are both allowed to read the given file name.
- Overrides:
- checkRead in class SecurityManager
checkSetFactory
public void checkSetFactory()
- Checks to see if an applet can set a
networking-related object factory.
- Overrides:
- checkSetFactory in class SecurityManager
checkTopLevelWindow
public boolean checkTopLevelWindow(Object o)
- Checks to see if top-level windows can be created by
the caller.
- Overrides:
- checkTopLevelWindow in class SecurityManager
checkWrite
public void checkWrite(FileDescriptor fd)
- Checks to see if an output file with the specified
file descriptor object gets created.
checkWrite
public void checkWrite(String filename)
- Checks to see if an output file with the specified
system dependent file name gets created.
- Overrides:
- checkWrite in class SecurityManager