diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 3f3d5317a11..96c8fef68b9 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -98,6 +98,9 @@ Upgrade Notes - Velocity response writer If you want to use them in your collections, please add them to your configset manually or through the Config APIs. +* SOLR-14071: Untrusted configsets (ones that are uploaded via unsecured configset API) cannot use directive. + Consider enabling authentication/authorization so that the uploaded configsets are trusted. + New Features --------------------- * SOLR-13821: A Package store to store and load package artifacts (noble, Ishan Chattopadhyaya) @@ -229,6 +232,8 @@ Bug Fixes * SOLR-13945: Fix: SPLITSHARD can cause data loss on a failure to commit after the sub-shards are active and a rollback is done to make parent shard active again (Ishan Chattopadhyaya, ab) +* SOLR-14071: Untrusted configsets cannot use directive (Ishan Chattopadhyaya) + Other Changes --------------------- diff --git a/solr/core/src/java/org/apache/solr/core/ConfigSetService.java b/solr/core/src/java/org/apache/solr/core/ConfigSetService.java index 7ce1a52dc6b..bc0d4a948f1 100644 --- a/solr/core/src/java/org/apache/solr/core/ConfigSetService.java +++ b/solr/core/src/java/org/apache/solr/core/ConfigSetService.java @@ -87,7 +87,7 @@ public abstract class ConfigSetService { && !flags.getBooleanArg("trusted") ) ? false: true; - SolrConfig solrConfig = createSolrConfig(dcore, coreLoader); + SolrConfig solrConfig = createSolrConfig(dcore, coreLoader, trusted); IndexSchema schema = createIndexSchema(dcore, solrConfig); return new ConfigSet(configName(dcore), solrConfig, schema, properties, trusted); } catch (Exception e) { @@ -102,10 +102,11 @@ public abstract class ConfigSetService { * Create a SolrConfig object for a core * @param cd the core's CoreDescriptor * @param loader the core's resource loader + * @param isTrusted is the configset trusted? * @return a SolrConfig object */ - protected SolrConfig createSolrConfig(CoreDescriptor cd, SolrResourceLoader loader) { - return SolrConfig.readFromResourceLoader(loader, cd.getConfigName()); + protected SolrConfig createSolrConfig(CoreDescriptor cd, SolrResourceLoader loader, boolean isTrusted) { + return SolrConfig.readFromResourceLoader(loader, cd.getConfigName(), isTrusted); } /** diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.java index 5a62695c503..0ef4190a2f1 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java +++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java @@ -132,39 +132,6 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable { private final SolrRequestParsers solrRequestParsers; - /** - * Creates a default instance from the solrconfig.xml. - */ - public SolrConfig() - throws ParserConfigurationException, IOException, SAXException { - this((SolrResourceLoader) null, DEFAULT_CONF_FILE, null); - } - - /** - * Creates a configuration instance from a configuration name. - * A default resource loader will be created (@see SolrResourceLoader) - * - * @param name the configuration name used by the loader - */ - public SolrConfig(String name) - throws ParserConfigurationException, IOException, SAXException { - this((SolrResourceLoader) null, name, null); - } - - /** - * Creates a configuration instance from a configuration name and stream. - * A default resource loader will be created (@see SolrResourceLoader). - * If the stream is null, the resource loader will open the configuration stream. - * If the stream is not null, no attempt to load the resource will occur (the name is not used). - * - * @param name the configuration name - * @param is the configuration stream - */ - public SolrConfig(String name, InputSource is) - throws ParserConfigurationException, IOException, SAXException { - this((SolrResourceLoader) null, name, is); - } - /** * Creates a configuration instance from an instance directory, configuration name and stream. * @@ -172,14 +139,14 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable { * @param name the configuration name used by the loader if the stream is null * @param is the configuration stream */ - public SolrConfig(Path instanceDir, String name, InputSource is) + public SolrConfig(Path instanceDir, String name, InputSource is, boolean isConfigsetTrusted) throws ParserConfigurationException, IOException, SAXException { - this(new SolrResourceLoader(instanceDir), name, is); + this(new SolrResourceLoader(instanceDir), name, is, isConfigsetTrusted); } - public static SolrConfig readFromResourceLoader(SolrResourceLoader loader, String name) { + public static SolrConfig readFromResourceLoader(SolrResourceLoader loader, String name, boolean isConfigsetTrusted) { try { - return new SolrConfig(loader, name, null); + return new SolrConfig(loader, name, null, isConfigsetTrusted); } catch (Exception e) { String resource; if (loader instanceof ZkSolrResourceLoader) { @@ -196,16 +163,17 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable { * If the stream is null, the resource loader will open the configuration stream. * If the stream is not null, no attempt to load the resource will occur (the name is not used). * - * @param loader the resource loader - * @param name the configuration name - * @param is the configuration stream + * @param loader the resource loader + * @param name the configuration name + * @param is the configuration stream + * @param isConfigsetTrusted false if configset was uploaded using unsecured configset upload API, true otherwise */ - public SolrConfig(SolrResourceLoader loader, String name, InputSource is) + private SolrConfig(SolrResourceLoader loader, String name, InputSource is, boolean isConfigsetTrusted) throws ParserConfigurationException, IOException, SAXException { super(loader, name, is, "/config/"); getOverlay();//just in case it is not initialized getRequestParams(); - initLibs(); + initLibs(isConfigsetTrusted); luceneMatchVersion = SolrConfig.parseLuceneVersionString(getVal(IndexSchema.LUCENE_MATCH_VERSION_PARAM, true)); log.info("Using Lucene MatchVersion: {}", luceneMatchVersion); @@ -786,9 +754,14 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable { "Multiple plugins configured for type: " + type); } - private void initLibs() { + private void initLibs(boolean isConfigsetTrusted) { NodeList nodes = (NodeList) evaluate("lib", XPathConstants.NODESET); if (nodes == null || nodes.getLength() == 0) return; + if (!isConfigsetTrusted) { + throw new SolrException(ErrorCode.UNAUTHORIZED, "The configset for this collection was uploaded without any authentication in place," + + " and use of is not available for collections with untrusted configsets. To use this component, re-upload the configset" + + " after enabling authentication and authorization."); + } log.debug("Adding specified lib dirs to ClassLoader"); SolrResourceLoader loader = getResourceLoader(); diff --git a/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/managed-schema b/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/managed-schema new file mode 100644 index 00000000000..9e2f9471026 --- /dev/null +++ b/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/managed-schema @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/solrconfig.xml b/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/solrconfig.xml new file mode 100644 index 00000000000..bb875e319c8 --- /dev/null +++ b/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/solrconfig.xml @@ -0,0 +1,53 @@ + + + + + + + + + ${solr.data.dir:} + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + explicit + true + text + + + + + + + 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 e4ebf294c74..0cda153eaed 100644 --- a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java +++ b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java @@ -88,6 +88,7 @@ import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.noggit.JSONParser; import org.slf4j.Logger; @@ -348,6 +349,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 @@ -369,6 +371,36 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 { } + @Test + @Ignore // enable this back when the sleep is removed from protectConfigsHandler() call + public void testUploadWithLibDirective() throws Exception { + // Authorization off + unprotectConfigsHandler(); + final String untrustedSuffix = "-untrusted"; + uploadConfigSetWithAssertions("with-lib-directive", untrustedSuffix, null, null); + // try to create a collection with the uploaded configset + Throwable thrown = expectThrows(HttpSolrClient.RemoteSolrException.class, () -> { + createCollection("newcollection3", "with-lib-directive" + untrustedSuffix, + 1, 1, solrCluster.getSolrClient()); + }); + + assertThat(thrown.getMessage(), containsString("Underlying core creation failed")); + + // Authorization on + final String trustedSuffix = "-trusted"; + protectConfigsHandler(); + uploadConfigSetWithAssertions("with-lib-directive", trustedSuffix, "solr", "SolrRocks"); + // try to create a collection with the uploaded configset + CollectionAdminResponse resp = createCollection("newcollection3", "with-lib-directive" + trustedSuffix, + 1, 1, solrCluster.getSolrClient()); + + SolrInputDocument doc = sdoc("id", "4055", "subject", "Solr"); + solrCluster.getSolrClient().add("newcollection3", doc); + solrCluster.getSolrClient().commit("newcollection3"); + assertEquals("4055", solrCluster.getSolrClient().query("newcollection3", + params("q", "*:*")).getResults().get(0).get("id")); + } + protected SolrZkClient zkClient() { ZkStateReader reader = solrCluster.getSolrClient().getZkStateReader(); if (reader == null) @@ -376,6 +408,19 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 { return solrCluster.getSolrClient().getZkStateReader().getZkClient(); } + private void unprotectConfigsHandler() throws Exception { + HttpClient cl = null; + try { + cl = HttpClientUtil.createClient(null); + zkClient().setData("/security.json", "{}".getBytes(UTF_8), true); + } finally { + if (cl != null) { + HttpClientUtil.close(cl); + } + } + Thread.sleep(1000); // TODO: Without a delay, the test fails. Some problem with Authc/Authz framework? + } + private void protectConfigsHandler() throws Exception { String authcPrefix = "/admin/authentication"; String authzPrefix = "/admin/authorization"; @@ -403,7 +448,7 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 { HttpClientUtil.close(cl); } } - Thread.sleep(5000); // TODO: Without a delay, the test fails. Some problem with Authc/Authz framework? + Thread.sleep(1000); // TODO: Without a delay, the test fails. Some problem with Authc/Authz framework? } private void uploadConfigSetWithAssertions(String configSetName, String suffix, String username, String password) throws Exception { diff --git a/solr/core/src/test/org/apache/solr/core/TestConfig.java b/solr/core/src/test/org/apache/solr/core/TestConfig.java index 69882c66e58..38722cf2219 100644 --- a/solr/core/src/test/org/apache/solr/core/TestConfig.java +++ b/solr/core/src/test/org/apache/solr/core/TestConfig.java @@ -110,7 +110,7 @@ public class TestConfig extends SolrTestCaseJ4 { @Test public void testCacheEnablingDisabling() throws Exception { // ensure if cache is not defined in the config then cache is disabled - SolrConfig sc = new SolrConfig(new SolrResourceLoader(TEST_PATH().resolve("collection1")), "solrconfig-defaults.xml", null); + SolrConfig sc = new SolrConfig(TEST_PATH().resolve("collection1"), "solrconfig-defaults.xml", null, true); assertNull(sc.filterCacheConfig); assertNull(sc.queryResultCacheConfig); assertNull(sc.documentCacheConfig); @@ -119,7 +119,7 @@ public class TestConfig extends SolrTestCaseJ4 { System.setProperty("filterCache.enabled", "true"); System.setProperty("queryResultCache.enabled", "true"); System.setProperty("documentCache.enabled", "true"); - sc = new SolrConfig(new SolrResourceLoader(TEST_PATH().resolve("collection1")), "solrconfig-cache-enable-disable.xml", null); + sc = new SolrConfig(TEST_PATH().resolve("collection1"), "solrconfig-cache-enable-disable.xml", null, true); assertNotNull(sc.filterCacheConfig); assertNotNull(sc.queryResultCacheConfig); assertNotNull(sc.documentCacheConfig); @@ -128,7 +128,7 @@ public class TestConfig extends SolrTestCaseJ4 { System.setProperty("filterCache.enabled", "false"); System.setProperty("queryResultCache.enabled", "false"); System.setProperty("documentCache.enabled", "false"); - sc = new SolrConfig(new SolrResourceLoader(TEST_PATH().resolve("collection1")), "solrconfig-cache-enable-disable.xml", null); + sc = new SolrConfig(TEST_PATH().resolve("collection1"), "solrconfig-cache-enable-disable.xml", null, true); assertNull(sc.filterCacheConfig); assertNull(sc.queryResultCacheConfig); assertNull(sc.documentCacheConfig); @@ -146,7 +146,7 @@ public class TestConfig extends SolrTestCaseJ4 { int numDefaultsTested = 0; int numNullDefaults = 0; - SolrConfig sc = new SolrConfig(new SolrResourceLoader(TEST_PATH().resolve("collection1")), "solrconfig-defaults.xml", null); + SolrConfig sc = new SolrConfig(TEST_PATH().resolve("collection1"), "solrconfig-defaults.xml", null, true); SolrIndexConfig sic = sc.indexConfig; ++numDefaultsTested; assertEquals("default useCompoundFile", false, sic.useCompoundFile); @@ -210,7 +210,7 @@ public class TestConfig extends SolrTestCaseJ4 { @Test public void testMaxSizeSettingWithoutAutoCommit() throws Exception { - SolrConfig solrConfig = new SolrConfig(new SolrResourceLoader(TEST_PATH().resolve("collection1")), "bad-solrconfig-no-autocommit-tag.xml", null); + SolrConfig solrConfig = new SolrConfig(TEST_PATH().resolve("collection1"), "bad-solrconfig-no-autocommit-tag.xml", null, true); Assert.assertEquals(-1, solrConfig.getUpdateHandlerInfo().autoCommitMaxSizeBytes); Assert.assertEquals(-1, solrConfig.getUpdateHandlerInfo().autoCommmitMaxDocs); Assert.assertEquals(-1, solrConfig.getUpdateHandlerInfo().autoCommmitMaxTime); @@ -219,7 +219,7 @@ public class TestConfig extends SolrTestCaseJ4 { // sanity check that sys properties are working as expected public void testSanityCheckTestSysPropsAreUsed() throws Exception { - SolrConfig sc = new SolrConfig(new SolrResourceLoader(TEST_PATH().resolve("collection1")), "solrconfig-basic.xml", null); + SolrConfig sc = new SolrConfig(TEST_PATH().resolve("collection1"), "solrconfig-basic.xml", null, true); SolrIndexConfig sic = sc.indexConfig; assertEquals("ramBufferSizeMB sysprop", diff --git a/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java b/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java index 6d03002874a..8929ed3597b 100644 --- a/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java +++ b/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java @@ -25,7 +25,6 @@ import org.apache.lucene.index.IndexableField; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.util.ByteArrayUtf8CharSequence; import org.apache.solr.core.SolrConfig; -import org.apache.solr.core.SolrResourceLoader; public class DateFieldTest extends SolrTestCaseJ4 { private final String testInstanceDir = TEST_HOME() + File.separator + "collection1"; @@ -39,7 +38,7 @@ public class DateFieldTest extends SolrTestCaseJ4 { System.setProperty("solr.test.sys.prop1", "propone"); System.setProperty("solr.test.sys.prop2", "proptwo"); SolrConfig config = new SolrConfig - (new SolrResourceLoader(Paths.get(testInstanceDir)), testConfHome + "solrconfig.xml", null); + (Paths.get(testInstanceDir), testConfHome + "solrconfig.xml", null, true); IndexSchema schema = IndexSchemaFactory.buildIndexSchema(testConfHome + "schema.xml", config); f = Boolean.getBoolean(NUMERIC_POINTS_SYSPROP) ? new DatePointField() : new TrieDateField(); diff --git a/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java b/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java index 013ff0e6ea1..f8e6982f1b6 100644 --- a/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java +++ b/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java @@ -24,7 +24,6 @@ import java.util.Map; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.core.SolrConfig; -import org.apache.solr.core.SolrResourceLoader; import org.junit.Test; /** @@ -46,7 +45,7 @@ public class PrimitiveFieldTypeTest extends SolrTestCaseJ4 { System.setProperty("solr.allow.unsafe.resourceloading", "true"); initMap = new HashMap<>(); - config = new SolrConfig(new SolrResourceLoader(TEST_PATH().resolve("collection1")), testConfHome + "solrconfig.xml", null); + config = new SolrConfig(TEST_PATH().resolve("collection1"), testConfHome + "solrconfig.xml", null, true); } @Override diff --git a/solr/core/src/test/org/apache/solr/schema/TestManagedSchemaThreadSafety.java b/solr/core/src/test/org/apache/solr/schema/TestManagedSchemaThreadSafety.java index ae205ac74dc..42d2a77f51f 100644 --- a/solr/core/src/test/org/apache/solr/schema/TestManagedSchemaThreadSafety.java +++ b/solr/core/src/test/org/apache/solr/schema/TestManagedSchemaThreadSafety.java @@ -175,7 +175,7 @@ public class TestManagedSchemaThreadSafety extends SolrTestCaseJ4 { return () -> { try { SolrResourceLoader loader = new ZkSolrResourceLoader(loaderPath, configsetName, zkController); - SolrConfig solrConfig = SolrConfig.readFromResourceLoader(loader, "solrconfig.xml"); + SolrConfig solrConfig = SolrConfig.readFromResourceLoader(loader, "solrconfig.xml", true); ManagedIndexSchemaFactory factory = new ManagedIndexSchemaFactory(); factory.init(new NamedList()); diff --git a/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java b/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java index b314293261f..27138ce51f8 100644 --- a/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java +++ b/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java @@ -62,7 +62,7 @@ public class SolrIndexConfigTest extends SolrTestCaseJ4 { @Test public void testFailingSolrIndexConfigCreation() throws Exception { - SolrConfig solrConfig = new SolrConfig(instanceDir,"bad-mpf-solrconfig.xml", null); + SolrConfig solrConfig = new SolrConfig(instanceDir,"bad-mpf-solrconfig.xml", null, true); SolrIndexConfig solrIndexConfig = new SolrIndexConfig(solrConfig, null, null); IndexSchema indexSchema = IndexSchemaFactory.buildIndexSchema(schemaFileName, solrConfig); h.getCore().setLatestSchema(indexSchema); @@ -75,7 +75,7 @@ public class SolrIndexConfigTest extends SolrTestCaseJ4 { @Test public void testTieredMPSolrIndexConfigCreation() throws Exception { String solrConfigFileName = solrConfigFileNameTieredMergePolicyFactory; - SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileName, null); + SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileName, null, true); SolrIndexConfig solrIndexConfig = new SolrIndexConfig(solrConfig, null, null); IndexSchema indexSchema = IndexSchemaFactory.buildIndexSchema(schemaFileName, solrConfig); @@ -100,7 +100,7 @@ public class SolrIndexConfigTest extends SolrTestCaseJ4 { @Test public void testConcurrentMergeSchedularSolrIndexConfigCreation() throws Exception { String solrConfigFileName = solrConfigFileNameConnMSPolicyFactory; - SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileName, null); + SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileName, null, true); SolrIndexConfig solrIndexConfig = new SolrIndexConfig(solrConfig, null, null); IndexSchema indexSchema = IndexSchemaFactory.buildIndexSchema(schemaFileName, solrConfig); @@ -124,7 +124,7 @@ public class SolrIndexConfigTest extends SolrTestCaseJ4 { final SortField.Type expectedFieldType = SortField.Type.INT; final boolean expectedFieldSortDescending = true; - SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileNameSortingMergePolicyFactory, null); + SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileNameSortingMergePolicyFactory, null, true); SolrIndexConfig solrIndexConfig = new SolrIndexConfig(solrConfig, null, null); assertNotNull(solrIndexConfig); IndexSchema indexSchema = IndexSchemaFactory.buildIndexSchema(schemaFileName, solrConfig); @@ -142,7 +142,7 @@ public class SolrIndexConfigTest extends SolrTestCaseJ4 { } public void testMergedSegmentWarmerIndexConfigCreation() throws Exception { - SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileNameWarmerRandomMergePolicyFactory, null); + SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileNameWarmerRandomMergePolicyFactory, null, true); SolrIndexConfig solrIndexConfig = new SolrIndexConfig(solrConfig, null, null); assertNotNull(solrIndexConfig); assertNotNull(solrIndexConfig.mergedSegmentWarmerInfo); @@ -158,7 +158,7 @@ public class SolrIndexConfigTest extends SolrTestCaseJ4 { final String solrConfigFileNameWarmer = solrConfigFileNameWarmerRandomMergePolicyFactory; final String solrConfigFileNameTMP = solrConfigFileNameTieredMergePolicyFactory; final String solrConfigFileName = (random().nextBoolean() ? solrConfigFileNameWarmer : solrConfigFileNameTMP); - SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileName, null); + SolrConfig solrConfig = new SolrConfig(instanceDir, solrConfigFileName, null, true); SolrIndexConfig solrIndexConfig = new SolrIndexConfig(solrConfig, null, null); assertNotNull(solrIndexConfig); assertNotNull(solrIndexConfig.mergePolicyFactoryInfo); diff --git a/solr/solr-ref-guide/src/configsets-api.adoc b/solr/solr-ref-guide/src/configsets-api.adoc index 8e2eb2e25b3..8d231b6c730 100644 --- a/solr/solr-ref-guide/src/configsets-api.adoc +++ b/solr/solr-ref-guide/src/configsets-api.adoc @@ -89,6 +89,7 @@ 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 directives are used in the configset. (Note: Libraries added to Solr's classpath don't need the 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/test-framework/src/java/org/apache/solr/util/TestHarness.java b/solr/test-framework/src/java/org/apache/solr/util/TestHarness.java index 529a3cb0046..1a23da8b640 100644 --- a/solr/test-framework/src/java/org/apache/solr/util/TestHarness.java +++ b/solr/test-framework/src/java/org/apache/solr/util/TestHarness.java @@ -86,7 +86,7 @@ public class TestHarness extends BaseTestHarness { System.setProperty("solr.test.sys.prop1", "propone"); System.setProperty("solr.test.sys.prop2", "proptwo"); try { - return new SolrConfig(solrHome.resolve(coreName), confFile, null); + return new SolrConfig(solrHome.resolve(coreName), confFile, null, true); } catch (Exception xany) { throw new RuntimeException(xany); }