Amster

ScriptingEngineConfiguration

Global Operations

Resource path:

/global-config/services/scripting/contexts/{contexts}/engineConfiguration

Resource version: 1.0

create

Usage

am> create ScriptingEngineConfiguration --global --contexts contexts --body body

Parameters

--contexts
--body

The resource in JSON format, described by the following JSON schema:

{
  "type" : "object",
  "properties" : {
    "serverTimeout" : {
      "title" : "Server-side Script Timeout",
      "description" : "The maximum execution time any individual script should take on the server (in seconds).<br><br>Server-side scripts will be forcibly stopped after this amount of execution time.",
      "propertyOrder" : 100,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "idleTimeout" : {
      "title" : "Thread idle timeout (seconds)",
      "description" : "Length of time (in seconds) to wait before terminating threads.<br><br>Length of time (in seconds) to wait before terminating threads that were started when the queue reached capacity. Only applies to threads beyond the core pool size (up to the maximum size).",
      "propertyOrder" : 500,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "blackList" : {
      "title" : "Java class blacklist",
      "description" : "List of patterns of Java classes that must not be accessed by a script.<br><br>This blacklist is applied after the whitelist to apply additional restrictions. For instance you may whitelist java.lang.* and then blacklist java.lang.System and java.lang.Runtime. It is recommended to always prefer specific whitelists where possible.",
      "propertyOrder" : 700,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "propertyNamePrefix" : {
      "title" : "Property Name Prefix",
      "description" : "The prefix must match the property name prefix used in the script (eg. custom.script.property, the prefix in this case is 'custom.script').",
      "propertyOrder" : 50,
      "required" : true,
      "type" : "string",
      "exampleValue" : ""
    },
    "maxThreads" : {
      "title" : "Maximum thread pool size",
      "description" : "The maximum size of the thread pool from which scripts will operate.<br><br>New threads will be created up to this size once the task queue reaches capacity. Has no effect if the queue is unbounded.",
      "propertyOrder" : 300,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "whiteList" : {
      "title" : "Java class whitelist",
      "description" : "List of patterns of allowed Java classes that may be loaded/accessed by scripts.<br><br>Each Java class accessed by a script must match at least one of these patterns. Use '*' as a wildcard, e.g. <code>java.lang.*</code>",
      "propertyOrder" : 600,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "coreThreads" : {
      "title" : "Core thread pool size",
      "description" : "The core size of the thread pool from which scripts will operate.",
      "propertyOrder" : 200,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "useSecurityManager" : {
      "title" : "Use system SecurityManager",
      "description" : "Indicates whether the system SecurityManager should also be consulted when checking access to Java classes.<br><br>If enabled, then the checkPackageAccess method will be called for each Java class accessed. If no SecurityManager is configured, then this has no effect.",
      "propertyOrder" : 800,
      "required" : true,
      "type" : "boolean",
      "exampleValue" : ""
    },
    "queueSize" : {
      "title" : "Thread pool queue size",
      "description" : "Size of queue to use for buffering script execution request when core pool is at capacity.<br><br>Use -1 for an unbounded queue (this disables the maximum pool size setting). For short, CPU-bound scripts, consider a small pool size and larger queue length. For I/O-bound scripts (e.g., REST calls) consider a larger maximum pool size and a smaller queue. Not hot-swappable: restart server for changes to take effect.",
      "propertyOrder" : 400,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    }
  }
}

delete

Usage

am> delete ScriptingEngineConfiguration --global --contexts contexts

Parameters

--contexts

=== getAllTypes

Obtain the collection of all secondary configuration types related to the resource.

Usage

am> action ScriptingEngineConfiguration --global --contexts contexts --actionName getAllTypes

Parameters

--contexts

=== getCreatableTypes

Obtain the collection of secondary configuration types that have yet to be added to the resource.

Usage

am> action ScriptingEngineConfiguration --global --contexts contexts --actionName getCreatableTypes

Parameters

--contexts

=== nextdescendents

Obtain the collection of secondary configuration instances that have been added to the resource.

Usage

am> action ScriptingEngineConfiguration --global --contexts contexts --actionName nextdescendents

Parameters

--contexts

=== read

Usage

am> read ScriptingEngineConfiguration --global --contexts contexts

Parameters

--contexts

=== update

Usage

am> update ScriptingEngineConfiguration --global --contexts contexts --body body

Parameters

--contexts
--body

The resource in JSON format, described by the following JSON schema:

{
  "type" : "object",
  "properties" : {
    "serverTimeout" : {
      "title" : "Server-side Script Timeout",
      "description" : "The maximum execution time any individual script should take on the server (in seconds).<br><br>Server-side scripts will be forcibly stopped after this amount of execution time.",
      "propertyOrder" : 100,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "idleTimeout" : {
      "title" : "Thread idle timeout (seconds)",
      "description" : "Length of time (in seconds) to wait before terminating threads.<br><br>Length of time (in seconds) to wait before terminating threads that were started when the queue reached capacity. Only applies to threads beyond the core pool size (up to the maximum size).",
      "propertyOrder" : 500,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "blackList" : {
      "title" : "Java class blacklist",
      "description" : "List of patterns of Java classes that must not be accessed by a script.<br><br>This blacklist is applied after the whitelist to apply additional restrictions. For instance you may whitelist java.lang.* and then blacklist java.lang.System and java.lang.Runtime. It is recommended to always prefer specific whitelists where possible.",
      "propertyOrder" : 700,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "propertyNamePrefix" : {
      "title" : "Property Name Prefix",
      "description" : "The prefix must match the property name prefix used in the script (eg. custom.script.property, the prefix in this case is 'custom.script').",
      "propertyOrder" : 50,
      "required" : true,
      "type" : "string",
      "exampleValue" : ""
    },
    "maxThreads" : {
      "title" : "Maximum thread pool size",
      "description" : "The maximum size of the thread pool from which scripts will operate.<br><br>New threads will be created up to this size once the task queue reaches capacity. Has no effect if the queue is unbounded.",
      "propertyOrder" : 300,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "whiteList" : {
      "title" : "Java class whitelist",
      "description" : "List of patterns of allowed Java classes that may be loaded/accessed by scripts.<br><br>Each Java class accessed by a script must match at least one of these patterns. Use '*' as a wildcard, e.g. <code>java.lang.*</code>",
      "propertyOrder" : 600,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "coreThreads" : {
      "title" : "Core thread pool size",
      "description" : "The core size of the thread pool from which scripts will operate.",
      "propertyOrder" : 200,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "useSecurityManager" : {
      "title" : "Use system SecurityManager",
      "description" : "Indicates whether the system SecurityManager should also be consulted when checking access to Java classes.<br><br>If enabled, then the checkPackageAccess method will be called for each Java class accessed. If no SecurityManager is configured, then this has no effect.",
      "propertyOrder" : 800,
      "required" : true,
      "type" : "boolean",
      "exampleValue" : ""
    },
    "queueSize" : {
      "title" : "Thread pool queue size",
      "description" : "Size of queue to use for buffering script execution request when core pool is at capacity.<br><br>Use -1 for an unbounded queue (this disables the maximum pool size setting). For short, CPU-bound scripts, consider a small pool size and larger queue length. For I/O-bound scripts (e.g., REST calls) consider a larger maximum pool size and a smaller queue. Not hot-swappable: restart server for changes to take effect.",
      "propertyOrder" : 400,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    }
  }
}
Copyright © 2010-2024 ForgeRock, all rights reserved.