You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2019/12/12 10:19:43 UTC

[lucene-solr] branch jira/solr-14067 created (now 0cf5040)

This is an automated email from the ASF dual-hosted git repository.

ishan pushed a change to branch jira/solr-14067
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


      at 0cf5040  SOLR-14067: StatelessScriptUpdateProcessor has been removed due to security concerns

This branch includes the following new commits:

     new 0cf5040  SOLR-14067: StatelessScriptUpdateProcessor has been removed due to security concerns

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[lucene-solr] 01/01: SOLR-14067: StatelessScriptUpdateProcessor has been removed due to security concerns

Posted by is...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ishan pushed a commit to branch jira/solr-14067
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 0cf5040fb5d4606afe4c9e25594b092cbeb29388
Author: Ishan Chattopadhyaya <is...@apache.org>
AuthorDate: Thu Dec 12 15:49:21 2019 +0530

    SOLR-14067: StatelessScriptUpdateProcessor has been removed due to security concerns
---
 solr/CHANGES.txt                                   |   6 +
 .../StatelessScriptUpdateProcessorFactory.java     | 499 ---------------------
 .../bad-solrconfig-bogus-scriptengine-name.xml     |  34 --
 .../conf/bad-solrconfig-invalid-scriptfile.xml     |  35 --
 .../conf/bad-solrconfig-missing-scriptfile.xml     |  33 --
 .../conf/solrconfig-script-updateprocessor.xml     | 120 -----
 .../upload/with-script-processor/solrconfig.xml    |  65 ---
 .../org/apache/solr/cloud/TestConfigSetsAPI.java   |  27 +-
 .../test/org/apache/solr/core/TestBadConfig.java   |  26 --
 .../StatelessScriptUpdateProcessorFactoryTest.java | 262 -----------
 .../example-DIH/solr/db/conf/solrconfig.xml        |  18 -
 .../example-DIH/solr/mail/conf/solrconfig.xml      |  18 -
 .../example-DIH/solr/solr/conf/solrconfig.xml      |  18 -
 solr/example/files/conf/solrconfig.xml             |  25 --
 .../conf/solrconfig.xml                            |  18 -
 solr/solr-ref-guide/src/configsets-api.adoc        |   1 -
 .../src/update-request-processors.adoc             |   2 -
 17 files changed, 7 insertions(+), 1200 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0e89654..c7ce9f4 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -174,6 +174,10 @@ Upgrade Notes
 * SOLR-14071: Untrusted configsets (ones that are uploaded via unsecured configset API) cannot use <lib> directive.
   Consider enabling authentication/authorization so that the uploaded configsets are trusted.
 
+* SOLR-14067: StatelessScriptUpdateProcessor has been removed due to security concerns. If you want to apply custom transformations
+  to the documents, consider writing an UpdateRequestProcessor for it or handling the transformation outside of Solr before indexing
+  the documents.
+
 New Features
 ---------------------
 * SOLR-13821: A Package store to store and load package artifacts (noble, Ishan Chattopadhyaya)
@@ -242,6 +246,8 @@ Improvements
 
 * SOLR-13970: Fail the request when collapsing or expand is used with Grouping. (Erick Erickson, Joel Bernstein, Munendra S N)
 
+* SOLR-14067: StatelessScriptUpdateProcessor has been removed due to security concerns (Ishan Chattopadhyaya)
+
 Optimizations
 ---------------------
 (No changes)
diff --git a/solr/core/src/java/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.java
deleted file mode 100644
index c66f183..0000000
--- a/solr/core/src/java/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.update.processor;
-
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrException.ErrorCode;
-import org.apache.solr.common.util.NamedList;
-import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.core.SolrCore;
-import org.apache.solr.core.SolrResourceLoader;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.request.LocalSolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.update.*;
-import org.apache.solr.util.plugin.SolrCoreAware;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.FilenameUtils;
-
-import javax.script.Invocable;
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-import javax.script.ScriptEngineFactory;
-import javax.script.ScriptException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.invoke.MethodHandles;
-import java.nio.charset.StandardCharsets;
-import java.util.Set;
-import java.util.LinkedHashSet;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collection;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <p>
- * An update request processor factory that enables the use of update 
- * processors implemented as scripts which can be loaded by the 
- * {@link SolrResourceLoader} (usually via the <code>conf</code> dir for 
- * the SolrCore).
- * </p>
- * <p>
- * This factory requires at least one configuration parameter named
- * <code>script</code> which may be the name of a script file as a string, 
- * or an array of multiple script files.  If multiple script files are 
- * specified, they are executed sequentially in the order specified in the 
- * configuration -- as if multiple factories were configured sequentially
- * </p>
- * <p>
- * Each script file is expected to declare functions with the same name 
- * as each method in {@link UpdateRequestProcessor}, using the same 
- * arguments.  One slight deviation is in the optional return value from 
- * these functions: If a script function has a <code>boolean</code> return 
- * value, and that value is <code>false</code> then the processor will 
- * cleanly terminate processing of the command and return, without forwarding 
- * the command on to the next script or processor in the chain.
- * Due to limitations in the {@link ScriptEngine} API used by 
- * this factory, it can not enforce that all functions exist on initialization,
- * so errors from missing functions will only be generated at runtime when
- * the chain attempts to use them.
- * </p>
- * <p>
- * The factory may also be configured with an optional "params" argument, 
- * which can be an {@link NamedList} (or array, or any other simple Java 
- * object) which will be put into the global scope for each script.
- * </p>
- * <p>
- * The following variables are define as global variables for each script:
- * <ul>
- *  <li>req - The {@link SolrQueryRequest}</li>
- *  <li>rsp - The {@link SolrQueryResponse}</li>
- *  <li>logger - A {@link Logger} that can be used for logging purposes in the script</li>
- *  <li>params - The "params" init argument in the factory configuration (if any)</li>
- * </ul>
- * <p>
- * Internally this update processor uses JDK 6 scripting engine support, 
- * and any {@link Invocable} implementations of <code>ScriptEngine</code> 
- * that can be loaded using the Solr Plugin ClassLoader may be used.  
- * By default, the engine used for each script is determined by the filed 
- * extension (ie: a *.js file will be treated as a JavaScript script) but 
- * this can be overridden by specifying an explicit "engine" name init 
- * param for the factory, which identifies a registered name of a 
- * {@link ScriptEngineFactory}. 
- * (This may be particularly useful if multiple engines are available for 
- * the same scripting language, and you wish to force the usage of a 
- * particular engine because of known quirks)
- * </p>
- * <p>
- * A new {@link ScriptEngineManager} is created for each 
- * <code>SolrQueryRequest</code> defining a "global" scope for the script(s) 
- * which is request specific.  Separate <code>ScriptEngine</code> instances 
- * are then used to evaluate the script files, resulting in an "engine" scope 
- * that is specific to each script.
- * </p>
- * <p>
- * A simple example...
- * </p>
- * <pre class="prettyprint">
- * &lt;processor class="solr.StatelessScriptUpdateProcessorFactory"&gt;
- *   &lt;str name="script"&gt;updateProcessor.js&lt;/str&gt;
- * &lt;/processor&gt;
- * </pre>
- * <p>
- * A more complex example involving multiple scripts in different languages, 
- * and a "params" <code>NamedList</code> that will be put into the global 
- * scope of each script...
- * </p>
- * <pre class="prettyprint">
- * &lt;processor class="solr.StatelessScriptUpdateProcessorFactory"&gt;
- *   &lt;arr name="script"&gt;
- *     &lt;str name="script"&gt;first-processor.js&lt;/str&gt;
- *     &lt;str name="script"&gt;second-processor.py&lt;/str&gt;
- *   &lt;/arr&gt;
- *   &lt;lst name="params"&gt;
- *     &lt;bool name="a_bool_value"&gt;true&lt;/bool&gt;
- *     &lt;int name="and_int_value"&gt;3&lt;/int&gt;
- *   &lt;/lst&gt;
- * &lt;/processor&gt;
- * </pre>
- * <p>
- * An example where the script file extensions are ignored, and an 
- * explicit script engine is used....
- * </p>
- * <pre class="prettyprint">
- * &lt;processor class="solr.StatelessScriptUpdateProcessorFactory"&gt;
- *   &lt;arr name="script"&gt;
- *     &lt;str name="script"&gt;first-processor.txt&lt;/str&gt;
- *     &lt;str name="script"&gt;second-processor.txt&lt;/str&gt;
- *   &lt;/arr&gt;
- *   &lt;str name="engine"&gt;rhino&lt;/str&gt;
- * &lt;/processor&gt;
- * </pre>
- * 
- * @since 4.0.0
- */
-public class StatelessScriptUpdateProcessorFactory extends UpdateRequestProcessorFactory implements SolrCoreAware {
-
-  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-  private final static String SCRIPT_ARG = "script";
-  private final static String PARAMS_ARG = "params";
-  private final static String ENGINE_NAME_ARG = "engine";
-
-  private List<ScriptFile> scriptFiles;
-
-  /** if non null, this is an override for the engine for all scripts */
-  private String engineName = null;
-
-  private Object params = null;
-
-  private SolrResourceLoader resourceLoader;
-
-  private ScriptEngineCustomizer scriptEngineCustomizer;
-
-  @Override
-  public void init(NamedList args) {
-    Collection<String> scripts = 
-      args.removeConfigArgs(SCRIPT_ARG);
-    if (scripts.isEmpty()) {
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                              "StatelessScriptUpdateProcessorFactory must be " +
-                              "initialized with at least one " + SCRIPT_ARG);
-    }
-    scriptFiles = new ArrayList<>();
-    for (String script : scripts) {
-      scriptFiles.add(new ScriptFile(script));
-    }
-
-    params = args.remove(PARAMS_ARG);
-
-    Object engine = args.remove(ENGINE_NAME_ARG);
-    if (engine != null) {
-      if (engine instanceof String) {
-        engineName = (String)engine;
-      } else {
-        throw new SolrException
-          (SolrException.ErrorCode.SERVER_ERROR, 
-           "'" + ENGINE_NAME_ARG + "' init param must be a String (found: " + 
-           engine.getClass() + ")");
-      }
-    }
-
-    super.init(args);
-
-  }
-
-  @Override
-  public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) {
-    List<EngineInfo> scriptEngines = null;
-
-    scriptEngines = initEngines(req, rsp);
-
-    return new ScriptUpdateProcessor(req, rsp, scriptEngines, next);
-  }
-
-  // TODO: Make this useful outside of tests, such that a ScriptEngineCustomizer could be looked up through the resource loader
-  void setScriptEngineCustomizer(ScriptEngineCustomizer scriptEngineCustomizer) {
-    this.scriptEngineCustomizer = scriptEngineCustomizer;
-  }
-
-  @Override
-  public void inform(SolrCore core) {
-    if (!core.getCoreDescriptor().isConfigSetTrusted()) {
-      throw new SolrException(ErrorCode.UNAUTHORIZED, "The configset for this collection was uploaded without any authentication in place,"
-          + " and this operation is not available for collections with untrusted configsets. To use this component, re-upload the configset"
-          + " after enabling authentication and authorization.");
-    }
-    resourceLoader = core.getResourceLoader();
-
-    // test that our engines & scripts are valid
-
-    SolrQueryResponse rsp = new SolrQueryResponse();
-    SolrQueryRequest req = new LocalSolrQueryRequest(core, new ModifiableSolrParams());
-    try {
-      initEngines(req, rsp);
-    } catch (Exception e) {
-      String msg = "Unable to initialize scripts: " + e.getMessage();
-      log.error(msg, e);
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, msg, e);
-    } finally {
-      req.close();
-    }
-
-    
-  }
-
-
-  //================================================ Helper Methods ==================================================
-
-  /**
-   * Initializes a list of script engines - an engine per script file.
-   *
-   * @param req The solr request.
-   * @param rsp The solr response
-   * @return The list of initialized script engines.
-   */
-  private List<EngineInfo> initEngines(SolrQueryRequest req, 
-                                       SolrQueryResponse rsp) 
-    throws SolrException {
-    
-    List<EngineInfo> scriptEngines = new ArrayList<>();
-
-    ScriptEngineManager scriptEngineManager 
-      = new ScriptEngineManager(resourceLoader.getClassLoader());
-
-    scriptEngineManager.put("logger", log);
-    scriptEngineManager.put("req", req);
-    scriptEngineManager.put("rsp", rsp);
-    if (params != null) {
-      scriptEngineManager.put("params", params);
-    }
-
-    for (ScriptFile scriptFile : scriptFiles) {
-      ScriptEngine engine = null;
-      if (null != engineName) {
-        engine = scriptEngineManager.getEngineByName(engineName);
-        if (engine == null) {
-          String details = getSupportedEngines(scriptEngineManager, false);
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                                  "No ScriptEngine found by name: "
-                                  + engineName + 
-                                  (null != details ? 
-                                   " -- supported names: " + details : ""));
-        }
-      } else {
-        engine = scriptEngineManager.getEngineByExtension
-          (scriptFile.getExtension());
-        if (engine == null) {
-          String details = getSupportedEngines(scriptEngineManager, true);
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                                  "No ScriptEngine found by file extension: "
-                                  + scriptFile.getFileName() + 
-                                  (null != details ? 
-                                   " -- supported extensions: " + details : ""));
-                                  
-        }
-      }
-
-      if (! (engine instanceof Invocable)) {
-        String msg = 
-          "Engine " + ((null != engineName) ? engineName : 
-                       ("for script " + scriptFile.getFileName())) +
-          " does not support function invocation (via Invocable): " +
-          engine.getClass().toString() + " (" +
-          engine.getFactory().getEngineName() + ")";
-        log.error(msg);
-        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, msg);
-      }
-
-      if (scriptEngineCustomizer != null) {
-        scriptEngineCustomizer.customize(engine);
-      }
-
-      scriptEngines.add(new EngineInfo((Invocable)engine, scriptFile));
-      try {
-        Reader scriptSrc = scriptFile.openReader(resourceLoader);
-  
-        try {
-          engine.eval(scriptSrc);
-        } catch (ScriptException e) {
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                                  "Unable to evaluate script: " + 
-                                  scriptFile.getFileName(), e);
-        } finally {
-          IOUtils.closeQuietly(scriptSrc);
-        }
-      } catch (IOException ioe) {
-        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-            "Unable to evaluate script: " + 
-            scriptFile.getFileName(), ioe);        
-      }
-    }
-    return scriptEngines;
-  }
-
-  /**
-   * For error messages - returns null if there are any exceptions of any 
-   * kind building the string (or of the list is empty for some unknown reason).
-   * @param ext - if true, list of extensions, otherwise a list of engine names
-   */
-  private static String getSupportedEngines(ScriptEngineManager mgr,
-                                            boolean ext) {
-    String result = null;
-    try {
-      List<ScriptEngineFactory> factories = mgr.getEngineFactories();
-      if (null == factories) return result;
-
-      Set<String> engines = new LinkedHashSet<>(factories.size());
-      for (ScriptEngineFactory f : factories) {
-        if (ext) {
-          engines.addAll(f.getExtensions());
-        } else {
-          engines.addAll(f.getNames());
-        }
-      }
-      result = String.join(", ", engines);
-    } catch (RuntimeException e) {
-      /* :NOOP: */
-    }
-    return result;
-  }
-
-
-
-  //================================================= Inner Classes ==================================================
-
-  /**
-   * The actual update processor. All methods delegate to scripts.
-   */
-  private static class ScriptUpdateProcessor extends UpdateRequestProcessor {
-
-    private List<EngineInfo> engines;
-
-    private ScriptUpdateProcessor(SolrQueryRequest req, SolrQueryResponse res, List<EngineInfo> engines, UpdateRequestProcessor next) {
-      super(next);
-      this.engines = engines;
-    }
-
-    @Override
-    public void processAdd(AddUpdateCommand cmd) throws IOException {
-      if (invokeFunction("processAdd", cmd)) {
-        super.processAdd(cmd);
-      }
-    }
-
-    @Override
-    public void processDelete(DeleteUpdateCommand cmd) throws IOException {
-      if (invokeFunction("processDelete", cmd)) {
-        super.processDelete(cmd);
-      }
-        
-    }
-
-    @Override
-    public void processMergeIndexes(MergeIndexesCommand cmd) throws IOException {
-      if (invokeFunction("processMergeIndexes", cmd)) {
-        super.processMergeIndexes(cmd);
-      }
-    }
-
-    @Override
-    public void processCommit(CommitUpdateCommand cmd) throws IOException {
-      if (invokeFunction("processCommit", cmd)) {
-        super.processCommit(cmd);
-      }
-    }
-
-    @Override
-    public void processRollback(RollbackUpdateCommand cmd) throws IOException {
-      if (invokeFunction("processRollback", cmd)) {
-        super.processRollback(cmd);
-      }
-    }
-
-    @Override
-    public void finish() throws IOException {
-      if (invokeFunction("finish")) {
-        super.finish();
-      }
-    }
-
-    /**
-     * returns true if processing should continue, or false if the 
-     * request should be ended now.  Result value is computed from the return 
-     * value of the script function if: it exists, is non-null, and can be 
-     * cast to a java Boolean.
-     */
-    private boolean invokeFunction(String name, Object... cmd) {
-
-      for (EngineInfo engine : engines) {
-        try {
-          Object result = engine.getEngine().invokeFunction(name, cmd);
-          if (null != result && result instanceof Boolean) {
-            if (! ((Boolean)result).booleanValue() ) {
-              return false;
-            }
-          }
-
-        } catch (ScriptException | NoSuchMethodException e) {
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                                  "Unable to invoke function " + name + 
-                                  " in script: " + 
-                                  engine.getScriptFile().getFileName() + 
-                                  ": " + e.getMessage(), e);
-        }
-      }
-
-      return true;
-    }
-  }
-
-  /**
-   * Holds the script engine and its associated script file.
-   */
-  private static class EngineInfo {
-
-    private final Invocable engine;
-    private final ScriptFile scriptFile;
-
-    private EngineInfo(Invocable engine, ScriptFile scriptFile) {
-      this.engine = engine;
-      this.scriptFile = scriptFile;
-    }
-
-    public Invocable getEngine() {
-      return engine;
-    }
-
-    public ScriptFile getScriptFile() {
-      return scriptFile;
-    }
-  }
-
-  /**
-   * Represents a script file.
-   */
-  private static class ScriptFile {
-
-    private final String fileName;
-    private final String extension;
-
-    private ScriptFile(String fileName) {
-      this.fileName = fileName;
-      this.extension = FilenameUtils.getExtension(fileName);
-    }
-
-    public String getFileName() {
-      return fileName;
-    }
-
-    public String getExtension() {
-      return extension;
-    }
-
-    public Reader openReader(SolrResourceLoader resourceLoader) throws IOException {
-      InputStream input = resourceLoader.openResource(fileName);
-      return org.apache.lucene.util.IOUtils.getDecodingReader
-        (input, StandardCharsets.UTF_8);
-    }
-  }
-}
diff --git a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-bogus-scriptengine-name.xml b/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-bogus-scriptengine-name.xml
deleted file mode 100644
index ded7416..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-bogus-scriptengine-name.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
-
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="engine">giberish</str>
-      <str name="script">missleading.extension.updateprocessor.js.txt</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-invalid-scriptfile.xml b/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-invalid-scriptfile.xml
deleted file mode 100644
index 709774d..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-invalid-scriptfile.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
-
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="engine">javascript</str>
-      <!-- not parsable as javascript -->
-      <str name="script">currency.xml</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-missing-scriptfile.xml b/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-missing-scriptfile.xml
deleted file mode 100644
index d13ba0b..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-missing-scriptfile.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
-
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">a-file-name-that-does-not-exist.js</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml
deleted file mode 100644
index f87385e..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!--
-   Test Config that for ScriptUpdateProcessor
-
-  -->
-<config>
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-  <requestHandler name="/select" class="solr.SearchHandler"></requestHandler>
-  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="engine">javascript</str>
-      <str name="script">missleading.extension.updateprocessor.js.txt</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="run-no-scripts">
-    <!-- for bypassing all scripts -->
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="single-script">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">trivial.updateprocessor0.js</str>
-      <lst name="params">
-        <bool name="boolValue">true</bool>
-        <int name="intValue">1</int>
-      </lst>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="dual-scripts-arr">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <arr name="script">
-        <str>trivial.updateprocessor0.js</str>
-        <str>trivial.updateprocessor1.js</str>
-      </arr>
-      <lst name="params">
-        <bool name="boolValue">true</bool>
-        <int name="intValue">1</int>
-      </lst>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="dual-scripts-strs">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">trivial.updateprocessor0.js</str>
-      <str name="script">trivial.updateprocessor1.js</str>
-      <lst name="params">
-        <bool name="boolValue">true</bool>
-        <int name="intValue">1</int>
-      </lst>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="conditional-scripts">
-    <!-- multiple scripts, 
-         test that the first one can conditionally stop execution -->
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">conditional.updateprocessor.js</str>
-      <str name="script">addfields.updateprocessor.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="conditional-script">
-    <!-- single script, followed by another processor 
-         (that happens to be a script). 
-         test that the first one can conditionally stop execution -->
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">conditional.updateprocessor.js</str>
-    </processor>
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">addfields.updateprocessor.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="error-on-add">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">throw.error.on.add.updateprocessor.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="missing-functions">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">missing.functions.updateprocessor.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="javascript-compatibility">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">cross-compatible.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-</config>
diff --git a/solr/core/src/test-files/solr/configsets/upload/with-script-processor/solrconfig.xml b/solr/core/src/test-files/solr/configsets/upload/with-script-processor/solrconfig.xml
deleted file mode 100644
index 1c62889..0000000
--- a/solr/core/src/test-files/solr/configsets/upload/with-script-processor/solrconfig.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- This is a "kitchen sink" config file that tests can use.
-     When writting a new test, feel free to add *new* items (plugins,
-     config options, etc...) as long as they don't break any existing
-     tests.  if you need to test something esoteric please add a new
-     "solrconfig-your-esoteric-purpose.xml" config file.
-
-     Note in particular that this test is used by MinimalSchemaTest so
-     Anything added to this file needs to work correctly even if there
-     is now uniqueKey or defaultSearch Field.
-  -->
-
-<config>
-
-  <dataDir>${solr.data.dir:}</dataDir>
-
-  <directoryFactory name="DirectoryFactory"
-                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
-
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-
-  <updateHandler class="solr.DirectUpdateHandler2">
-    <commitWithin>
-      <softCommit>${solr.commitwithin.softcommit:true}</softCommit>
-    </commitWithin>
-
-  </updateHandler>
-  <requestHandler name="/select" class="solr.SearchHandler">
-    <lst name="defaults">
-      <str name="echoParams">explicit</str>
-      <str name="indent">true</str>
-      <str name="df">text</str>
-    </lst>
-
-  </requestHandler>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="engine">javascript</str>
-      <str name="script">missleading.extension.updateprocessor.js.txt</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <requestHandler name="/update" class="solr.UpdateRequestHandler"  />
-</config>
-
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
index b2aa7c2..ac22af0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
@@ -347,32 +347,7 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 {
   }
   
   @Test
-  public void testUploadWithScriptUpdateProcessor() throws Exception {
-      // Authorization off
-      // unprotectConfigsHandler(); // TODO Enable this back when testUploadWithLibDirective() is re-enabled
-      final String untrustedSuffix = "-untrusted";
-      uploadConfigSetWithAssertions("with-script-processor", untrustedSuffix, null, null);
-      // try to create a collection with the uploaded configset
-      Throwable thrown = expectThrows(HttpSolrClient.RemoteSolrException.class, () -> {
-        createCollection("newcollection2", "with-script-processor" + untrustedSuffix,
-      1, 1, solrCluster.getSolrClient());
-      });
-
-    assertThat(thrown.getMessage(), containsString("Underlying core creation failed"));
-
-    // Authorization on
-    final String trustedSuffix = "-trusted";
-    protectConfigsHandler();
-    uploadConfigSetWithAssertions("with-script-processor", trustedSuffix, "solr", "SolrRocks");
-    // try to create a collection with the uploaded configset
-    CollectionAdminResponse resp = createCollection("newcollection2", "with-script-processor" + trustedSuffix,
-    1, 1, solrCluster.getSolrClient());
-    scriptRequest("newcollection2");
-
-  }
-
-  @Test
-  @Ignore // enable this back when the sleep is removed from protectConfigsHandler() call
+  @Ignore // enable this back when the sleep is removed from unprotectConfigsHandler() and protectConfigsHandler() calls
   public void testUploadWithLibDirective() throws Exception {
     // Authorization off
     unprotectConfigsHandler();
diff --git a/solr/core/src/test/org/apache/solr/core/TestBadConfig.java b/solr/core/src/test/org/apache/solr/core/TestBadConfig.java
index 1dfad85..e0b6978 100644
--- a/solr/core/src/test/org/apache/solr/core/TestBadConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestBadConfig.java
@@ -16,10 +16,6 @@
  */
 package org.apache.solr.core;
 
-import javax.script.ScriptEngineManager;
-
-import org.junit.Assume;
-
 public class TestBadConfig extends AbstractBadConfigTestBase {
 
   public void testUnsetSysProperty() throws Exception {
@@ -53,28 +49,6 @@ public class TestBadConfig extends AbstractBadConfigTestBase {
     }
   }
 
-  public void testBogusScriptEngine() throws Exception {
-    // sanity check
-    Assume.assumeTrue(null == (new ScriptEngineManager()).getEngineByName("giberish"));
-                      
-    assertConfigs("bad-solrconfig-bogus-scriptengine-name.xml",
-                  "schema.xml","giberish");
-  }
-
-  public void testMissingScriptFile() throws Exception {
-    // sanity check
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByExtension("js"));
-    assertConfigs("bad-solrconfig-missing-scriptfile.xml",
-                  "schema.xml","a-file-name-that-does-not-exist.js");
-  }
-
-  public void testInvalidScriptFile() throws Exception {
-    // sanity check
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByName("javascript"));
-    assertConfigs("bad-solrconfig-invalid-scriptfile.xml",
-                  "schema.xml","currency.xml");
-  }
-
   public void testBogusMergePolicy() throws Exception {
     assertConfigs("bad-mpf-solrconfig.xml", "schema-minimal.xml",
                   "DummyMergePolicyFactory");
diff --git a/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java
deleted file mode 100644
index 04c277c..0000000
--- a/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.update.processor;
-
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrInputDocument;
-import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.core.SolrCore;
-import org.junit.Assume;
-import org.junit.BeforeClass;
-
-/**
- * Tests {@link StatelessScriptUpdateProcessorFactory}.
- *
- * TODO: This test, to run from an IDE, requires a working directory of &lt;path-to&gt;/solr/core/src/test-files.  Fix!
- */
-public class StatelessScriptUpdateProcessorFactoryTest extends UpdateProcessorTestBase {
-
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByExtension("js"));
-    initCore("solrconfig-script-updateprocessor.xml", "schema12.xml");
-  }
-
-  /**
-   * simple test of a basic script processor chain using the full 
-   * RequestHandler + UpdateProcessorChain flow
-   */
-  public void testFullRequestHandlerFlow() throws Exception {
-
-    assertU("Simple assertion that adding a document works",
-            adoc("id",  "4055",
-                 "subject", "Hoss"));
-    assertU(commit());
-
-    assertQ("couldn't find hoss using script added field",
-            req("q","script_added_i:[40 TO 45]",
-                "fq","id:4055")
-            ,"//result[@numFound=1]"
-            ,"//str[@name='id'][.='4055']"
-            );
-
-    // clean up
-    processDeleteById("run-no-scripts","4055");
-    processCommit("run-no-scripts");
-    
-  }
-
-  public void testSingleScript() throws Exception {
-    SolrCore core = h.getCore();
-    UpdateRequestProcessorChain chained = core.getUpdateProcessingChain("single-script");
-    final StatelessScriptUpdateProcessorFactory factory = ((StatelessScriptUpdateProcessorFactory) chained.getProcessors().get(0));
-    final List<String> functionMessages = new ArrayList<>();
-    factory.setScriptEngineCustomizer(new ScriptEngineCustomizer() {
-      @Override
-      public void customize(ScriptEngine engine) {
-        engine.put("functionMessages", functionMessages);
-      }
-    });
-    assertNotNull(chained);
-
-    SolrInputDocument d = processAdd("single-script",
-        doc(f("id", "1"),
-            f("name", " foo "),
-            f("subject", "bar")));
-
-    processCommit("run-no-scripts");
-
-    assertQ("couldn't find doc by id",
-            req("q","id:1")
-            , "//result[@numFound=1]");
-
-    processDeleteById("single-script","1");
-    processCommit("single-script");
-    
-    assertQ("found deleted doc",
-            req("q","id:1")
-            , "//result[@numFound=0]");
-
-
-    assertEquals(3, functionMessages.size());
-
-    assertTrue(functionMessages.contains("processAdd0"));
-    assertTrue(functionMessages.contains("processDelete0"));
-    assertTrue(functionMessages.contains("processCommit0"));
-
-  }
-
-  public void testMultipleScripts() throws Exception {
-    SolrCore core = h.getCore();
-
-    for (final String chain : new String[] {"dual-scripts-arr", 
-                                            "dual-scripts-strs"}) {
-    
-      UpdateRequestProcessorChain chained = core.getUpdateProcessingChain(chain);
-      final StatelessScriptUpdateProcessorFactory factory = 
-        ((StatelessScriptUpdateProcessorFactory) chained.getProcessors().get(0));
-      final List<String> functionMessages = new ArrayList<>();
-      ScriptEngineCustomizer customizer = new ScriptEngineCustomizer() {
-          @Override
-          public void customize(ScriptEngine engine) {
-            engine.put("functionMessages", functionMessages);
-          }
-        };
-      factory.setScriptEngineCustomizer(customizer);
-      assertNotNull(chained);
-
-      SolrInputDocument d = processAdd(chain,
-                                       doc(f("id", "2"),
-                                           f("name", " foo "),
-                                           f("subject", "bar")));
-      
-      assertEquals(chain + " didn't add Double field", 
-                   42.3d, d.getFieldValue("script_added_d"));
-      assertEquals(chain + " didn't add integer field",
-          42, d.getFieldValue("script_added_i"));
-      
-      processCommit("run-no-scripts");
-
-      assertQ(chain + ": couldn't find doc by id",
-              req("q","id:2")
-              , "//result[@numFound=1]");
-
-      processDeleteById(chain, "2");
-      processCommit(chain);
-      
-      assertEquals(chain, 6, functionMessages.size());
-      assertTrue(chain, functionMessages.contains("processAdd0"));
-      assertTrue(chain, functionMessages.contains("processAdd1"));
-      assertTrue(chain + ": script order doesn't match conf order",
-                 functionMessages.indexOf("processAdd0") 
-                 < functionMessages.indexOf("processAdd1"));
-
-      assertTrue(chain, functionMessages.contains("processDelete0"));
-      assertTrue(chain, functionMessages.contains("processDelete1"));
-      assertTrue(chain + ": script order doesn't match conf order",
-                 functionMessages.indexOf("processDelete0") 
-                 < functionMessages.indexOf("processDelete1"));
-
-      assertTrue(chain, functionMessages.contains("processCommit0"));
-      assertTrue(chain, functionMessages.contains("processCommit1"));
-      assertTrue(chain + ": script order doesn't match conf order",
-                 functionMessages.indexOf("processCommit0") 
-                 < functionMessages.indexOf("processCommit1"));
-
-      finish(chain);
-    
-      assertEquals(chain, 8, functionMessages.size());
-
-      assertTrue(chain, functionMessages.contains("finish0"));
-      assertTrue(chain, functionMessages.contains("finish1"));
-      assertTrue(chain + ": script order doesn't match conf order",
-                 functionMessages.indexOf("finish0") 
-                 < functionMessages.indexOf("finish1"));
-
-      assertQ(chain + ": found deleted doc",
-              req("q","id:2")
-              , "//result[@numFound=0]");
-      
-    }
-  }
-
-
-  public void testConditionalExecution() throws Exception {
-    for (String chain : new String[] {"conditional-script", 
-                                      "conditional-scripts"}) {
-
-      ModifiableSolrParams reqParams = new ModifiableSolrParams();
-      
-      SolrInputDocument d = processAdd(chain,
-                                       reqParams,
-                                       doc(f("id", "3"),
-                                           f("name", " foo "),
-                                           f("subject", "bar")));
-      
-      assertFalse(chain + " added String field despite condition", 
-                  d.containsKey("script_added_s"));
-      assertFalse(chain + " added Double field despite condition", 
-                  d.containsKey("script_added_d"));
-      
-      reqParams.add("go-for-it", "true");
-      
-      d = processAdd(chain,
-                     reqParams,
-                     doc(f("id", "4"),
-                         f("name", " foo "),
-                         f("subject", "bar")));
-      
-      assertEquals(chain + " didn't add String field", 
-                   "i went for it", d.getFieldValue("script_added_s"));
-      assertEquals(chain +" didn't add Double field", 
-                   42.3d, d.getFieldValue("script_added_d"));
-      assertEquals(chain + " didn't add integer field",
-          42, d.getFieldValue("script_added_i"));
-    }
-  }
-
-  public void testForceEngine() throws Exception {
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByName("javascript"));
-
-    final String chain = "force-script-engine";
-    SolrInputDocument d = processAdd(chain,
-                                     doc(f("id", "5"),
-                                         f("name", " foo "),
-                                         f("subject", "bar")));
-      
-    assertEquals(chain +" didn't add Double field", 
-                 42.3d, d.getFieldValue("script_added_d"));
-    assertEquals(chain + " didn't add integer field",
-        42, d.getFieldValue("script_added_i"));
-  }
-
-  public void testPropogatedException() throws Exception  {
-    final String chain = "error-on-add";
-    SolrException e = expectThrows(SolrException.class, () ->
-        processAdd(chain, doc(f("id", "5"), f("name", " foo "),
-            f("subject", "bar")))
-    );
-    assertTrue("Exception doesn't contain script error string: " + e.getMessage(),
-        0 < e.getMessage().indexOf("no-soup-fo-you"));
-  }
-
-  public void testMissingFunctions() throws Exception  {
-    final String chain = "missing-functions";
-    SolrException e = expectThrows(SolrException.class, () ->
-        processAdd(chain, doc(f("id", "5"),
-            f("name", " foo "), f("subject", "bar")))
-    );
-    assertTrue("Exception doesn't contain expected error: " + e.getMessage(),
-        0 < e.getMessage().indexOf("processAdd"));
-  }
-
-  public void testJavaScriptCompatibility() throws Exception  {
-    final String chain = "javascript-compatibility";
-    SolrInputDocument d = processAdd(chain,
-                                 doc(f("id", "5"),
-                                     f("name", " foo "),
-                                     f("subject", "BAR")));
-    assertEquals("bar", d.getFieldValue("term_s"));
-
-  }
-
-}
diff --git a/solr/example/example-DIH/solr/db/conf/solrconfig.xml b/solr/example/example-DIH/solr/db/conf/solrconfig.xml
index a88b39d..8dc9848 100644
--- a/solr/example/example-DIH/solr/db/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/db/conf/solrconfig.xml
@@ -1220,24 +1220,6 @@
      </updateRequestProcessorChain>
     -->
 
-  <!-- Script update processor
-
-    This example hooks in an update processor implemented using JavaScript.
-
-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
-  -->
-  <!--
-    <updateRequestProcessorChain name="script">
-      <processor class="solr.StatelessScriptUpdateProcessorFactory">
-        <str name="script">update-script.js</str>
-        <lst name="params">
-          <str name="config_param">example config parameter</str>
-        </lst>
-      </processor>
-      <processor class="solr.RunUpdateProcessorFactory" />
-    </updateRequestProcessorChain>
-  -->
-
   <!-- Response Writers
 
        http://wiki.apache.org/solr/QueryResponseWriter
diff --git a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
index 3582ecb..6892ab5 100644
--- a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
@@ -1223,24 +1223,6 @@
      </updateRequestProcessorChain>
     -->
 
-  <!-- Script update processor
-
-    This example hooks in an update processor implemented using JavaScript.
-
-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
-  -->
-  <!--
-    <updateRequestProcessorChain name="script">
-      <processor class="solr.StatelessScriptUpdateProcessorFactory">
-        <str name="script">update-script.js</str>
-        <lst name="params">
-          <str name="config_param">example config parameter</str>
-        </lst>
-      </processor>
-      <processor class="solr.RunUpdateProcessorFactory" />
-    </updateRequestProcessorChain>
-  -->
-
   <!-- Response Writers
 
        http://wiki.apache.org/solr/QueryResponseWriter
diff --git a/solr/example/example-DIH/solr/solr/conf/solrconfig.xml b/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
index 81e8451..95b3104 100644
--- a/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
@@ -1218,24 +1218,6 @@
      </updateRequestProcessorChain>
     -->
 
-  <!-- Script update processor
-
-    This example hooks in an update processor implemented using JavaScript.
-
-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
-  -->
-  <!--
-    <updateRequestProcessorChain name="script">
-      <processor class="solr.StatelessScriptUpdateProcessorFactory">
-        <str name="script">update-script.js</str>
-        <lst name="params">
-          <str name="config_param">example config parameter</str>
-        </lst>
-      </processor>
-      <processor class="solr.RunUpdateProcessorFactory" />
-    </updateRequestProcessorChain>
-  -->
-
   <!-- Response Writers
 
        http://wiki.apache.org/solr/QueryResponseWriter
diff --git a/solr/example/files/conf/solrconfig.xml b/solr/example/files/conf/solrconfig.xml
index 7c7a58d..c2bb0f6 100644
--- a/solr/example/files/conf/solrconfig.xml
+++ b/solr/example/files/conf/solrconfig.xml
@@ -1188,13 +1188,6 @@
       </lst>
     </processor>
 
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">update-script.js</str>
-      <!--<lst name="params">-->
-        <!--<str name="config_param">example config parameter</str>-->
-      <!--</lst>-->
-    </processor>
-
     <processor class="solr.LogUpdateProcessorFactory"/>
     <processor class="solr.DistributedUpdateProcessorFactory"/>
     <processor class="solr.RunUpdateProcessorFactory"/>
@@ -1245,24 +1238,6 @@
    </updateRequestProcessorChain>
   -->
 
-  <!-- Script update processor
-
-    This example hooks in an update processor implemented using JavaScript.
-
-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
-  -->
-  <!--
-    <updateRequestProcessorChain name="script">
-      <processor class="solr.StatelessScriptUpdateProcessorFactory">
-        <str name="script">update-script.js</str>
-        <lst name="params">
-          <str name="config_param">example config parameter</str>
-        </lst>
-      </processor>
-      <processor class="solr.RunUpdateProcessorFactory" />
-    </updateRequestProcessorChain>
-  -->
-
   <!-- Response Writers
 
        http://wiki.apache.org/solr/QueryResponseWriter
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
index 34e2873..e093533 100644
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
@@ -1468,24 +1468,6 @@
      </updateRequestProcessorChain>
     -->
 
-  <!-- Script update processor
-
-    This example hooks in an update processor implemented using JavaScript.
-
-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
-  -->
-  <!--
-    <updateRequestProcessorChain name="script">
-      <processor class="solr.StatelessScriptUpdateProcessorFactory">
-        <str name="script">update-script.js</str>
-        <lst name="params">
-          <str name="config_param">example config parameter</str>
-        </lst>
-      </processor>
-      <processor class="solr.RunUpdateProcessorFactory" />
-    </updateRequestProcessorChain>
-  -->
-
   <!-- Response Writers
 
        http://wiki.apache.org/solr/QueryResponseWriter
diff --git a/solr/solr-ref-guide/src/configsets-api.adoc b/solr/solr-ref-guide/src/configsets-api.adoc
index 8d231b6..859a387 100644
--- a/solr/solr-ref-guide/src/configsets-api.adoc
+++ b/solr/solr-ref-guide/src/configsets-api.adoc
@@ -88,7 +88,6 @@ A configset is uploaded in a "trusted" mode if authentication is enabled and the
 
 * If specified in the configset, the DataImportHandler's ScriptTransformer will not initialize.
 * The XSLT transformer (`tr` parameter) cannot be used at request processing time.
-* If specified in the configset, the StatelessScriptUpdateProcessor will not initialize.
 * Collections won't initialize if <lib> directives are used in the configset. (Note: Libraries added to Solr's classpath don't need the <lib> directive)
 
 If you use any of these parameters or features, you must have enabled security features in your Solr installation and you must upload the configset as an authenticated user.
diff --git a/solr/solr-ref-guide/src/update-request-processors.adoc b/solr/solr-ref-guide/src/update-request-processors.adoc
index 27b999b..f4a4d6c 100644
--- a/solr/solr-ref-guide/src/update-request-processors.adoc
+++ b/solr/solr-ref-guide/src/update-request-processors.adoc
@@ -283,8 +283,6 @@ What follows are brief descriptions of the currently available update request pr
 
 {solr-javadocs}/solr-core/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.html[SignatureUpdateProcessorFactory]:: Uses a defined set of fields to generate a hash "signature" for the document. Useful for only indexing one copy of "similar" documents.
 
-{solr-javadocs}/solr-core/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.html[StatelessScriptUpdateProcessorFactory]:: An update request processor factory that enables the use of update processors implemented as scripts.
-
 {solr-javadocs}/solr-core/org/apache/solr/update/processor/TemplateUpdateProcessorFactory.html[TemplateUpdateProcessorFactory]:: Allows adding new fields to documents based on a template pattern. This update processor can also be used at runtime (without defining it in `solrconfig.xml`), see the section <<templateupdateprocessorfactory>> below.
 
 {solr-javadocs}/solr-core/org/apache/solr/update/processor/TimestampUpdateProcessorFactory.html[TimestampUpdateProcessorFactory]:: An update processor that adds a newly generated date value of "NOW" to any document being added that does not already have a value in the specified field.