manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konrad Holl <>
Subject [apache-manifoldcf-solr-5.x-plugin-2.2] Add support for User Principal
Date Wed, 09 Mar 2016 14:36:48 GMT

I'm using ManifoldCF 2.3 with Solr 5.4.1 and the Velocity templating engine. I needed to do
searches with ACLs enabled and installed the plugin. Unfortunately it is not possible to use
the login information provided by Jetty in the Solr plugin.

As of Solr 5.3 it is possible to extract the authenticated user from the SolrQueryRequest
I added these lines to the code in org.apache.solr.mcf.ManifoldCFSearchComponent before the
evaluation of parameters for authenticated user name:

    if (rb.req.getUserPrincipal() != null) {
                domainMap.put("", rb.req.getUserPrincipal().getName() + ((authDomain == null)
? "" : "@" + authDomain));
    else {
      // Get the authenticated user name from the parameters

I also needed an addition setting "authDomain" in the search component configuration. Now
I can use Velocity even for documents with ACLs :o)

Maybe this will make it into the distribution at some point.



Senior Technical Consultant

M +49 178 8855 553
F  +49 178 99 8855 553
Skype: konrad.holl

Search Technologies GmbH
Theodor-Heuss-Allee 112
60486 Frankfurt am Main

Find Better Answers.<>

View raw message