lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r1700758 - in /lucene/dev/branches/lucene_solr_5_3: ./ solr/ solr/CHANGES.txt solr/core/ solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java solr/solrj/ solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
Date Wed, 02 Sep 2015 10:21:02 GMT
Author: noble
Date: Wed Sep  2 10:21:02 2015
New Revision: 1700758

URL: http://svn.apache.org/r1700758
Log:
SOLR-8000: security.json is not loaded on server start

Modified:
    lucene/dev/branches/lucene_solr_5_3/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/solr/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/solr/CHANGES.txt
    lucene/dev/branches/lucene_solr_5_3/solr/core/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
    lucene/dev/branches/lucene_solr_5_3/solr/solrj/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java

Modified: lucene/dev/branches/lucene_solr_5_3/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/solr/CHANGES.txt?rev=1700758&r1=1700757&r2=1700758&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_5_3/solr/CHANGES.txt Wed Sep  2 10:21:02 2015
@@ -15,6 +15,8 @@ Bug Fixes
 
 * SOLR-7949: Resolve XSS issue in Admin UI stats page (David Chiu via janhoy)
 
+* SOLR-8000: security.json is not loaded on server start (noble)
+
 ==================  5.3.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release

Modified: lucene/dev/branches/lucene_solr_5_3/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java?rev=1700758&r1=1700757&r2=1700758&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
(original)
+++ lucene/dev/branches/lucene_solr_5_3/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
Wed Sep  2 10:21:02 2015
@@ -34,6 +34,7 @@ import org.apache.http.message.AbstractH
 import org.apache.http.message.BasicHeader;
 import org.apache.http.util.EntityUtils;
 import org.apache.solr.client.solrj.SolrRequest;
+import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.GenericSolrRequest;
@@ -64,7 +65,6 @@ public class BasicAuthIntegrationTest ex
 
   private static final Logger log = LoggerFactory.getLogger(BasicAuthIntegrationTest.class);
 
-
   @Override
   protected void doExtraTests(MiniSolrCloudCluster miniCluster, SolrZkClient zkClient, ZkStateReader
zkStateReader,
                               CloudSolrClient cloudSolrClient, String defaultCollName) throws
Exception {
@@ -73,10 +73,21 @@ public class BasicAuthIntegrationTest ex
     assertNotNull(rsp.get(CommandOperation.ERR_MSGS));
     zkClient.setData("/security.json", STD_CONF.replaceAll("'", "\"").getBytes(UTF_8), true);
     String baseUrl = getRandomReplica(zkStateReader.getClusterState().getCollection(defaultCollName),
random()).getStr(BASE_URL_PROP);
-
     HttpClient cl = cloudSolrClient.getLbClient().getHttpClient();
     verifySecurityStatus(cl, baseUrl + "/admin/authentication", "authentication/class", "solr.BasicAuthPlugin",
20);
 
+    boolean found = false;
+    for (JettySolrRunner jettySolrRunner : miniCluster.getJettySolrRunners()) {
+      if(baseUrl.contains(String.valueOf(jettySolrRunner.getLocalPort()))){
+        found = true;
+        jettySolrRunner.stop();
+        jettySolrRunner.start();
+        verifySecurityStatus(cl, baseUrl + "/admin/authentication", "authentication/class",
"solr.BasicAuthPlugin", 20);
+        break;
+      }
+    }
+    assertTrue("No server found to restart , looking for : "+baseUrl , found);
+
     String command = "{\n" +
         "'set-user': {'harry':'HarryIsCool'}\n" +
         "}";

Modified: lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java?rev=1700758&r1=1700757&r2=1700758&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
(original)
+++ lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
Wed Sep  2 10:21:02 2015
@@ -435,6 +435,7 @@ public class ZkStateReader implements Cl
 
         }
       });
+      securityData = getSecurityProps(true);
     }
   }
 



Mime
View raw message