public class SandboxRules
extends java.lang.Object
The sandbox keeps whitelist rules for the Java Interop and blacklist rules for the Venice functions.
Java whitelist rules for class/instance accessor follow the schema: '{package}.{className}:{methodName | fieldName}'. The asterix may be used as a wildcard
E.g: white listing Java Interop
E.g: white listing Java system properties
E.g: black listing Venice I/O functions
| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<java.lang.String> |
DEFAULT_SYSTEM_PROPERTIES |
| Constructor and Description |
|---|
SandboxRules() |
| Modifier and Type | Method and Description |
|---|---|
SandboxRules |
add(java.util.Collection<java.lang.String> rules)
Add rules to the sandbox
|
SandboxRules |
add(java.lang.String... rules)
Add rules to the sandbox
|
SandboxRules |
addClasses(java.lang.Class<?>... classes)
Add classes to the sandbox.
|
SandboxRules |
addClasses(java.util.Collection<java.lang.Class<?>> classes)
Add classes to the sandbox.
|
SandboxRules |
allowAccessToAllSystemProperties()
Allow access to all Java system properties
|
SandboxRules |
allowAccessToStandardSystemProperties()
Allow access to all standard Java system properties
|
java.util.Set<java.lang.String> |
getRules() |
SandboxRules |
merge(SandboxRules other)
Merges this
SandboxRules with the passed other
SandboxRules |
SandboxRules |
rejectAllVeniceIoFunctions()
Reject access to all Venice I/O related functions
|
java.lang.String |
toString() |
public static final java.util.Set<java.lang.String> DEFAULT_SYSTEM_PROPERTIES
public SandboxRules add(java.util.Collection<java.lang.String> rules)
rules - a collection of rulesSandboxRulespublic SandboxRules add(java.lang.String... rules)
rules - rulesSandboxRulespublic SandboxRules addClasses(java.lang.Class<?>... classes)
Adds a rule "x.y.classname:*" for each class
classes - classesSandboxRulespublic SandboxRules addClasses(java.util.Collection<java.lang.Class<?>> classes)
Adds a rule "x.y.classname:*" for each class
classes - classesSandboxRulespublic SandboxRules rejectAllVeniceIoFunctions()
SandboxRulespublic SandboxRules allowAccessToStandardSystemProperties()
Standard system properties:
SandboxRulespublic SandboxRules allowAccessToAllSystemProperties()
SandboxRulespublic SandboxRules merge(SandboxRules other)
SandboxRules with the passed other
SandboxRulesother - the other SandboxRules to merge withSandboxRulespublic java.util.Set<java.lang.String> getRules()
SandboxRulespublic java.lang.String toString()
toString in class java.lang.Object