public class GroovySandboxExpressionChecker extends Object implements org.codehaus.groovy.control.customizers.SecureASTCustomizer.ExpressionChecker
isAuthorized
method, which returns true to allow that method
and false to block it. Includes all of the sandbox-related whitelist and
blacklist options.Modifier and Type | Field and Description |
---|---|
static String[] |
defaultClassConstructionWhitelist |
static String[] |
defaultMethodBlacklist |
static String[] |
defaultPackageWhitelist |
static String |
GROOVY_SANDBOX_CLASS_WHITELIST |
static String |
GROOVY_SANDBOX_METHOD_BLACKLIST |
static String |
GROOVY_SANDBOX_PACKAGE_WHITELIST |
static String |
GROOVY_SCRIPT_SANDBOX_RECEIVER_WHITELIST |
Constructor and Description |
---|
GroovySandboxExpressionChecker(Settings settings,
Set<String> blacklistAdditions) |
Modifier and Type | Method and Description |
---|---|
static org.codehaus.groovy.control.customizers.SecureASTCustomizer |
getSecureASTCustomizer(Settings settings,
Set<String> blacklistAdditions)
Returns a customized ASTCustomizer that includes the whitelists and
expression checker.
|
boolean |
isAuthorized(org.codehaus.groovy.ast.expr.Expression expression)
Checks whether the expression to be compiled is allowed
|
public static String GROOVY_SANDBOX_METHOD_BLACKLIST
public static String GROOVY_SANDBOX_PACKAGE_WHITELIST
public static String GROOVY_SANDBOX_CLASS_WHITELIST
public static String GROOVY_SCRIPT_SANDBOX_RECEIVER_WHITELIST
public static String[] defaultMethodBlacklist
public static String[] defaultPackageWhitelist
public static String[] defaultClassConstructionWhitelist
Copyright © 2009–2015. All rights reserved.