knackforge
March 19, 2012
If you are using the default start.jar that comes along with Apache Solr, to run your solr server instances for the Drupal site, the following instructions might help to secure the administrative console from unauthorized access.
The default setup relies on Jetty,
[[{"type":"media","view_mode":"media_original","fid":"100","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]
Jetty is a pure Java-based HTTP client/server, WebSocket client/server and servlet container (Application server) developed as a free and open source project as part of the Eclipse Foundation. It is currently used in products such as ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Google App Engine, Eclipse, FUSE, HP OpenView, JBoss, Liferay, Ubuntu, Twitter's Streaming API and Zimbra. Jetty is also used as a standard Java application server by many open source projects such as Lift, Eucalyptus and Hadoop.
If you had followed the instructions mentioned in the drupal.org handbook Apache Solr Multi-core Setup using Jetty, you will notice a jetty.xml file at apache-solr-3.5.0/drupal/etc and uncomment the lines at 184 so it would look as below,
Create realm.properties password file, this is with respect to a drupal folder in apache-solr-3.5.0 (fullpath apache-solr-3.5.0/drupal/etc/realm.properties) and add the following line,
where foo is username and bar is password. You can even have md5 password in the place of plain text.
When a request is made the user will be promoted to authenticate as follow,
[[{"type":"media","view_mode":"media_original","fid":"101","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]
This way Apache solr server can be securely accessed from a distributed server.
Note: This protects only the requests received via Jetty, however, the PHP client that comes along with Drupal Apache Solr module can still access solr server without any restrictions.
Just like how your fellow techies do.
We'd love to talk about how we can work together
Take control of your AWS cloud costs that enables you to grow!