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

epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 709fa3242ca SOLR-17864: Migrating system properties to modern name. 
(#3690)
709fa3242ca is described below

commit 709fa3242ca22fd317eae06d1d8e2849505800fb
Author: Eric Pugh <[email protected]>
AuthorDate: Sun Sep 28 13:37:30 2025 -0400

    SOLR-17864: Migrating system properties to modern name. (#3690)
    
    * Migrating to solr.security.allow.urls.enabled from solr.disable.allowUrls.
    Removes old whitelist terminology.
    * Remove old deprecated language checks.
    * Bring ClusteringComponentDistributedTest into line to how other tests set 
the allow list variable
---
 .../handler/component/HttpShardHandlerFactory.java |  7 ------
 .../apache/solr/security/AllowListUrlChecker.java  | 25 +++++++++++-----------
 .../test/org/apache/solr/TestCpuTimeSearch.java    |  2 --
 .../test/org/apache/solr/TestTolerantSearch.java   |  4 ++--
 .../handler/TestHealthCheckHandlerLegacyMode.java  |  2 +-
 .../solr/handler/TestReplicationHandler.java       |  6 +++---
 .../TestUserManagedReplicationWithAuth.java        |  2 +-
 .../component/DistributedDebugComponentTest.java   |  4 ++--
 .../org/apache/solr/search/TestSmileRequest.java   |  4 ++--
 .../solr/search/facet/TestJsonFacetErrors.java     |  4 ++--
 .../solr/search/facet/TestJsonFacetRefinement.java |  4 ++--
 .../apache/solr/search/facet/TestJsonFacets.java   |  4 ++--
 .../solr/search/facet/TestJsonRangeFacets.java     |  4 ++--
 .../apache/solr/search/json/TestJsonRequest.java   |  4 ++--
 .../pages/major-changes-in-solr-8.adoc             |  2 +-
 .../DeprecatedSystemPropertyMappings.properties    |  5 ++++-
 .../apache/solr/BaseDistributedSearchTestCase.java |  9 ++++----
 .../src/java/org/apache/solr/SolrTestCaseHS.java   |  5 +++--
 .../src/java/org/apache/solr/SolrTestCaseJ4.java   |  8 +++----
 19 files changed, 50 insertions(+), 55 deletions(-)

diff --git 
a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
 
b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
index abb5f31b398..07663679058 100644
--- 
a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
+++ 
b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
@@ -58,7 +58,6 @@ import org.apache.solr.metrics.SolrMetricManager;
 import org.apache.solr.metrics.SolrMetricProducer;
 import org.apache.solr.metrics.SolrMetricsContext;
 import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.security.AllowListUrlChecker;
 import org.apache.solr.security.HttpClientBuilderPlugin;
 import org.apache.solr.update.UpdateShardHandlerConfig;
 import org.apache.solr.util.stats.InstrumentedHttpListenerFactory;
@@ -261,12 +260,6 @@ public class HttpShardHandlerFactory extends 
ShardHandlerFactory
             sb);
     this.accessPolicy = getParameter(args, INIT_FAIRNESS_POLICY, accessPolicy, 
sb);
 
-    if (args != null && args.get("shardsWhitelist") != null) {
-      log.warn(
-          "Property 'shardsWhitelist' is deprecated, please use '{}' instead.",
-          AllowListUrlChecker.URL_ALLOW_LIST);
-    }
-
     // magic sysprop to make tests reproducible: set by SolrTestCaseJ4.
     String v = System.getProperty("tests.shardhandler.randomSeed");
     if (v != null) {
diff --git 
a/solr/core/src/java/org/apache/solr/security/AllowListUrlChecker.java 
b/solr/core/src/java/org/apache/solr/security/AllowListUrlChecker.java
index 9fbffc4cdfb..0076cf1f41f 100644
--- a/solr/core/src/java/org/apache/solr/security/AllowListUrlChecker.java
+++ b/solr/core/src/java/org/apache/solr/security/AllowListUrlChecker.java
@@ -30,11 +30,12 @@ import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.cloud.ClusterState;
+import org.apache.solr.common.util.EnvUtils;
 import org.apache.solr.core.NodeConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Validates URLs based on an allow list or a {@link ClusterState} in 
SolrCloud. */
+/** Validates URLs using an allow-list or a {@link ClusterState} in SolrCloud. 
*/
 public class AllowListUrlChecker {
 
   private static final Logger log = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -42,12 +43,12 @@ public class AllowListUrlChecker {
   /** {@link org.apache.solr.core.SolrXmlConfig} property to configure the 
allowed URLs. */
   public static final String URL_ALLOW_LIST = "allowUrls";
 
-  /** System property to disable URL checking and {@link #ALLOW_ALL} instead. 
*/
-  public static final String DISABLE_URL_ALLOW_LIST = "solr.disable." + 
URL_ALLOW_LIST;
+  /** System property to enable URL checking against an allow-list and ignore 
{@link #ALLOW_ALL}. */
+  public static final String ENABLE_URL_ALLOW_LIST = 
"solr.security.allow.urls.enabled";
 
   /** Clue given in URL-forbidden exceptions messages. */
   public static final String SET_SOLR_DISABLE_URL_ALLOW_LIST_CLUE =
-      "Set -D" + DISABLE_URL_ALLOW_LIST + "=true to disable URL allow-list 
checks.";
+      "Set -D" + ENABLE_URL_ALLOW_LIST + "=false to disable URL allow-list 
checks.";
 
   /** Singleton checker which allows all URLs. {@link #isEnabled()} returns 
false. */
   public static final AllowListUrlChecker ALLOW_ALL;
@@ -83,7 +84,9 @@ public class AllowListUrlChecker {
    */
   private static final Pattern PROTOCOL_PATTERN = 
Pattern.compile("(\\w+)(://.*)");
 
-  /** Allow list of hosts. Elements in the list will be host:port (no protocol 
or context). */
+  /**
+   * Allow list of hosts. Elements in the list are formatted as host:port (no 
protocol or context).
+   */
   private final Set<String> hostAllowList;
 
   private volatile Set<String> liveHostUrlsCache;
@@ -94,7 +97,7 @@ public class AllowListUrlChecker {
    *     tolerated. An empty list means there is no explicit allow-list of 
URLs, in this case no URL
    *     is allowed unless a {@link ClusterState} is provided in {@link 
#checkAllowList(List,
    *     ClusterState)}.
-   * @throws MalformedURLException If an URL is invalid.
+   * @throws MalformedURLException If a URL is invalid.
    */
   public AllowListUrlChecker(List<String> urlAllowList) throws 
MalformedURLException {
     hostAllowList = parseHostPorts(urlAllowList);
@@ -104,12 +107,8 @@ public class AllowListUrlChecker {
    * Creates a URL checker based on the {@link NodeConfig} property to 
configure the allowed URLs.
    */
   public static AllowListUrlChecker create(NodeConfig config) {
-    if (Boolean.getBoolean(DISABLE_URL_ALLOW_LIST)) {
+    if (!EnvUtils.getPropertyAsBool(ENABLE_URL_ALLOW_LIST, true)) {
       return AllowListUrlChecker.ALLOW_ALL;
-    } else if (System.getProperty("solr.disable.shardsWhitelist") != null) {
-      log.warn(
-          "Property 'solr.disable.shardsWhitelist' is deprecated, please use 
'{}' instead.",
-          DISABLE_URL_ALLOW_LIST);
     }
     try {
       return new AllowListUrlChecker(config.getAllowUrls());
@@ -134,8 +133,8 @@ public class AllowListUrlChecker {
    *
    * @param urls The list of urls to check.
    * @param clusterState The up to date {@link ClusterState}, can be null in 
case of non-cloud mode.
-   * @throws MalformedURLException If an URL is invalid.
-   * @throws SolrException If an URL is not present in the allow-list or in 
the provided {@link
+   * @throws MalformedURLException If a URL is invalid.
+   * @throws SolrException If a URL is not present in the allow-list or in the 
provided {@link
    *     ClusterState}.
    */
   public void checkAllowList(List<String> urls, ClusterState clusterState)
diff --git a/solr/core/src/test/org/apache/solr/TestCpuTimeSearch.java 
b/solr/core/src/test/org/apache/solr/TestCpuTimeSearch.java
index d2f6f47eb06..e2bb71f291e 100644
--- a/solr/core/src/test/org/apache/solr/TestCpuTimeSearch.java
+++ b/solr/core/src/test/org/apache/solr/TestCpuTimeSearch.java
@@ -27,7 +27,6 @@ import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.params.ShardParams;
 import org.apache.solr.common.util.NamedList;
-import org.apache.solr.security.AllowListUrlChecker;
 import org.apache.solr.util.SolrJettyTestRule;
 import org.apache.solr.util.ThreadCpuTimer;
 import org.junit.BeforeClass;
@@ -45,7 +44,6 @@ public class TestCpuTimeSearch extends SolrTestCaseJ4 {
   @BeforeClass
   public static void setupSolr() throws Exception {
     System.setProperty(ThreadCpuTimer.ENABLE_CPU_TIME, "true");
-    System.setProperty(AllowListUrlChecker.DISABLE_URL_ALLOW_LIST, "true");
 
     Path configSet = createTempDir("configSet");
     copyMinConf(configSet);
diff --git a/solr/core/src/test/org/apache/solr/TestTolerantSearch.java 
b/solr/core/src/test/org/apache/solr/TestTolerantSearch.java
index a0af557e739..63dd8cec87d 100644
--- a/solr/core/src/test/org/apache/solr/TestTolerantSearch.java
+++ b/solr/core/src/test/org/apache/solr/TestTolerantSearch.java
@@ -58,7 +58,7 @@ public class TestTolerantSearch extends SolrJettyTestBase {
 
   @BeforeClass
   public static void createThings() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     Path solrHome = createSolrHome();
     createAndStartJetty(solrHome);
     String url = getBaseUrl();
@@ -109,7 +109,7 @@ public class TestTolerantSearch extends SolrJettyTestBase {
       collection2 = null;
     }
     resetExceptionIgnores();
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
   }
 
   @SuppressWarnings("unchecked")
diff --git 
a/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java
 
b/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java
index e3d71e71ddc..9b0f0112cdc 100644
--- 
a/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java
+++ 
b/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java
@@ -51,7 +51,7 @@ public class TestHealthCheckHandlerLegacyMode extends 
SolrTestCaseJ4 {
   public void setUp() throws Exception {
     super.setUp();
 
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
 
     leader = new 
ReplicationTestHelper.SolrInstance(createTempDir("solr-instance"), "leader", 
null);
     leader.setUp();
diff --git 
a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java 
b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
index 4cf3bb4742d..e3bb54c27cf 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
@@ -107,7 +107,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     System.setProperty("solr.directoryFactory", 
"solr.StandardDirectoryFactory");
     // For manual testing only
     // useFactory(null); // force an FS factory.
@@ -140,7 +140,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
   @After
   public void tearDown() throws Exception {
     super.tearDown();
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
     if (null != leaderJetty) {
       leaderJetty.stop();
       leaderJetty = null;
@@ -255,7 +255,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
   public void testUrlAllowList() throws Exception {
     // Run another test with URL allow-list enabled and allow-list is empty.
     // Expect an exception because the leader URL is not allowed.
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
     SolrException e = expectThrows(SolrException.class, this::doTestDetails);
     assertTrue(
         e.getMessage()
diff --git 
a/solr/core/src/test/org/apache/solr/handler/TestUserManagedReplicationWithAuth.java
 
b/solr/core/src/test/org/apache/solr/handler/TestUserManagedReplicationWithAuth.java
index b8fac832514..ccd150a740b 100644
--- 
a/solr/core/src/test/org/apache/solr/handler/TestUserManagedReplicationWithAuth.java
+++ 
b/solr/core/src/test/org/apache/solr/handler/TestUserManagedReplicationWithAuth.java
@@ -74,7 +74,7 @@ public class TestUserManagedReplicationWithAuth extends 
SolrTestCaseJ4 {
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     // leader with Basic auth enabled via security.json
     leader = new 
ReplicationTestHelper.SolrInstance(createTempDir("solr-instance"), "leader", 
null);
     leader.setUp();
diff --git 
a/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
 
b/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
index 8e8c5ec88fd..694cc687b0e 100644
--- 
a/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
+++ 
b/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
@@ -58,7 +58,7 @@ public class DistributedDebugComponentTest extends 
SolrJettyTestBase {
 
   @BeforeClass
   public static void createThings() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     Path solrHome = createSolrHome();
     createAndStartJetty(solrHome);
     String url = getBaseUrl();
@@ -102,7 +102,7 @@ public class DistributedDebugComponentTest extends 
SolrJettyTestBase {
       collection2 = null;
     }
     resetExceptionIgnores();
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
   }
 
   @Test
diff --git a/solr/core/src/test/org/apache/solr/search/TestSmileRequest.java 
b/solr/core/src/test/org/apache/solr/search/TestSmileRequest.java
index 450b2fbee0a..f30055062e7 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSmileRequest.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSmileRequest.java
@@ -42,7 +42,7 @@ public class TestSmileRequest extends SolrTestCaseJ4 {
 
   @BeforeClass
   public static void beforeTests() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     System.setProperty("solr.requests.streaming.body.enabled", "true");
     JSONTestUtil.failRepeatedKeys = true;
     initCore("solrconfig-tlog.xml", "schema_latest.xml");
@@ -61,7 +61,7 @@ public class TestSmileRequest extends SolrTestCaseJ4 {
       servers.stop();
       servers = null;
     }
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
   }
 
   @Test
diff --git 
a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetErrors.java 
b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetErrors.java
index ea83c64ac21..51f241dd560 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetErrors.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetErrors.java
@@ -34,7 +34,7 @@ public class TestJsonFacetErrors extends SolrTestCaseHS {
   @SuppressWarnings("deprecation")
   @BeforeClass
   public static void beforeTests() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     JSONTestUtil.failRepeatedKeys = true;
 
     // we need DVs on point fields to compute stats & facets
@@ -54,7 +54,7 @@ public class TestJsonFacetErrors extends SolrTestCaseHS {
   @SuppressWarnings("deprecation")
   @AfterClass
   public static void afterTests() throws Exception {
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
     JSONTestUtil.failRepeatedKeys = false;
     if (servers != null) {
       servers.stop();
diff --git 
a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java 
b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
index 8c8b8e0f056..3e57d9be1b5 100644
--- 
a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
+++ 
b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
@@ -41,7 +41,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
 
   @BeforeClass
   public static void beforeTests() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     // we need DVs on point fields to compute stats & facets
     if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP))
       System.setProperty(NUMERIC_DOCVALUES_SYSPROP, "true");
@@ -63,7 +63,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
       servers.stop();
       servers = null;
     }
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
   }
 
   // todo - pull up to test base class?
diff --git 
a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java 
b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
index 9ca008dbe5d..38475b95ac7 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
@@ -66,7 +66,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
   @SuppressWarnings("deprecation")
   @BeforeClass
   public static void beforeTests() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     JSONTestUtil.failRepeatedKeys = true;
 
     origTableSize = FacetFieldProcessorByHashDV.MAXIMUM_STARTING_TABLE_SIZE;
@@ -93,7 +93,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
   @SuppressWarnings("deprecation")
   @AfterClass
   public static void afterTests() throws Exception {
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
     JSONTestUtil.failRepeatedKeys = false;
     FacetFieldProcessorByHashDV.MAXIMUM_STARTING_TABLE_SIZE = origTableSize;
     FacetField.FacetMethod.DEFAULT_METHOD = origDefaultFacetMethod;
diff --git 
a/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java 
b/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java
index 2c70de0c25e..102c8e163ba 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java
@@ -33,7 +33,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
   @SuppressWarnings("deprecation")
   @BeforeClass
   public static void beforeTests() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     JSONTestUtil.failRepeatedKeys = true;
 
     // we need DVs on point fields to compute stats & facets
@@ -54,7 +54,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
   @SuppressWarnings("deprecation")
   @AfterClass
   public static void afterTests() throws Exception {
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
     JSONTestUtil.failRepeatedKeys = false;
     if (servers != null) {
       servers.stop();
diff --git 
a/solr/core/src/test/org/apache/solr/search/json/TestJsonRequest.java 
b/solr/core/src/test/org/apache/solr/search/json/TestJsonRequest.java
index f6855a236b6..1774d5ba745 100644
--- a/solr/core/src/test/org/apache/solr/search/json/TestJsonRequest.java
+++ b/solr/core/src/test/org/apache/solr/search/json/TestJsonRequest.java
@@ -49,7 +49,7 @@ public class TestJsonRequest extends SolrTestCaseHS {
   @SuppressWarnings("deprecation")
   @BeforeClass
   public static void beforeTests() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+    systemSetPropertyEnableUrlAllowList(false);
     System.setProperty("solr.requests.streaming.body.enabled", "true");
     JSONTestUtil.failRepeatedKeys = true;
     initCore("solrconfig-tlog.xml", "schema_latest.xml");
@@ -69,7 +69,7 @@ public class TestJsonRequest extends SolrTestCaseHS {
       servers.stop();
       servers = null;
     }
-    systemClearPropertySolrDisableUrlAllowList();
+    systemClearPropertySolrEnableUrlAllowList();
   }
 
   @Test
diff --git 
a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-8.adoc 
b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-8.adoc
index 389f44533e0..5e21087a965 100644
--- 
a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-8.adoc
+++ 
b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-8.adoc
@@ -289,7 +289,7 @@ The login screen's purpose is cosmetic only - Admin 
UI-triggered Solr requests w
 In SolrCloud mode this allow-list is automatically configured to contain all 
live nodes.
 
 In a user-managed cluster or a single-node installation the allow-list is 
empty by default.
-Upgrading users who use the `shards` parameter in these installations can set 
this value by setting the `shardsWhitelist` property in any `shardHandler` 
configurations in their `solrconfig.xml` file.
+Upgrading users who use the `shards` parameter in these installations can set 
this value by setting the `allowUrls` property in any `shardHandler` 
configurations in their `solrconfig.xml` file.
 +
 For more information, see the 
xref:deployment-guide:solrcloud-distributed-requests.adoc#configuring-the-shardhandlerfactory[Distributed
 Request] documentation.
 
diff --git 
a/solr/solrj/src/resources/DeprecatedSystemPropertyMappings.properties 
b/solr/solrj/src/resources/DeprecatedSystemPropertyMappings.properties
index 853256bb411..bd1a3a97164 100644
--- a/solr/solrj/src/resources/DeprecatedSystemPropertyMappings.properties
+++ b/solr/solrj/src/resources/DeprecatedSystemPropertyMappings.properties
@@ -8,6 +8,7 @@
 
 # To be removed in Solr 11:
 
solr.admin.handler.systeminfo.dns.reverse.lookup.enabled=!solr.dns.prevent.reverse.lookup
+
 solr.api.config.edit.enabled=!disable.config.edit
 solr.api.v2.enabled=!disable.v2.api
 
@@ -37,6 +38,7 @@ 
solr.metrics.fieldcache.entries.enabled=!disable.solr.field.cache.m.bean.entry.l
 
solr.metrics.fieldcache.entries.jmx.enabled=!disable.solr.field.cache.m.bean.entry.list.jmx
 
 solr.packages.enabled=enable.packages
+
 solr.requests.streaming.body.enabled=solr.enable.stream.body
 solr.requests.streaming.remote.enabled=solr.enable.remote.streaming
 
@@ -45,9 +47,10 @@ 
solr.resourceloading.restricted.enabled=!solr.allow.unsafe.resourceloading
 solr.responses.hidden.sys.props=solr.hidden.sys.props
 solr.responses.stacktrace.enabled=!solr.hide.stack.trace
 
+solr.security.allow.urls.enabled=!solr.disable.allow.urls
 solr.security.auth.basicauth.credentials=basicauth
 solr.security.auth.plugin=authentication.plugin
-
+  
 solr.solrj.cloud.max.stale.retries=cloud.solr.client.max.stale.retries
 
 solr.streamingexpressions.facet.tiered.enabled=solr.facet.stream.tiered
diff --git 
a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
 
b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
index ff9eb17cc05..da8d2379c82 100644
--- 
a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
+++ 
b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
@@ -122,14 +122,15 @@ public abstract class BaseDistributedSearchTestCase 
extends SolrTestCaseJ4 {
 
   @SuppressWarnings("deprecation")
   @BeforeClass
-  public static void setSolrDisableShardsWhitelist() throws Exception {
-    systemSetPropertySolrDisableUrlAllowList("true");
+  // Sets the solr.security.allow.urls.enable=false, disabling the need to 
provide an allow list.
+  public static void setSolrEnableUrlUrlAllowList() throws Exception {
+    systemSetPropertyEnableUrlAllowList(false);
   }
 
   @SuppressWarnings("deprecation")
   @AfterClass
-  public static void clearSolrDisableShardsWhitelist() throws Exception {
-    systemClearPropertySolrDisableUrlAllowList();
+  public static void clearSolrEnableUrlUrlAllowList() throws Exception {
+    systemClearPropertySolrEnableUrlAllowList();
   }
 
   private static String getHostContextSuitableForServletContext() {
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java 
b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java
index 3fd8bd99c3a..967fe275848 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java
@@ -45,6 +45,7 @@ import org.apache.solr.client.solrj.response.UpdateResponse;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SolrParams;
+import org.apache.solr.common.util.EnvUtils;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.core.CoreDescriptor;
@@ -514,8 +515,8 @@ public class SolrTestCaseHS extends SolrTestCaseJ4 {
 
       // If we want to run with allowlist, this must be explicitly set to true 
for the test
       // otherwise we disable the check
-      if (System.getProperty(AllowListUrlChecker.DISABLE_URL_ALLOW_LIST) == 
null) {
-        systemSetPropertySolrDisableUrlAllowList("true");
+      if 
(EnvUtils.getPropertyAsBool(AllowListUrlChecker.ENABLE_URL_ALLOW_LIST, null)) {
+        systemSetPropertyEnableUrlAllowList(false);
       }
 
       jetty.start();
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java 
b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
index c49c6843923..f2b08870f52 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -2785,13 +2785,13 @@ public abstract class SolrTestCaseJ4 extends 
SolrTestCase {
   }
 
   @Deprecated // For backwards compatibility only. Please do not use in new 
tests.
-  protected static void systemSetPropertySolrDisableUrlAllowList(String value) 
{
-    System.setProperty(AllowListUrlChecker.DISABLE_URL_ALLOW_LIST, value);
+  protected static void systemSetPropertyEnableUrlAllowList(boolean value) {
+    System.setProperty(AllowListUrlChecker.ENABLE_URL_ALLOW_LIST, 
String.valueOf(value));
   }
 
   @Deprecated // For backwards compatibility only. Please do not use in new 
tests.
-  protected static void systemClearPropertySolrDisableUrlAllowList() {
-    System.clearProperty(AllowListUrlChecker.DISABLE_URL_ALLOW_LIST);
+  protected static void systemClearPropertySolrEnableUrlAllowList() {
+    System.clearProperty(AllowListUrlChecker.ENABLE_URL_ALLOW_LIST);
   }
 
   @SafeVarargs

Reply via email to