I have created security.json file to add basic authentication and authorization for my application which is developed in node js in backend and react js in front end. I am using solr 8.8.0.
Here is security.json code
{
"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"}
}
}
Main purpose here to enable authentication in when hit following URL
http://localhost:8983/solr first user name and password should be asked.
Above script does ask for user name and password but it is blocking API calls which are using solr.