Solr Cloud with basic authentication fails - Unauthorized error 401 from Solr Admin

I have SolrCloud using Solr 6.6.0 and Zookeeper 3.4.10. I am trying to configure basic authentication according to the latest documentation at https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+Plugin

The problem is that authentication does not work. After installation, I can’t access the Solr admin console because it does not accept the username / password that was configured.

Below are the steps with detailed information:

1) Zookeeper started listening on port 2181

2) Launched Solr cloud mode connecting to Zookeeper

 solr start -c -s C:/solr-6.6.0_VM1/server/solr/cores -p 8983 -z 
    "localhost:2181";

3) The created security.json file (according to the documentation):

{
"authentication":{    
"blockUnknown": true,    
"class":"solr.BasicAuthPlugin",    
"credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=    
Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}    
},    
"authorization":{    
"class":"solr.RuleBasedAuthorizationPlugin",    
"permissions":[{"name":"security-edit",    
"role":"admin"}],    
"user-role":{"solr":"admin"}    
}}    

4) Updated solr.in.cmd to enable authentication in SOLR:

set SOLR_AUTH_TYPE=basic
set SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"

5) ** Uploaded the security.json file to Zookeeper: *

 server\scripts\cloud-scripts\zkcli -z localhost:2181 -cmd putfile 
    /security.json security.json

6) Rebooted SOLR Server

7) Open SOLR Admin Console :http://localhost:8983/solr/#/

I was prompted for a username / password. I logged in solr / SolrRocks Admin did not accept the password. When I close the login window, it shows "HTTP ERROR 401, Bad credentials"

Any idea why authentication is not working on Solr? I tried the steps in the same way as documented. Appreciate your help!

Thank,

Nishant

+3
source share

All Articles