org.apache.catalina.security
Class SecurityUtil
java.lang.Objectorg.apache.catalina.security.SecurityUtil
public final class SecurityUtil
extends java.lang.Object
This utility class associates a Subject to the current
AccessControlContext. When a SecurityManager is
used, * the container will always associate the called thread with an
AccessControlContext * containing only the principal of the requested
Servlet/Filter.
This class uses reflection to invoke the invoke methods.
- Jean-Francois Arcand
static void | doAsPrivilege(String methodName, Filter targetObject)- Perform work as a particular Subject.
|
static void | doAsPrivilege(String methodName, Filter targetObject, Class[] targetType, Object[] targetArguments)- Perform work as a particular Subject.
|
static void | doAsPrivilege(String methodName, Servlet targetObject)- Perform work as a particular Subject.
|
static void | doAsPrivilege(String methodName, Servlet targetObject, Class[] targetType, Object[] targetArguments)- Perform work as a particular Subject.
|
static void | doAsPrivilege(String methodName, Servlet targetObject, Class[] targetType, Object[] targetArguments, Principal principal)- Perform work as a particular Subject.
|
static boolean | isPackageProtectionEnabled()- Return the
SecurityManager only if Security is enabled AND
package protection mechanism is enabled.
|
static void | remove(Object cachedObject)- Remove the object from the cache.
|
doAsPrivilege
public static void doAsPrivilege(String methodName,
Filter targetObject)
throws java.lang.Exception Perform work as a particular Subject. Here the work
will be granted to a null subject.
methodName - the method to apply the security restrictiontargetObject - the Filter on which the method will
be called.
doAsPrivilege
public static void doAsPrivilege(String methodName,
Filter targetObject,
Class[] targetType,
Object[] targetArguments)
throws java.lang.Exception Perform work as a particular Subject. Here the work
will be granted to a null subject.
methodName - the method to apply the security restrictiontargetObject - the Filter on which the method will
be called.targetType - Class array used to instanciate a
Method object.targetArguments - Object array contains the
runtime parameters instance.
doAsPrivilege
public static void doAsPrivilege(String methodName,
Servlet targetObject)
throws java.lang.Exception Perform work as a particular Subject. Here the work
will be granted to a null subject.
methodName - the method to apply the security restrictiontargetObject - the Servlet on which the method will
be called.
doAsPrivilege
public static void doAsPrivilege(String methodName,
Servlet targetObject,
Class[] targetType,
Object[] targetArguments)
throws java.lang.Exception Perform work as a particular Subject. Here the work
will be granted to a null subject.
methodName - the method to apply the security restrictiontargetObject - the Servlet on which the method will
be called.targetType - Class array used to instanciate a i
Method object.targetArguments - Object array contains the runtime
parameters instance.
doAsPrivilege
public static void doAsPrivilege(String methodName,
Servlet targetObject,
Class[] targetType,
Object[] targetArguments,
Principal principal)
throws java.lang.Exception Perform work as a particular Subject. Here the work
will be granted to a null subject.
methodName - the method to apply the security restrictiontargetObject - the Servlet on which the method will
be called.targetType - Class array used to instanciate a
Method object.targetArguments - Object array contains the
runtime parameters instance.principal - the Principal to which the security
privilege apply..
isPackageProtectionEnabled
public static boolean isPackageProtectionEnabled()
Return the SecurityManager only if Security is enabled AND
package protection mechanism is enabled.
remove
public static void remove(Object cachedObject)
Remove the object from the cache.
cachedObject - The object to remove
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.