lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ishan Chattopadhyaya (JIRA)" <>
Subject [jira] [Updated] (SOLR-7274) Pluggable authentication module in Solr
Date Fri, 10 Apr 2015 19:39:12 GMT


Ishan Chattopadhyaya updated SOLR-7274:
    Attachment: SOLR-7274.patch

Added an initial patch, mainly focussing around the pluggable framework part.

It defines an AuthenticationLayerFilter which is called just before the SolrDispatchFilter.
The AuthenticationLayerFilter (during its init()) looks for a AuthenticationLayerPlugin classname
from the following places, in order, (a) ZK's clusterprops.json containing an "authcPlugin"
property, (b) System property "authcPlugin". 

AuthenticationLayerPlugin has the following interface:

public interface AuthenticationLayerPlugin {
  public void init(FilterConfig conf);
  public void doAuthenticate(ServletRequest req, ServletResponse rsp,
      FilterChain chain) throws Exception;

  public HttpClientConfigurer getDefaultConfigurer();

A reference Kerberos authentication plugin, based on the hadoop-auth's AuthenticationFilter,
is included in the patch. 

On the server side, the plugin contains a filter, called KerberosFilter, whose properties
(e.g. keytab, service principal etc.) are populated from system properties.

On the client side (also used for internode communication), an extended HttpClientConfigurer
instance (derived from Cloudera's implementation) is used to configure the HttpClient used
by HttpSolrClient. It uses a jaas config file from the system property ""
containing client's keytab and user principal. For repeatable requests through the HttpSolrClient,
I've wrapped around the request entities in BufferedHttpEntity. Currently, in this patch,
no extra authentication metadata is being passed around from main request to sub request for
now. Going forward, a generic callback framework might be more desireable, e.g. SOLR-6625.

Here's how I start and test this:

Here's my clusterprops.json in ZK, before starting solr (if one doesn't want to use ZK for
this, could pass to start script):

Here's my start command:
bin/solr -c -z localhost:2181 -a "

\     -Dcookie.domain= -Dkerberos.principal=HTTP/ 
\     -Dkerberos.keytab=/tmp/107solr.keytab"

Here's my /home/ishan/jaas-client.conf file:

SolrClient { required

Here's a way to test:
curl --negotiate -u : ""

> Pluggable authentication module in Solr
> ---------------------------------------
>                 Key: SOLR-7274
>                 URL:
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Anshum Gupta
>         Attachments: SOLR-7274.patch
> It would be good to have Solr support different authentication protocols.
> To begin with, it'd be good to have support for kerberos and basic auth.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message