Package org.apache.cassandra.security
Class ThreadAwareSecurityManager
- java.lang.Object
-
- java.lang.SecurityManager
-
- org.apache.cassandra.security.ThreadAwareSecurityManager
-
public final class ThreadAwareSecurityManager extends java.lang.SecurityManager
CustomSecurityManager
andPolicy
implementation that only performs access checks if explicitly enabled.This implementation gives no measurable performance penalty (see see cstar test). This is better than the penalty of 1 to 3 percent using a standard
SecurityManager
with an allow all policy.
-
-
Field Summary
Fields Modifier and Type Field Description static java.security.PermissionCollection
noPermissions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkAccess(java.lang.Thread t)
void
checkAccess(java.lang.ThreadGroup g)
void
checkPackageAccess(java.lang.String pkg)
void
checkPermission(java.security.Permission perm)
void
checkPermission(java.security.Permission perm, java.lang.Object context)
static void
install()
static boolean
isSecuredThread()
-
Methods inherited from class java.lang.SecurityManager
checkAccept, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMulticast, checkMulticast, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkWrite, checkWrite, getClassContext, getSecurityContext, getThreadGroup
-
-
-
-
Method Detail
-
install
public static void install()
-
isSecuredThread
public static boolean isSecuredThread()
-
checkAccess
public void checkAccess(java.lang.Thread t)
- Overrides:
checkAccess
in classjava.lang.SecurityManager
-
checkAccess
public void checkAccess(java.lang.ThreadGroup g)
- Overrides:
checkAccess
in classjava.lang.SecurityManager
-
checkPermission
public void checkPermission(java.security.Permission perm)
- Overrides:
checkPermission
in classjava.lang.SecurityManager
-
checkPermission
public void checkPermission(java.security.Permission perm, java.lang.Object context)
- Overrides:
checkPermission
in classjava.lang.SecurityManager
-
checkPackageAccess
public void checkPackageAccess(java.lang.String pkg)
- Overrides:
checkPackageAccess
in classjava.lang.SecurityManager
-
-