manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1688704 - in /manifoldcf/integration/elasticsearch-1.5/trunk: README.txt pom.xml src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizer.java
Date Wed, 01 Jul 2015 18:42:24 GMT
Author: kwright
Date: Wed Jul  1 18:42:23 2015
New Revision: 1688704

URL: http://svn.apache.org/r1688704
Log:
Final tweaks for 2.0 release

Modified:
    manifoldcf/integration/elasticsearch-1.5/trunk/README.txt
    manifoldcf/integration/elasticsearch-1.5/trunk/pom.xml
    manifoldcf/integration/elasticsearch-1.5/trunk/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizer.java

Modified: manifoldcf/integration/elasticsearch-1.5/trunk/README.txt
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch-1.5/trunk/README.txt?rev=1688704&r1=1688703&r2=1688704&view=diff
==============================================================================
--- manifoldcf/integration/elasticsearch-1.5/trunk/README.txt (original)
+++ manifoldcf/integration/elasticsearch-1.5/trunk/README.txt Wed Jul  1 18:42:23 2015
@@ -38,11 +38,11 @@ http://maven.apache.org/run-maven/index.
 Execute the following command in order to build the JAR packages and install 
 them to the local repository:
 
-mvn install
+mvn clean install
 
 The JAR packages can be found in the target folder:
 
-target/elasticsearch-1.5-plugin-mcf-<VERSION>.jar
+target/elasticsearch-1.5-plugin-mcf-<VERSION>-jar-with-dependencies.jar
 
 ... where <VERSION> is the release version
 
@@ -61,7 +61,29 @@ mvn antrun:run
 Usage
 ---------
 
-Integrate this plugin with your Controller in the following way:
+1) Configure the plugin using Elasticsearch config file (elasticsearch.yml) by providing
these parameters:
+
+    "mcf.authority_service_base_url" - the URL to the ManifoldCF Authority Service (default:
"http://localhost:8345/mcf-authority-service")
+    "mcf.http.connection_timeout" - HTTP client connection timeout (default: 60000)
+    "mcf.http.socket_timeout" - HTTP client socket timeout (default: 300000)
+    "mcf.allow_field_prefix" - allow field prefix (default: "allow_token_")
+    "mcf.deny_field_prefix" - deny field prefix (default: "deny_token_")
+    "mcf.http.connection_pool_size" - HTTP client connection pool size (default: 50).
+
+
+2) Invoke ElasticSearch in the following manner to filter documents with security:
+
+http://<ElasticSearch_Host_And_Port/<index_name>/_search?u=<user>
+
+Or, optionally:
+
+http://<ElasticSearch_Host_And_Port/<index_name>/_search?u=<user>@<domain>
+http://<ElasticSearch_Host_And_Port/<index_name>/_search?u=<user1>@<domain1>,<user2>@<domain2>...
+
+If the "u" parameter is not provided, no security filtering will be done.
+
+
+3) Integrate this plugin with your Controller in the following way:
 
 @RestController
 @RequestMapping("/search")
@@ -85,7 +107,7 @@ public class SearchController {
     }
 }
 
-To integrate this plugin to authorize automatically with your Service, use:
+4) To integrate this plugin to authorize automatically with your Service, use:
 
 @Service
 public class SearchService {
@@ -116,25 +138,6 @@ public class SearchService {
 }
 
 
-Configure the plugin using Elasticsearch config file (elasticsearch.yml) by providing these
parameters:
-
-    "mcf.authority_service_base_url" - the URL to the ManifoldCF Authority Service (default:
"http://localhost:8345/mcf-authority-service")
-    "mcf.http.connection_timeout" - HTTP client connection timeout (default: 60000)
-    "mcf.http.socket_timeout" - HTTP client socket timeout (default: 300000)
-    "mcf.allow_field_prefix" - allow field prefix (default: "allow_token_")
-    "mcf.deny_field_prefix" - deny field prefix (default: "deny_token_")
-    "mcf.http.connection_pool_size" - HTTP client connection pool size (default: 50).
-
-
-Finally, invoke ElasticSearch in the following manner to filter documents with security:
-
-http://<ElasticSearch_Host_And_Port/_all/_search?u=<user>
-
-Or, optionally:
-
-http://<ElasticSearch_Host_And_Port/_all/_search?u=<user>@<domain>
-http://<ElasticSearch_Host_And_Port/_all/_search?u=<user1>@<domain1>,<user2>@<domain2>...
-
 Licensing
 ---------
 

Modified: manifoldcf/integration/elasticsearch-1.5/trunk/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch-1.5/trunk/pom.xml?rev=1688704&r1=1688703&r2=1688704&view=diff
==============================================================================
--- manifoldcf/integration/elasticsearch-1.5/trunk/pom.xml (original)
+++ manifoldcf/integration/elasticsearch-1.5/trunk/pom.xml Wed Jul  1 18:42:23 2015
@@ -45,7 +45,6 @@
   <properties>
     <elasticsearch.version>1.5.2</elasticsearch.version>
     <junit.version>4.8.2</junit.version>
-    <slf4j.version>1.6.6</slf4j.version>
     <log4j.version>1.2.16</log4j.version>
     <httpcomponent.version>4.4.1</httpcomponent.version>
     <jetty.version>9.2.10.v20150310</jetty.version>
@@ -80,13 +79,6 @@
       <scope>provided</scope>
     </dependency>
 
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>${slf4j.version}</version>
-      <scope>provided</scope>
-    </dependency>
-
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit-dep</artifactId>

Modified: manifoldcf/integration/elasticsearch-1.5/trunk/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizer.java
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch-1.5/trunk/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizer.java?rev=1688704&r1=1688703&r2=1688704&view=diff
==============================================================================
--- manifoldcf/integration/elasticsearch-1.5/trunk/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizer.java
(original)
+++ manifoldcf/integration/elasticsearch-1.5/trunk/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizer.java
Wed Jul  1 18:42:23 2015
@@ -26,6 +26,9 @@ import org.elasticsearch.index.query.Fil
 import org.elasticsearch.index.query.BoolFilterBuilder;
 import org.elasticsearch.index.query.TermFilterBuilder;
 
+import org.elasticsearch.common.logging.Loggers;
+import org.elasticsearch.common.logging.ESLogger;
+
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.HttpResponse;
@@ -37,9 +40,6 @@ import org.apache.http.impl.client.Defau
 import org.apache.http.conn.ClientConnectionManager;
 import org.apache.http.impl.conn.PoolingClientConnectionManager;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /** This class represents the main Java API for modifying SearchRequestBuilder 
 * objects within ElasticSearch.  It is a singleton class whose main public method
 * is thread-safe.
@@ -51,7 +51,7 @@ public class MCFAuthorizer
   static final public String NOSECURITY_TOKEN = "__nosecurity__";
 
   /** A logger we can use */
-  private static final Logger LOG = LoggerFactory.getLogger(MCFAuthorizer.class);
+  private static final ESLogger LOG = Loggers.getLogger(this.getClass());
 
   // Member variables
 



Mime
View raw message