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.

Variable Index

 o v

Constructor Index

 o AgentServerSecurityManager()
Build a vector of SecurityItems, one for each of the check methods in SecurityManager.

Method Index

 o checkAccept(String, int)
Checks to see if a socket connection to the specified port on the specified host has been accepted.
 o checkAccess(Thread)
Checks to see if the specified Thread is allowed to modify the Thread group.
 o checkAccess(ThreadGroup)
Checks to see if the specified Thread group is allowed to modify this group.
 o checkConnect(String, int)
Checks to see if a socket has connected to the specified port on the the specified host.
 o 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.
 o checkCreateClassLoader()
Checks to see if the ClassLoader has been created.
 o checkDelete(String)
Checks to see if a file with the specified system dependent file name can be deleted.
 o checkExec(String)
Checks to see if the system command is executed by trusted code.
 o checkExit(int)
Checks to see if the system has exited the virtual machine with an exit code.
 o checkLink(String)
Checks to see if the specified linked library exists.
 o checkListen(int)
Checks to see if a server socket is listening to the specified local port that it is bounded to.
 o checkPackageAccess(String)
Checks to see if an applet can access a package.
 o checkPackageDefinition(String)
Checks to see if an applet can define classes in a package.
 o checkPropertiesAccess()
Checks to see who has access to the System properties.
 o checkPropertyAccess(String)
Checks to see who has access to the System property named by key.
 o checkPropertyAccess(String, String)
Checks to see who has access to the System property named by key and def.
 o checkRead(FileDescriptor)
Checks to see if an input file with the specified file descriptor object gets created.
 o checkRead(String)
Checks to see if an input file with the specified system dependent file name gets created.
 o checkRead(String, Object)
Checks to see if the current context or the indicated context are both allowed to read the given file name.
 o checkSetFactory()
Checks to see if an applet can set a networking-related object factory.
 o checkTopLevelWindow(Object)
Checks to see if top-level windows can be created by the caller.
 o checkWrite(FileDescriptor)
Checks to see if an output file with the specified file descriptor object gets created.
 o checkWrite(String)
Checks to see if an output file with the specified system dependent file name gets created.
 o configure()
Allow the user to configure this security manager by filling out a SecurityDialog.
 o setFlagState(String, boolean)
Change the state of a SecurityItem based on the name of the item.

Variables

 o v
  public static Vector v

Constructors

 o 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.

Methods

 o 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.
 o configure
  public void configure()
Allow the user to configure this security manager by filling out a SecurityDialog.
 o 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
 o 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
 o 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
 o 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
 o 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
 o checkCreateClassLoader
  public void checkCreateClassLoader()
Checks to see if the ClassLoader has been created.
Overrides:
checkCreateClassLoader in class SecurityManager
 o 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
 o checkExec
  public void checkExec(String cmdname)
Checks to see if the system command is executed by trusted code.
Overrides:
checkExec in class SecurityManager
 o 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
 o checkLink
  public void checkLink(String libname)
Checks to see if the specified linked library exists.
Overrides:
checkLink in class SecurityManager
 o 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
 o checkPackageAccess
  public void checkPackageAccess(String pkgname)
Checks to see if an applet can access a package.
Overrides:
checkPackageAccess in class SecurityManager
 o checkPackageDefinition
  public void checkPackageDefinition(String pkgname)
Checks to see if an applet can define classes in a package.
Overrides:
checkPackageDefinition in class SecurityManager
 o checkPropertiesAccess
  public void checkPropertiesAccess()
Checks to see who has access to the System properties.
Overrides:
checkPropertiesAccess in class SecurityManager
 o checkPropertyAccess
  public void checkPropertyAccess(String property)
Checks to see who has access to the System property named by key.
Overrides:
checkPropertyAccess in class SecurityManager
 o 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
 o checkRead
  public void checkRead(FileDescriptor fd)
Checks to see if an input file with the specified file descriptor object gets created.
 o 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
 o 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
 o checkSetFactory
  public void checkSetFactory()
Checks to see if an applet can set a networking-related object factory.
Overrides:
checkSetFactory in class SecurityManager
 o checkTopLevelWindow
  public boolean checkTopLevelWindow(Object o)
Checks to see if top-level windows can be created by the caller.
Overrides:
checkTopLevelWindow in class SecurityManager
 o checkWrite
  public void checkWrite(FileDescriptor fd)
Checks to see if an output file with the specified file descriptor object gets created.
 o 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