How to disable SPNEGO authentication for Solr
These steps have been successfully tried and tested on Ambari-2.4.2.0 and HDP-2.5.3.
.
When you install and configure Solr cloud via Ambari or embedded solr via Ambari Infra on a kerberized cluster, SPNEGO authentication gets enabled by default. There is not direct switch to disable only SPNEGO authentication.
.
Please follow below method to disable it.
.
Step 1 - Login to Ambari server
.
Step 2 - Please take backup of below script
/var/lib/ambari-server/resources/common-services/SOLR/<version>/package/scripts/setup_solr_kerberos_auth.py
.
Step 3 - Edit above script and do the modifications as below
Original value:
command += '\'{"authentication":{"class": "org.apache.solr.security.KerberosPlugin"}}\''
command += '\'{ }\''
.
Step 4 - Please replace cached script with below command and restart ambari-agent followed by Solr service(via Ambari)
cp /var/lib/ambari-server/resources/mpacks/solr-ambari-mpack-5.5.2.2.5/common-services/SOLR/5.5.2.2.5/package/scripts/setup_solr_kerberos_auth.py /var/lib/ambari-agent/cache/common-services/SOLR/5.5.2.2.5/package/scripts/setup_solr_kerberos_auth.py
.
You should be able to access Solr Web UI without having kerberos ticket.
.

