Class BambooSpecsSecurityManager
java.lang.Object
java.lang.SecurityManager
com.atlassian.bamboo.specs.maven.sandbox.BambooSpecsSecurityManager
A security manager that treats one thread in a JVM as a high-privilege, unrestricted thread.
All other threads will have the same restrictions as applets (no network/file access etc.)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
checkPermission
(Permission perm) void
checkPermission
(Permission perm, Object context) static void
Clear the permission checkers used by theBambooSpecsSecurityManager
.static void
setPermissionCheckers
(Map<Thread, ThreadPermissionVerifier> specializedVerifiers, ThreadPermissionVerifier defaultVerifier) Set the permission checkers used by theBambooSpecsSecurityManager
.Methods inherited from class java.lang.SecurityManager
checkAccept, checkAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkWrite, checkWrite, getClassContext, getSecurityContext, getThreadGroup
-
Constructor Details
-
BambooSpecsSecurityManager
public BambooSpecsSecurityManager()
-
-
Method Details
-
checkPermission
- Overrides:
checkPermission
in classSecurityManager
-
checkPermission
- Overrides:
checkPermission
in classSecurityManager
-
checkAccess
- Overrides:
checkAccess
in classSecurityManager
-
setPermissionCheckers
public static void setPermissionCheckers(Map<Thread, ThreadPermissionVerifier> specializedVerifiers, ThreadPermissionVerifier defaultVerifier) Set the permission checkers used by theBambooSpecsSecurityManager
.- Parameters:
specializedVerifiers
- map that associates threads to their specialized verifiers. The current thread will always be a high privilege thread and does not need to be added.defaultVerifier
- the checker used by default if no customised checker is found
-
clearPermissionCheckers
public static void clearPermissionCheckers()Clear the permission checkers used by theBambooSpecsSecurityManager
.
-