You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/04/02 03:28:13 UTC
svn commit: r1583848 - in /manifoldcf/integration/solr-3.x/trunk: ./
DEPENDENCIES.txt README.txt build.xml mcf/ pom.xml solr/ src/
Author: kwright
Date: Wed Apr 2 01:28:12 2014
New Revision: 1583848
URL: http://svn.apache.org/r1583848
Log:
Merge fixes for CONNECTORS-914.
Added:
manifoldcf/integration/solr-3.x/trunk/pom.xml
- copied unchanged from r1583847, manifoldcf/integration/solr-3.x/branches/CONNECTORS-914/pom.xml
manifoldcf/integration/solr-3.x/trunk/solr/
- copied from r1583847, manifoldcf/integration/solr-3.x/branches/CONNECTORS-914/solr/
manifoldcf/integration/solr-3.x/trunk/src/
- copied from r1583847, manifoldcf/integration/solr-3.x/branches/CONNECTORS-914/src/
Removed:
manifoldcf/integration/solr-3.x/trunk/build.xml
manifoldcf/integration/solr-3.x/trunk/mcf/
Modified:
manifoldcf/integration/solr-3.x/trunk/ (props changed)
manifoldcf/integration/solr-3.x/trunk/DEPENDENCIES.txt
manifoldcf/integration/solr-3.x/trunk/README.txt
Propchange: manifoldcf/integration/solr-3.x/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Apr 2 01:28:12 2014
@@ -1,6 +1 @@
-build
-dist
-apache-manifoldcf-solr-3.x-plugin-*
-solr
-download
-apache-manifoldcf-solr-3.x-plugin-*
+target
Propchange: manifoldcf/integration/solr-3.x/trunk/
------------------------------------------------------------------------------
Merged /manifoldcf/integration/solr-3.x/branches/CONNECTORS-914:r1583543-1583847
Modified: manifoldcf/integration/solr-3.x/trunk/DEPENDENCIES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/integration/solr-3.x/trunk/DEPENDENCIES.txt?rev=1583848&r1=1583847&r2=1583848&view=diff
==============================================================================
--- manifoldcf/integration/solr-3.x/trunk/DEPENDENCIES.txt (original)
+++ manifoldcf/integration/solr-3.x/trunk/DEPENDENCIES.txt Wed Apr 2 01:28:12 2014
@@ -1,8 +1,7 @@
Apache ManifoldCF Plugin for Apache Solr 3.x requires
---------------------------------------------------
* JRE 1.6 or above
-* ant 1.8 or higher
-* ivy 2.2 or higher
+* mvn 3.0 or higher
For building Apache ManifoldCF Plugin for Apache Solr 3.x:
------------------------------------------------------
Modified: manifoldcf/integration/solr-3.x/trunk/README.txt
URL: http://svn.apache.org/viewvc/manifoldcf/integration/solr-3.x/trunk/README.txt?rev=1583848&r1=1583847&r2=1583848&view=diff
==============================================================================
--- manifoldcf/integration/solr-3.x/trunk/README.txt (original)
+++ manifoldcf/integration/solr-3.x/trunk/README.txt Wed Apr 2 01:28:12 2014
@@ -25,34 +25,136 @@ Upgrading
If you are replacing a version of Apache ManifoldCF Plugin for Apache Solr 3.x that is
older than version 2.0, you must declare two additional fields (representing parent
-acls and parent deny acls), and reindex all your documents. Otherwise, the plugin
-will prevent you from viewing any documents.
+acls and parent deny acls), and reindex all your documents, so all six fields have the
+correct values. Otherwise, the plugin will prevent you from viewing any documents.
Instructions for Building Apache ManifoldCF Plugin for Apache Solr 3.x from Source
------------------------------------------------------------------------------
-1. Download the Java SE 5 JDK (Java Development Kit), or greater, from http://www.oracle.com/technetwork/java/index.html.
+1. Download the Java SE 6 JDK (Java Development Kit), or greater, from
+ http://www.oracle.com/technetwork/java/index.html.
You will need the JDK installed, and the %JAVA_HOME%\bin directory included
on your command path. To test this, issue a "java -version" command from your
- shell and verify that the Java version is 1.5 or greater.
+ shell and verify that the Java version is 1.6 or greater.
-2. Download the Apache Ant binary distribution (1.8.2 or greater) from http://ant.apache.org.
- You will need Ant installed and the %ANT_HOME%\bin directory included on your
- command path. To test this, issue a "ant -version" command from your
- shell and verify that Ant is available.
+2. Download and install Maven 3.0 or later. Maven installation and configuration
+ instructions can be found here: http://maven.apache.org
-3. Download the Apache Ivy binary distribution (2.2.0 or greater) from http://ant.apache.org/ivy.
- Copy the ivy jar into the ant lib area into the %ANT_HOME%\lib directory.
+3. Building distribution assemblies
-4. In a shell, change to the root directory of the source (where you find the outermost
- build.xml file), and type "ant" for directions.
+ Execute the following command in order to build the distribution assemblies
+ mvn package assembly:assembly
+
+ The JAR packages can be found in the target folder:
+
+ target/solr3x-plugin-mcf-<VERSION>.jar where <VERSION> is the release version
+
+Getting Started
+---------------
+
+There are two ways to hook up security to Solr in this package. The first is
+using a Query Parser plugin. The second is using a Search Component. In both
+cases, the first step is to have ManifoldCF installed and running. See:
+http://manifoldcf.apache.org/release/trunk/en_US/how-to-build-and-deploy.html
+
+Then, you will need to add fields to your Solr schema.xml file that can be used to
+contain document authorization information. There will need to be six of these
+fields, an 'allow' field for documents, parents, and shares, and a 'deny' field for
+documents, parents, and shares. For example:
+
+ <field name="allow_token_document" type="string" indexed="true" stored="false"
+ multiValued="true" required="false" default="__nosecurity__"/>
+ <field name="allow_token_parent" type="string" indexed="true" stored="false"
+ multiValued="true" required="false" default="__nosecurity__"/>
+ <field name="allow_token_share" type="string" indexed="true" stored="false"
+ multiValued="true" required="false" default="__nosecurity__"/>
+ <field name="deny_token_document" type="string" indexed="true" stored="false"
+ multiValued="true" required="false" default="__nosecurity__"/>
+ <field name="deny_token_parent" type="string" indexed="true" stored="false"
+ multiValued="true" required="false" default="__nosecurity__"/>
+ <field name="deny_token_share" type="string" indexed="true" stored="false"
+ multiValued="true" required="false" default="__nosecurity__"/>
+
+The default value of "__nosecurity__" is required by this plugin, so do not forget
+to include it.
+
+Using the Query Parser Plugin
+----------------------------
+
+To set up the query parser plugin, modify your solrconfig.xml to add the query parser:
+
+ <!-- ManifoldCF document security enforcement component -->
+ <queryParser name="manifoldCFSecurity"
+ class="org.apache.solr.mcf.ManifoldCFQParserPlugin">
+ <str name="AuthorityServiceBaseURL">http://localhost:8345/mcf-authority-service</str>
+ <int name="ConnectionPoolSize">50</int>
+ </queryParser>
+
+Hook up the search component in the solrconfig.xml file wherever you want it, e.g.:
+
+<requestHandler name="search" class="solr.SearchHandler" default="true">
+ <lst name="appends">
+ <str name="fq">{!manifoldCFSecurity}</str>
+ </lst>
+ ...
+</requestHandler>
+
+
+Using the Search Component
+----------------------------
+
+To set up the search component, modify your solrconfig.xml to add the search component:
+
+ <!-- ManifoldCF document security enforcement component -->
+ <searchComponent name="manifoldCFSecurity"
+ class="org.apache.solr.mcf.ManifoldCFSearchComponent">
+ <str name="AuthorityServiceBaseURL">http://localhost:8345/mcf-authority-service</str>
+ <int name="ConnectionPoolSize">50</int>
+ </searchComponent>
+
+Hook up the search component in the solrconfig.xml file wherever you want it, e.g.:
+
+<requestHandler name="search" class="solr.SearchHandler" default="true">
+ <arr name="last-components">
+ <str>manifoldCFSecurity</str>
+ </arr>
+ ...
+</requestHandler>
+
+
+Supplying authenticated usernames and domains
+----------------------------------------------
+
+This component looks for the following parameters in the Solr request object:
+
+AuthenticatedUserName
+AuthenticatedUserDomain
+AuthenticatedUserName_XX
+AuthenticatedUserDomain_XX
+
+At a minimum, AuthenticatedUserName must be present in order for the component to communicate with
+the ManifoldCF Authority Service and obtain user access tokens. In that case, the user identity will consist
+of one user and one authorization domain. If AuthenticatedUserDomain is not set, then the authorization domain
+chosen will be the standard default domain, an empty string.
+
+If you need multiple user/domain tuples for the user identity, you may pass these as parameter pairs starting with
+AuthenticatedUserName_0 and AuthenticatedUserDomain_0, and counting up as high as you like.
+
+
+Operation in conjunction with mod-authz-annotate
+------------------------------------------------
+
+An optional component of ManifoldCF can be built and deployed as part of Apache - mod-authz-annotate. The
+mod-authz-annotate module obtains the Kerberos principal from the Kerberos tickets present if mod-auth-kerb is used, and uses
+the MCF Authority Service to look up the appropriate access tokens. If you choose to use that architecture,
+you will still need to use this Solr component to modify the user query. All you have to do is the following:
+
+- Make sure you do not set AuthenticatedUserName or AuthenticatedUserName_0 in the request
+- Make sure the HTTP request from Apache to Solr translates all AAAGRP header values into "UserToken" parameters
+ for the Solr request
-Some files included in Apache ManifoldCF Plugin for Apache Solr 3.x distributions
-----------------------------------------------------------------------------
-dist/apache-solr-mcf*.jar
- The Apache ManifoldCF Plugin for Apache Solr 3.x jar.
Licensing
---------