Open HalHunt opened 4 months ago
Could you send PR? I will check it.
Found this to configure Solr to support both no auth + basic auth. blockUnknown is the key.
{
"authentication":{
"blockUnknown": false,
"class":"solr.BasicAuthPlugin",
"credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="},
"realm":"solr",
"forwardCredentials": false
},
"authorization":{
"class":"solr.RuleBasedAuthorizationPlugin",
"permissions":[{"name":"security-edit",
"role":"admin"}],
"user-role":{"solr":"admin"}
}
}
What would you like to be added: I didn't see a way to supply a username and password to the Solr health check. I tired to add the username and password to the SolrOptions.Uri as in http://solr:SolrRocks@localhost:8983/solr without success. Am I missing anything?
Why is this needed: To allow the Solr health check to be used in more realistic enterprise environments that use SSL and basic authentication.
The fix is relatively easy and I have a PR in the works however I need some guidance on unit tests. I have the correct new unit tests but I'm not sure how to support both Solr configurations (i.e. no auth and with auth) in the same docker container. Any guidance is greatly appreciated.