Browse Source

update docs referencing allowed script types (#44143)

- javadoc fix referencing incorrect number of script types
- explicitely mention ability to specify stored script type
  in the allowed_types setting
Tal Levy 6 years ago
parent
commit
5e285f25d1

+ 4 - 4
docs/reference/scripting/security.asciidoc

@@ -78,10 +78,10 @@ security of the Elasticsearch deployment.
 [float]
 === Allowed script types setting
 
-By default all script types are allowed to be executed.  This can be modified using the
-setting `script.allowed_types`.  Only the types specified as part of the setting will be
-allowed to be executed.  To specify no types are allowed, set `script.allowed_types` to
-be `none`.
+Elasticsearch supports two script types: `inline` and `stored` (<<modules-scripting-using>>).
+By default both types of scripts are allowed to be executed. To limit the types of scripts
+that can run, set `script.allowed_types` to `inline`, `stored`, or `none`. For example,
+to run `inline` scripts but not `stored` scripts, specify:
 
 [source,yaml]
 ----

+ 2 - 1
server/src/main/java/org/elasticsearch/script/Script.java

@@ -53,7 +53,8 @@ import java.util.Objects;
  * compile and execute a script from the {@link ScriptService}
  * based on the {@link ScriptType}.
  *
- * There are three types of scripts specified by {@link ScriptType}.
+ * There are two types of scripts specified by {@link ScriptType},
+ * <code>INLINE</code>, and <code>STORED</code>.
  *
  * The following describes the expected parameters for each type of script:
  *