Skip to content

Commit

Permalink
#10030 document localhost-only behavior of Solr-9.3.0 and later
Browse files Browse the repository at this point in the history
  • Loading branch information
Don Sizemore committed Oct 24, 2023
1 parent a8ea920 commit a8afef3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

SOLR_DIR="/usr/local/solr/solr-9.3.0"
SOLR_COMMAND="bin/solr"
SOLR_ARGS="-m 1g -j jetty.host=127.0.0.1"
SOLR_ARGS="-m 1g"
SOLR_USER=solr

case $1 in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After = syslog.target network.target remote-fs.target nss-lookup.target
User = solr
Type = forking
WorkingDirectory = /usr/local/solr/solr-9.3.0
ExecStart = /usr/local/solr/solr-9.3.0/bin/solr start -m 1g -j "jetty.host=127.0.0.1"
ExecStart = /usr/local/solr/solr-9.3.0/bin/solr start -m 1g
ExecStop = /usr/local/solr/solr-9.3.0/bin/solr stop
LimitNOFILE=65000
LimitNPROC=65000
Expand Down
6 changes: 2 additions & 4 deletions doc/sphinx-guides/source/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,9 @@ For systems using init.d (like CentOS 6), download this :download:`Solr init scr
Securing Solr
=============

Our sample init script and systemd service file linked above tell Solr to only listen on localhost (127.0.0.1). We strongly recommend that you also use a firewall to block access to the Solr port (8983) from outside networks, for added redundancy.
As of version 9.3.0, Solr listens solely on localhost for security reasons. If your installation will run Solr on its own host, you will need to edit ``bin/solr.in.sh``, setting ``JETTY_HOST`` to the external IP address of your Solr server to tell Solr to accept external connections.

It is **very important** not to allow direct access to the Solr API from outside networks! Otherwise, any host that can reach the Solr port (8983 by default) can add or delete data, search unpublished data, and even reconfigure Solr. For more information, please see https://lucene.apache.org/solr/guide/7_3/securing-solr.html. A particularly serious security issue that has been identified recently allows a potential intruder to remotely execute arbitrary code on the system. See `RCE in Solr via Velocity Template <https://github.com/veracode-research/solr-injection#7-cve-2019-xxxx-rce-via-velocity-template-by-_s00py>`_ for more information.

If you're running your Dataverse installation across multiple service hosts you'll want to remove the jetty.host argument (``-j jetty.host=127.0.0.1``) from the startup command line, but make sure Solr is behind a firewall and only accessible by the Dataverse installation host(s), by specific ip address(es).
We strongly recommend that you also use a firewall to block access to the Solr port (8983) from outside networks. It is **very important** not to allow direct access to the Solr API from outside networks! Otherwise, any host that can reach Solr can add or delete data, search unpublished data, and even reconfigure Solr. For more information, please see https://solr.apache.org/guide/solr/latest/deployment-guide/securing-solr.html

We additionally recommend that the Solr service account's shell be disabled, as it isn't necessary for daily operation::

Expand Down

0 comments on commit a8afef3

Please sign in to comment.