Hi, 

I think I found a bug.

Solr documentation describes the SOLR_AUTHENTICATION_OPTS environment variable 
as way to pass basic auth credentials to all requests.
https://solr.apache.org/guide/solr/latest/deployment-guide/basic-authentication-plugin.html#using-the-solr-control-script-with-basic-auth

This is in turn added to AUTHC_OPTS environment variable here:
https://github.com/apache/solr/blob/main/solr/bin/solr.cmd#L233

But never used when starting solr (background or foreground):
https://github.com/apache/solr/blob/main/solr/bin/solr.cmd#L1290-L1306

Thus org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory 
never gets it from environment:
https://github.com/apache/solr/blob/main/solr/solrj/src/java/org/apache/solr/client/solrj/impl/PreemptiveBasicAuthClientBuilderFactory.java#L138-L140

Can someone confirm or reject this?

The workaround for me was to piggyback auth credentials on another environment 
variable.

With Regards,
Ragnar



Reply via email to