[ 
https://issues.apache.org/jira/browse/CONNECTORS-1629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17007086#comment-17007086
 ] 

Karl Wright commented on CONNECTORS-1629:
-----------------------------------------

Hi,

I suggest we make changes piecemeal.  First, updating the Jetty version, and 
the jars that are included, as described here:

{quote}
You need jetty-client-9.4.25.v20191220.jar (maybe a slightly older 9.4.x 
version will do as well, the current manifold version not). Reason is that you 
will get otherwise a java.lang.ClassNotFoundException: 
org.eclipse.jetty.client.util.SPNEGOAuthentication error.

I was not exactly sure how to add this jar to the finally generated 
distribution of ManifoldCF so i copied it in collector-lib and added it to the 
classpath.
{quote}

To do this, we'd want to update the version of jetty specified in build.xml and 
pom.xml, and add the new jar to the jetty jar list in build.xml.  Then, in 
framework/build.xml, the new jar should be added wherever jetty jars are found.

{quote}
I had to also deactivate the ModifiedLbSolrClient (commented out below) 
otherwise you get an auth error 401. I believe the reason is that the default 
SPNEGO Protocol for HTTP Kerberos always returns 401 not auth and THEN you are 
supposed to do the Kerberos authentication, which is what SolrJ does
{quote}

The modified client is present because we need to be sure that the correct 
(overridden) version of the SolrHttpClient class is used, not the default one.  
So in this case you'd want to create a fresh copy of LBSolrClient and modify it 
accordingly.

{quote}
Finally, you need to add to options.env.unix or options.env.win:

-Djava.security.auth.login.config=/path/to/jaas-client.conf
{quote}

I would suggest adding both the config file and the -D switch to all the 
examples, but leave kerberos disabled unless somebody modifies the 
jaas-client.conf file.



> Support Solr Kerberos Authentication
> ------------------------------------
>
>                 Key: CONNECTORS-1629
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1629
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Solr 7.x component
>    Affects Versions: ManifoldCF 2.14
>            Reporter: Jörn Franke
>            Priority: Major
>
> Several enterprise deployments of Solr are leveraging SolrCloud Kerberos 
> authentication.
> The integration seems to be rather simple and the goal of this Jira is to 
> evaluate the possential needed step to eventually contribute the Kerberos 
> integration to the ManifoldCF project.
> The following steps would be needed:
>  * One can pass the JVM parameter java.security.auth.login.config to the 
> ManifoldCF JVM using -Djava.security.auth.login.config=/path/to/jaas.confg in 
> which Kerberos authentication details, such as keytab and principal that has 
> the right access to Solr is configured
>  * A small adaption to the SolrCloudClient that is used within Manifold needs 
> to be done to enable Kerberos authentication: 
> HttpClientUtil.setConfigurer(new Krb5HttpClientConfigurer());
> Should this be integrated in Manifold, one may want to consider one input 
> field in the configuration in the UI where one can select / flow which user 
> defined in the Jaas conf (you can define multiple one) should be chosen. By 
> default one may simply select "client" or "SolrJClient" if Jaas.conf is 
> present in the System properties. This does not mean the user needs to be 
> named like this, but the configuration entry referencing any user should be 
> named like this.
> Having a confiugration allows to have a different users per flow. This might 
> also be needed in case you have multiple Solr clusters. 
> Related discussion 
> [http://mail-archives.apache.org/mod_mbox/manifoldcf-user/201912.mbox/browser]
> SolrJ Kerberos integration: 
> [https://lucene.apache.org/solr/guide/8_3/kerberos-authentication-plugin.html#using-solrj-with-a-kerberized-solr]
> Jaas conf documentation: 
> [https://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/tutorials/LoginConfigFile.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to