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
-
AgentSecurityManager()
-
-
assessTrust(Object[])
- This is an undocumented feature of JDK 1.1.
-
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.
-
checkAccess(Thread)
- Throws a
SecurityException if the
calling thread is not allowed to modify the thread argument.
-
checkAccess(ThreadGroup)
- Throws a
SecurityException if the
calling thread is not allowed to modify the thread group argument.
-
checkAwtEventQueueAccess()
- Tests if a client can get access to the AWT event queue.
-
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.
-
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.
-
checkCreateClassLoader()
- Throws a
SecurityException if the
calling thread is not allowed to create a new class loader.
-
checkDelete(String)
- Throws a
SecurityException if the
calling thread is not allowed to delete the specified file.
-
checkExec(String)
- Throws a
SecurityException if the
calling thread is not allowed to create a subprocss.
-
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.
-
checkLink(String)
- Throws a
SecurityException if the
calling thread is not allowed to dynamic link the library code
specified by the string argument file.
-
checkListen(int)
- Throws a
SecurityException if the
calling thread is not allowed to wait for a connection request on
the specified local port number.
-
checkMemberAccess(Class, int)
- Tests if a client is allowed to access members.
-
checkMulticast(InetAddress)
- Tests if current execution context is allowed to use
(join/leave/send/receive) IP multicast.
-
checkMulticast(InetAddress, byte)
- Tests to see if current execution context is allowed to use
(join/leave/send/receive) IP multicast.
-
checkPackageAccess(String)
- Throws a
SecurityException if the
calling thread is not allowed to access the package specified by
the argument.
-
checkPackageDefinition(String)
- Throws a
SecurityException if the
calling thread is not allowed to define classes in the package
specified by the argument.
-
checkPrintJobAccess()
- Tests if a client can initiate a print job request.
-
checkPropertiesAccess()
- Throws a
SecurityException if the
calling thread is not allowed to access or modify the system
properties.
-
checkPropertyAccess(String)
- Throws a
SecurityException if the
calling thread is not allowed to access the system property with
the specified key name.
-
checkPropertyAccess(String, String)
-
-
checkRead(FileDescriptor)
- Throws a
SecurityException if the
calling thread is not allowed to read from the specified file
descriptor.
-
checkRead(String)
- Throws a
SecurityException if the
calling thread is not allowed to read the file specified by the
string argument.
-
checkRead(String, Object)
- Throws a
SecurityException if the
specified security context is not allowed to read the file
specified by the string argument.
-
checkSecurityAccess(String)
- Tests access to certain operations for a security API
action.
-
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.
-
checkSystemClipboardAccess()
- Tests if a client can get access to the system clipboard.
-
checkTopLevelWindow(Object)
- Returns
false if the calling
thread is not trusted to bring up the top-level window indicated
by the window argument.
-
checkWrite(FileDescriptor)
- Throws a
SecurityException if the
calling thread is not allowed to write to the specified file
descriptor.
-
checkWrite(String)
- Throws a
SecurityException if the
calling thread is not allowed to write to the file specified by
the string argument.
-
getClassVersion()
- Returns the version of this class.
AgentSecurityManager
public AgentSecurityManager()
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
checkPropertyAccess
public void checkPropertyAccess(String key,
String def)
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
checkPrintJobAccess
public void checkPrintJobAccess()
- Tests if a client can initiate a print job request.
- Overrides:
- checkPrintJobAccess in class SecurityManager
checkSystemClipboardAccess
public void checkSystemClipboardAccess()
- Tests if a client can get access to the system clipboard.
- Overrides:
- checkSystemClipboardAccess in class SecurityManager
checkAwtEventQueueAccess
public void checkAwtEventQueueAccess()
- Tests if a client can get access to the AWT event queue.
- Overrides:
- checkAwtEventQueueAccess in class SecurityManager
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
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
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
checkMemberAccess
public void checkMemberAccess(Class clazz,
int which)
- Tests if a client is allowed to access members.
- Overrides:
- checkMemberAccess in class SecurityManager
checkSecurityAccess
public void checkSecurityAccess(String provider)
- Tests access to certain operations for a security API
action.
- Overrides:
- checkSecurityAccess in class SecurityManager
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
getClassVersion
public String getClassVersion()
- Returns the version of this class.
All Packages Class Hierarchy This Package Previous Next Index