knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject git commit: KNOX-198 - add the service contributor changes to add webappsec provider and remove extraneous dependencies in pom.xml
Date Wed, 27 Nov 2013 16:07:12 GMT
Updated Branches:
  refs/heads/master 6a4101a0e -> 03853f968


KNOX-198 - add the service contributor changes to add webappsec provider and remove extraneous
dependencies in pom.xml

Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/03853f96
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/03853f96
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/03853f96

Branch: refs/heads/master
Commit: 03853f968e32fccd5a8bf45afe9b842648f5936c
Parents: 6a4101a
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Wed Nov 27 11:06:54 2013 -0500
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Wed Nov 27 11:06:54 2013 -0500

----------------------------------------------------------------------
 gateway-provider-security-webappsec/pom.xml     | 21 --------------------
 .../hbase/HBaseDeploymentContributor.java       |  6 +++++-
 .../gateway/hive/HiveDeploymentContributor.java |  1 +
 .../oozie/OozieDeploymentContributor.java       |  3 +++
 .../webhcat/WebHCatDeploymentContributor.java   |  1 +
 .../hdfs/WebHdfsDeploymentContributor.java      |  5 +++++
 .../ServiceDeploymentContributorBase.java       |  6 ++++++
 7 files changed, 21 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/03853f96/gateway-provider-security-webappsec/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-provider-security-webappsec/pom.xml b/gateway-provider-security-webappsec/pom.xml
index 02411d1..d88679f 100644
--- a/gateway-provider-security-webappsec/pom.xml
+++ b/gateway-provider-security-webappsec/pom.xml
@@ -42,27 +42,6 @@
         </dependency>
 
         <dependency>
-            <groupId>${gateway-group}</groupId>
-            <artifactId>gateway-util-common</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-cmf</artifactId>
-            <version>3.0.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/03853f96/gateway-service-hbase/src/main/java/org/apache/hadoop/gateway/hbase/HBaseDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-service-hbase/src/main/java/org/apache/hadoop/gateway/hbase/HBaseDeploymentContributor.java
b/gateway-service-hbase/src/main/java/org/apache/hadoop/gateway/hbase/HBaseDeploymentContributor.java
index e94c9f3..864c10e 100644
--- a/gateway-service-hbase/src/main/java/org/apache/hadoop/gateway/hbase/HBaseDeploymentContributor.java
+++ b/gateway-service-hbase/src/main/java/org/apache/hadoop/gateway/hbase/HBaseDeploymentContributor.java
@@ -39,7 +39,7 @@ public class HBaseDeploymentContributor extends ServiceDeploymentContributorBase
   private static final String EXTERNAL_PATH = "/hbase";
   private static final String CLUSTER_URL_FUNCTION = "{gateway.url}";
 
-  @Override
+  @Override 
   public String getRole() {
     return "WEBHBASE";
   }
@@ -67,6 +67,7 @@ public class HBaseDeploymentContributor extends ServiceDeploymentContributorBase
     ResourceDescriptor rootResource = context.getGatewayDescriptor().addResource();
     rootResource.role( service.getRole() );
     rootResource.pattern( EXTERNAL_PATH + "/?**" );
+    addWebAppSecFilters(context, service, rootResource);
     addAuthenticationFilter( context, service, rootResource );
     params = new ArrayList<FilterParamDescriptor>();
     params.add( rootResource.createFilterParam().name( "response.headers" ).value( getQualifiedName()
+ "/headers/outbound" ) );
@@ -77,6 +78,7 @@ public class HBaseDeploymentContributor extends ServiceDeploymentContributorBase
     ResourceDescriptor pathResource = context.getGatewayDescriptor().addResource();
     pathResource.role( service.getRole() );
     pathResource.pattern( EXTERNAL_PATH + "/**?**" );
+    addWebAppSecFilters(context, service, pathResource);
     addAuthenticationFilter( context, service, pathResource );
     params = new ArrayList<FilterParamDescriptor>();
     params.add( rootResource.createFilterParam().name( "response.headers" ).value( getQualifiedName()
+ "/headers/outbound" ) );
@@ -88,6 +90,7 @@ public class HBaseDeploymentContributor extends ServiceDeploymentContributorBase
     ResourceDescriptor statusResource = context.getGatewayDescriptor().addResource();
     statusResource.role( service.getRole() );
     statusResource.pattern( EXTERNAL_PATH + "/status/cluster?**" );
+    addWebAppSecFilters(context, service, statusResource);
     addAuthenticationFilter( context, service, statusResource );
     params = new ArrayList<FilterParamDescriptor>();
     params.add( statusResource.createFilterParam().name( "response.body" ).value( getQualifiedName()
+ "/status/outbound" ) );
@@ -99,6 +102,7 @@ public class HBaseDeploymentContributor extends ServiceDeploymentContributorBase
     ResourceDescriptor regionResource = context.getGatewayDescriptor().addResource();
     regionResource.role( service.getRole() );
     regionResource.pattern( EXTERNAL_PATH + "/*/regions?**" );
+    addWebAppSecFilters(context, service, regionResource);
     addAuthenticationFilter( context, service, regionResource );
     params = new ArrayList<FilterParamDescriptor>();
     params.add( regionResource.createFilterParam().name( "response.body" ).value( getQualifiedName()
+ "/regions/outbound" ) );

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/03853f96/gateway-service-hive/src/main/java/org/apache/hadoop/gateway/hive/HiveDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-service-hive/src/main/java/org/apache/hadoop/gateway/hive/HiveDeploymentContributor.java
b/gateway-service-hive/src/main/java/org/apache/hadoop/gateway/hive/HiveDeploymentContributor.java
index fb59c27..d0af1be 100644
--- a/gateway-service-hive/src/main/java/org/apache/hadoop/gateway/hive/HiveDeploymentContributor.java
+++ b/gateway-service-hive/src/main/java/org/apache/hadoop/gateway/hive/HiveDeploymentContributor.java
@@ -65,6 +65,7 @@ public class HiveDeploymentContributor extends ServiceDeploymentContributorBase
     ResourceDescriptor rootResource = context.getGatewayDescriptor().addResource();
     rootResource.role( service.getRole() );
     rootResource.pattern( EXTERNAL_PATH );
+    addWebAppSecFilters(context, service, rootResource);
     addAuthenticationFilter( context, service, rootResource );
     addRewriteFilter( context, service, rootResource );
     addIdentityAssertionFilter( context, service, rootResource );

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/03853f96/gateway-service-oozie/src/main/java/org/apache/hadoop/gateway/oozie/OozieDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-service-oozie/src/main/java/org/apache/hadoop/gateway/oozie/OozieDeploymentContributor.java
b/gateway-service-oozie/src/main/java/org/apache/hadoop/gateway/oozie/OozieDeploymentContributor.java
index fe78645..1ad19cd 100644
--- a/gateway-service-oozie/src/main/java/org/apache/hadoop/gateway/oozie/OozieDeploymentContributor.java
+++ b/gateway-service-oozie/src/main/java/org/apache/hadoop/gateway/oozie/OozieDeploymentContributor.java
@@ -69,6 +69,7 @@ public class OozieDeploymentContributor extends ServiceDeploymentContributorBase
     ResourceDescriptor rootResource = context.getGatewayDescriptor().addResource();
     rootResource.role( service.getRole() );
     rootResource.pattern( EXTERNAL_PATH + "/**?**" );
+    addWebAppSecFilters(context, service, rootResource);
     addAuthenticationFilter( context, service, rootResource );
     addRewriteFilter( context, service, rootResource );
     addIdentityAssertionFilter( context, service, rootResource );
@@ -78,6 +79,7 @@ public class OozieDeploymentContributor extends ServiceDeploymentContributorBase
     ResourceDescriptor v1Resource = context.getGatewayDescriptor().addResource();
     v1Resource.role( service.getRole() );
     v1Resource.pattern( EXTERNAL_PATH + "/v1/**?**" );
+    addWebAppSecFilters(context, service, v1Resource);
     addAuthenticationFilter( context, service, v1Resource );
     addRewriteFilter( context, service, v1Resource );
     addIdentityAssertionFilter( context, service, v1Resource );
@@ -87,6 +89,7 @@ public class OozieDeploymentContributor extends ServiceDeploymentContributorBase
     ResourceDescriptor v2Resource = context.getGatewayDescriptor().addResource();
     v2Resource.role( service.getRole() );
     v2Resource.pattern( EXTERNAL_PATH + "/v2/**?**" );
+    addWebAppSecFilters(context, service, v2Resource);
     addAuthenticationFilter( context, service, v2Resource );
     addRewriteFilter( context, service, v2Resource );
     addIdentityAssertionFilter( context, service, v2Resource );

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/03853f96/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java
b/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java
index d464920..b62f5c3 100644
--- a/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java
+++ b/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java
@@ -56,6 +56,7 @@ public class WebHCatDeploymentContributor extends ServiceDeploymentContributorBa
     ResourceDescriptor resource = context.getGatewayDescriptor().addResource();
     resource.role( service.getRole() );
     resource.pattern( WEBHCAT_EXTERNAL_PATH + "/**?**" );
+    addWebAppSecFilters(context, service, resource);
     if (topologyContainsProviderType(context, "authentication")) {
       context.contributeFilter( service, resource, "authentication", null, null );
     }

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/03853f96/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
b/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
index 7095e80..95f90eb 100644
--- a/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
+++ b/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
@@ -70,6 +70,7 @@ public class WebHdfsDeploymentContributor extends ServiceDeploymentContributorBa
     ResourceDescriptor rootResource = context.getGatewayDescriptor().addResource();
     rootResource.role( service.getRole() );
     rootResource.pattern( WEBHDFS_EXTERNAL_PATH + "/?**" );
+    addWebAppSecFilters(context, service, rootResource);
     addAuthenticationFilter( context, service, rootResource );
     params = new ArrayList<FilterParamDescriptor>();
     params.add( rootResource.createFilterParam().
@@ -82,6 +83,7 @@ public class WebHdfsDeploymentContributor extends ServiceDeploymentContributorBa
     ResourceDescriptor fileResource = context.getGatewayDescriptor().addResource();
     fileResource.role( service.getRole() );
     fileResource.pattern( WEBHDFS_EXTERNAL_PATH + "/**?**" );
+    addWebAppSecFilters(context, service, fileResource);
     addAuthenticationFilter( context, service, fileResource );
     params = new ArrayList<FilterParamDescriptor>();
     params.add( fileResource.createFilterParam().
@@ -96,6 +98,7 @@ public class WebHdfsDeploymentContributor extends ServiceDeploymentContributorBa
     ResourceDescriptor homeResource = context.getGatewayDescriptor().addResource();
     homeResource.role( service.getRole() );
     homeResource.pattern( WEBHDFS_EXTERNAL_PATH + "/~?**" );
+    addWebAppSecFilters(context, service, homeResource);
     addAuthenticationFilter( context, service, homeResource );
     params = new ArrayList<FilterParamDescriptor>();
     params.add( homeResource.createFilterParam().
@@ -108,6 +111,7 @@ public class WebHdfsDeploymentContributor extends ServiceDeploymentContributorBa
     ResourceDescriptor homeFileResource = context.getGatewayDescriptor().addResource();
     homeFileResource.role( service.getRole() );
     homeFileResource.pattern( WEBHDFS_EXTERNAL_PATH + "/~/**?**" );
+    addWebAppSecFilters(context, service, homeFileResource);
     addAuthenticationFilter( context, service, homeFileResource );
     params = new ArrayList<FilterParamDescriptor>();
     params.add( homeFileResource.createFilterParam().
@@ -125,6 +129,7 @@ public class WebHdfsDeploymentContributor extends ServiceDeploymentContributorBa
     ResourceDescriptor fileResource = context.getGatewayDescriptor().addResource();
     fileResource.role( service.getRole() );
     fileResource.pattern( DATANODE_EXTERNAL_PATH + "/**?**" );
+    addWebAppSecFilters(context, service, fileResource);
     addAuthenticationFilter( context, service, fileResource );
     addIdentityAssertionFilter( context, service, fileResource );
     addAuthorizationFilter( context, service, fileResource );

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/03853f96/gateway-spi/src/main/java/org/apache/hadoop/gateway/deploy/ServiceDeploymentContributorBase.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/deploy/ServiceDeploymentContributorBase.java
b/gateway-spi/src/main/java/org/apache/hadoop/gateway/deploy/ServiceDeploymentContributorBase.java
index 95d72e2..83a67cd 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/deploy/ServiceDeploymentContributorBase.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/deploy/ServiceDeploymentContributorBase.java
@@ -53,6 +53,12 @@ public abstract class ServiceDeploymentContributorBase extends DeploymentContrib
     return p;
   }
   
+  protected void addWebAppSecFilters( DeploymentContext context, Service service, ResourceDescriptor
resource ) {
+    if (topologyContainsProviderType(context, "webappsec")) {
+      context.contributeFilter( service, resource, "webappsec", null, null );
+    }
+  }
+
   protected void addAuthenticationFilter( DeploymentContext context, Service service, ResourceDescriptor
resource ) {
     if (topologyContainsProviderType(context, "authentication")) {
       context.contributeFilter( service, resource, "authentication", null, null );


Mime
View raw message