All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.agent.services.security.AgentSecurityManager

java.lang.Object
   |
   +----java.lang.SecurityManager
           |
           +----com.sun.jaw.impl.agent.services.security.AgentSecurityManager

public class AgentSecurityManager
extends SecurityManager
This class provides a simple implementation of a Security Manager allowing basically everything. The default behavior of the JAVA virtual machine forbids to load classes and native libraries from the network. To enable these features the default security manager must be replaced by AgentSecurityManager. When an agent needs to download new classes and native libraries through a NetClassLoader it must instantiate a security manager and replace the default one by adding the following line in its startup sequence : System.setSecurityManager(new AgentSecurityManager()) ;

See Also:
SecurityManager

Constructor Index

 o AgentSecurityManager()

Method Index

 o assessTrust(Object[])
This is an undocumented feature of JDK 1.1.
 o checkAccept(String, int)
Throws a SecurityException if the calling thread is not permitted to accept a socket connection from the specified host and port number.
 o checkAccess(Thread)
Throws a SecurityException if the calling thread is not allowed to modify the thread argument.
 o checkAccess(ThreadGroup)
Throws a SecurityException if the calling thread is not allowed to modify the thread group argument.
 o checkAwtEventQueueAccess()
Tests if a client can get access to the AWT event queue.
 o checkConnect(String, int)
Throws a SecurityException if the calling thread is not allowed to open a socket connection to the specified host and port number.
 o checkConnect(String, int, Object)
Throws a SecurityException if the specified security context is not allowed to open a socket connection to the specified host and port number.
 o checkCreateClassLoader()
Throws a SecurityException if the calling thread is not allowed to create a new class loader.
 o checkDelete(String)
Throws a SecurityException if the calling thread is not allowed to delete the specified file.
 o checkExec(String)
Throws a SecurityException if the calling thread is not allowed to create a subprocss.
 o checkExit(int)
Throws a SecurityException if the calling thread is not allowed to cause the Java Virtual Machine to halt with the specified status code.
 o checkLink(String)
Throws a SecurityException if the calling thread is not allowed to dynamic link the library code specified by the string argument file.
 o checkListen(int)
Throws a SecurityException if the calling thread is not allowed to wait for a connection request on the specified local port number.
 o checkMemberAccess(Class, int)
Tests if a client is allowed to access members.
 o checkMulticast(InetAddress)
Tests if current execution context is allowed to use (join/leave/send/receive) IP multicast.
 o checkMulticast(InetAddress, byte)
Tests to see if current execution context is allowed to use (join/leave/send/receive) IP multicast.
 o checkPackageAccess(String)
Throws a SecurityException if the calling thread is not allowed to access the package specified by the argument.
 o checkPackageDefinition(String)
Throws a SecurityException if the calling thread is not allowed to define classes in the package specified by the argument.
 o checkPrintJobAccess()
Tests if a client can initiate a print job request.
 o checkPropertiesAccess()
Throws a SecurityException if the calling thread is not allowed to access or modify the system properties.
 o checkPropertyAccess(String)
Throws a SecurityException if the calling thread is not allowed to access the system property with the specified key name.
 o checkPropertyAccess(String, String)
 o checkRead(FileDescriptor)
Throws a SecurityException if the calling thread is not allowed to read from the specified file descriptor.
 o checkRead(String)
Throws a SecurityException if the calling thread is not allowed to read the file specified by the string argument.
 o checkRead(String, Object)
Throws a SecurityException if the specified security context is not allowed to read the file specified by the string argument.
 o checkSecurityAccess(String)
Tests access to certain operations for a security API action.
 o checkSetFactory()
Throws a SecurityException if the calling thread is not allowed to set the socket factory used by ServerSocket or Socket, or the stream handler factory used by URL.
 o checkSystemClipboardAccess()
Tests if a client can get access to the system clipboard.
 o checkTopLevelWindow(Object)
Returns false if the calling thread is not trusted to bring up the top-level window indicated by the window argument.
 o checkWrite(FileDescriptor)
Throws a SecurityException if the calling thread is not allowed to write to the specified file descriptor.
 o checkWrite(String)
Throws a SecurityException if the calling thread is not allowed to write to the file specified by the string argument.
 o getClassVersion()
Returns the version of this class.

Constructors

 o AgentSecurityManager
 public AgentSecurityManager()

Methods

 o checkCreateClassLoader
 public void checkCreateClassLoader()
Throws a SecurityException if the calling thread is not allowed to create a new class loader.

Overrides:
checkCreateClassLoader in class SecurityManager
 o checkAccess
 public void checkAccess(Thread g)
Throws a SecurityException if the calling thread is not allowed to modify the thread argument.

Overrides:
checkAccess in class SecurityManager
 o checkAccess
 public void checkAccess(ThreadGroup g)
Throws a SecurityException if the calling thread is not allowed to modify the thread group argument.

Overrides:
checkAccess in class SecurityManager
 o checkExit
 public void checkExit(int status)
Throws a SecurityException if the calling thread is not allowed to cause the Java Virtual Machine to halt with the specified status code.

Overrides:
checkExit in class SecurityManager
 o checkExec
 public void checkExec(String cmd)
Throws a SecurityException if the calling thread is not allowed to create a subprocss.

Overrides:
checkExec in class SecurityManager
 o checkLink
 public void checkLink(String lib)
Throws a SecurityException if the calling thread is not allowed to dynamic link the library code specified by the string argument file.

Overrides:
checkLink in class SecurityManager
 o checkRead
 public void checkRead(FileDescriptor fd)
Throws a SecurityException if the calling thread is not allowed to read from the specified file descriptor.

Overrides:
checkRead in class SecurityManager
 o checkRead
 public void checkRead(String file)
Throws a SecurityException if the calling thread is not allowed to read the file specified by the string argument.

Overrides:
checkRead in class SecurityManager
 o checkRead
 public void checkRead(String file,
                       Object context)
Throws a SecurityException if the specified security context is not allowed to read the file specified by the string argument.

Overrides:
checkRead in class SecurityManager
 o checkWrite
 public void checkWrite(FileDescriptor fd)
Throws a SecurityException if the calling thread is not allowed to write to the specified file descriptor.

Overrides:
checkWrite in class SecurityManager
 o checkWrite
 public void checkWrite(String file)
Throws a SecurityException if the calling thread is not allowed to write to the file specified by the string argument.

Overrides:
checkWrite in class SecurityManager
 o checkDelete
 public void checkDelete(String file)
Throws a SecurityException if the calling thread is not allowed to delete the specified file.

Overrides:
checkDelete in class SecurityManager
 o checkConnect
 public void checkConnect(String host,
                          int port)
Throws a SecurityException if the calling thread is not allowed to open a socket connection to the specified host and port number.

Overrides:
checkConnect in class SecurityManager
 o checkConnect
 public void checkConnect(String host,
                          int port,
                          Object context)
Throws a SecurityException if the specified security context is not allowed to open a socket connection to the specified host and port number.

Overrides:
checkConnect in class SecurityManager
 o checkListen
 public void checkListen(int port)
Throws a SecurityException if the calling thread is not allowed to wait for a connection request on the specified local port number.

Overrides:
checkListen in class SecurityManager
 o checkAccept
 public void checkAccept(String host,
                         int port)
Throws a SecurityException if the calling thread is not permitted to accept a socket connection from the specified host and port number.

Overrides:
checkAccept in class SecurityManager
 o checkMulticast
 public void checkMulticast(InetAddress maddr)
Tests if current execution context is allowed to use (join/leave/send/receive) IP multicast.

Overrides:
checkMulticast in class SecurityManager
 o checkMulticast
 public void checkMulticast(InetAddress maddr,
                            byte ttl)
Tests to see if current execution context is allowed to use (join/leave/send/receive) IP multicast.

Overrides:
checkMulticast in class SecurityManager
 o checkPropertiesAccess
 public void checkPropertiesAccess()
Throws a SecurityException if the calling thread is not allowed to access or modify the system properties.

Overrides:
checkPropertiesAccess in class SecurityManager
 o checkPropertyAccess
 public void checkPropertyAccess(String key)
Throws a SecurityException if the calling thread is not allowed to access the system property with the specified key name.

Overrides:
checkPropertyAccess in class SecurityManager
 o checkPropertyAccess
 public void checkPropertyAccess(String key,
                                 String def)
 o checkTopLevelWindow
 public boolean checkTopLevelWindow(Object window)
Returns false if the calling thread is not trusted to bring up the top-level window indicated by the window argument.

Overrides:
checkTopLevelWindow in class SecurityManager
 o checkPrintJobAccess
 public void checkPrintJobAccess()
Tests if a client can initiate a print job request.

Overrides:
checkPrintJobAccess in class SecurityManager
 o checkSystemClipboardAccess
 public void checkSystemClipboardAccess()
Tests if a client can get access to the system clipboard.

Overrides:
checkSystemClipboardAccess in class SecurityManager
 o checkAwtEventQueueAccess
 public void checkAwtEventQueueAccess()
Tests if a client can get access to the AWT event queue.

Overrides:
checkAwtEventQueueAccess in class SecurityManager
 o checkPackageAccess
 public void checkPackageAccess(String pkg)
Throws a SecurityException if the calling thread is not allowed to access the package specified by the argument.

Overrides:
checkPackageAccess in class SecurityManager
 o checkPackageDefinition
 public void checkPackageDefinition(String pkg)
Throws a SecurityException if the calling thread is not allowed to define classes in the package specified by the argument.

Overrides:
checkPackageDefinition in class SecurityManager
 o checkSetFactory
 public void checkSetFactory()
Throws a SecurityException if the calling thread is not allowed to set the socket factory used by ServerSocket or Socket, or the stream handler factory used by URL.

Overrides:
checkSetFactory in class SecurityManager
 o checkMemberAccess
 public void checkMemberAccess(Class clazz,
                               int which)
Tests if a client is allowed to access members.

Overrides:
checkMemberAccess in class SecurityManager
 o checkSecurityAccess
 public void checkSecurityAccess(String provider)
Tests access to certain operations for a security API action.

Overrides:
checkSecurityAccess in class SecurityManager
 o assessTrust
 public boolean assessTrust(Object signers[])
This is an undocumented feature of JDK 1.1. When loading a class containing native code through a specific class loader, the VM will only allow the invocation of native method if the class (and all the classes it uses) is signed and the assessTrust method of the security manager in place recognizes the signers

 o getClassVersion
 public String getClassVersion()
Returns the version of this class.


All Packages  Class Hierarchy  This Package  Previous  Next  Index