2

I have Solr 6.6 running via Jetty. I have successfully enabled basic authentication by modifying the etc/jetty.xml and etc/webdefault.xml . This question

I could also restrict access to Solr based on IP address by adding IPAccessHandler around the ContextHandlerCollection . This question

But what I want to achieve is to have authentication needed for requests coming from all external IPs except requests coming from localhost(127.0.0.1) . Localhost should be able to access Solr REST APIs without any authentication needed.

I think that I need to setup jetty to run 2 servers or 2 virtual hosts but I can't figure it out how exactly. Obviously the 2 servers (or virtual hosts) should be connected to the same Solr instance. P.S.: It's acceptable if the requests from Localhost that need to be served without authentication, should be sent on a different port.

  • If you setup authentication on the webapp, then the authentication check occurs at the webapp, well after servers, ports, connectors, virtual hosts etc are handled. However, all is not lost, you'll have to dig into the webapp and see if can support a scenario of you stripping the Authentication/Authorization header in the localhost local IP case. – Joakim Erdfelt Mar 21 '18 at 11:32
  • @JoakimErdfelt Can you elaborate more please? It's not clear to me what exactly you mean. – Amirabbas Askary Mar 21 '18 at 15:12

0 Answers0