Reputation: 1
I am not so familiar with solr. I tried following what was stated in the solr 7.4.0 manual concerning authentication and granting roles using the security.json file below:
{
"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"}
}}
When I tried accessing the admin UI ( localhost:8983/solr/#/ ) I was prompted for a user-name and password. I typed in "solr" as user-name and "SolrRocks" as password but the login popup keeps reappearing. when cancelled it says "Error 401 Bad credentials". Please may I know the right way to perform authentication using the security.json file as stated in the manual?
Upvotes: 0
Views: 966
Reputation: 21
You are missing a space in your password hash (after the equals sign)
Correct:
"credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
Incorrect:
"credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
Upvotes: 2