public class SecureJavascriptConfigurator extends AbstractProcessEngineConfigurator
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enableClassWhiteListing
When true, by default all classes will be blacklisted and all classes that want to be used will need to be whitelisted individually.
|
protected long |
maxMemoryUsed
Limits the memory used by the script.
|
protected long |
maxScriptExecutionTime
The maximum time (in ms) that a script is allowed to execute before stopping it.
|
protected int |
maxStackDepth
Limits the stack depth while calling functions within the script.
|
protected int |
nrOfInstructionsBeforeStateCheckCallback
The maximum script execution time and memory usage is implemented using a callback that is called every x instructions of the script.
|
protected int |
scriptOptimizationLevel
By default, no script optimization is applied.
|
static SecureScriptClassShutter |
secureScriptClassShutter |
static SecureScriptContextFactory |
secureScriptContextFactory |
protected Set<String> |
whiteListedClasses
Whitelisted classes for script execution.
|
DEFAULT_CONFIGURATOR_PRIORITY| Constructor and Description |
|---|
SecureJavascriptConfigurator() |
configure, getPrioritypublic static SecureScriptContextFactory secureScriptContextFactory
public static SecureScriptClassShutter secureScriptClassShutter
protected boolean enableClassWhiteListing
protected Set<String> whiteListedClasses
protected long maxScriptExecutionTime
protected int maxStackDepth
protected long maxMemoryUsed
protected int nrOfInstructionsBeforeStateCheckCallback
protected int scriptOptimizationLevel
public void beforeInit(org.flowable.common.engine.impl.AbstractEngineConfiguration engineConfiguration)
beforeInit in interface org.flowable.common.engine.impl.EngineConfiguratorbeforeInit in class AbstractProcessEngineConfiguratorprotected void initSecureScriptContextFactory()
public boolean isEnableClassWhiteListing()
public SecureJavascriptConfigurator setEnableClassWhiteListing(boolean enableClassWhiteListing)
public SecureJavascriptConfigurator setWhiteListedClasses(Set<String> whiteListedClasses)
public SecureJavascriptConfigurator addWhiteListedClass(String whiteListedClass)
public long getMaxScriptExecutionTime()
public SecureJavascriptConfigurator setMaxScriptExecutionTime(long maxScriptExecutionTime)
public int getNrOfInstructionsBeforeStateCheckCallback()
public SecureJavascriptConfigurator setNrOfInstructionsBeforeStateCheckCallback(int nrOfInstructionsBeforeStateCheckCallback)
public int getMaxStackDepth()
public SecureJavascriptConfigurator setMaxStackDepth(int maxStackDepth)
public long getMaxMemoryUsed()
public SecureJavascriptConfigurator setMaxMemoryUsed(long maxMemoryUsed)
public int getScriptOptimizationLevel()
public SecureJavascriptConfigurator setScriptOptimizationLevel(int scriptOptimizationLevel)
public SecureScriptContextFactory getSecureScriptContextFactory()
public static SecureScriptClassShutter getSecureScriptClassShutter()
Copyright © 2019 Flowable. All rights reserved.