Looks like a bug. In the linux script the AUTHC_OPTS var is added to SCRIPT_SOLR_OPTS but that does not seem to be the case for windows script.
I think you can open a JIRA. In the ticket, please provide a step by step instruction to reproduce from a fresh git checkout. And if you have the bandwidth to provide a Pull Request with a fix that may speed up things. PS: We have unit testing of the linux start script, but not a similar test suite for the windows scripts unfortunately. Jan > 6. mai 2024 kl. 11:00 skrev Ragnar Rüütel > <ragnar.ruu...@idainfront.se.INVALID>: > > 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 > > >