You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2016/05/16 05:38:38 UTC

[1/3] storm git commit: added acl validation config

Repository: storm
Updated Branches:
  refs/heads/master b341e123e -> 9a792c149


added acl validation config


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/8c7c197d
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/8c7c197d
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/8c7c197d

Branch: refs/heads/master
Commit: 8c7c197d03af76681111fedbc3a7d812f1d79b5f
Parents: e14f429
Author: Sanket <sc...@untilservice-lm>
Authored: Wed Mar 30 11:36:27 2016 -0500
Committer: Sanket <sc...@untilservice-lm>
Committed: Wed Mar 30 11:36:27 2016 -0500

----------------------------------------------------------------------
 conf/defaults.yaml                                       |  2 ++
 storm-core/src/jvm/org/apache/storm/Config.java          | 11 +++++++++--
 .../org/apache/storm/blobstore/BlobStoreAclHandler.java  | 10 ++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/8c7c197d/conf/defaults.yaml
----------------------------------------------------------------------
diff --git a/conf/defaults.yaml b/conf/defaults.yaml
index 215a84d..6093f07 100644
--- a/conf/defaults.yaml
+++ b/conf/defaults.yaml
@@ -133,6 +133,8 @@ nimbus.blobstore.expiration.secs: 600
 storm.blobstore.inputstream.buffer.size.bytes: 65536
 client.blobstore.class: "org.apache.storm.blobstore.NimbusBlobStore"
 storm.blobstore.replication.factor: 3
+# For secure mode we would want to change this config to true
+storm.blobstore.acl.validation.enabled: false
 
 ### supervisor.* configs are for node supervisors
 # Define the amount of workers that can be run on this machine. Each worker is assigned a port to use for communication

http://git-wip-us.apache.org/repos/asf/storm/blob/8c7c197d/storm-core/src/jvm/org/apache/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/Config.java b/storm-core/src/jvm/org/apache/storm/Config.java
index 083befb..c0fe8fc 100644
--- a/storm-core/src/jvm/org/apache/storm/Config.java
+++ b/storm-core/src/jvm/org/apache/storm/Config.java
@@ -940,7 +940,7 @@ public class Config extends HashMap<String, Object> {
 
     /**
      * The maximum number of threads that should be used by the Pacemaker.
-     * When Pacemaker gets loaded it will spawn new threads, up to 
+     * When Pacemaker gets loaded it will spawn new threads, up to
      * this many total, to handle the load.
      */
     @isNumber
@@ -964,7 +964,7 @@ public class Config extends HashMap<String, Object> {
      */
     @CustomValidator(validatorClass=PacemakerAuthTypeValidator.class)
     public static final String PACEMAKER_AUTH_METHOD = "pacemaker.auth.method";
-    
+
     /**
      * List of DRPC servers so that the DRPCSpout knows who to talk to.
      */
@@ -1258,6 +1258,13 @@ public class Config extends HashMap<String, Object> {
     public static final String STORM_BLOBSTORE_REPLICATION_FACTOR = "storm.blobstore.replication.factor";
 
     /**
+     *  For secure mode we would want to turn on this config
+     *  By default this is turned off assuming the default is insecure
+     */
+    @isBoolean
+    public static final String STORM_BLOBSTORE_ACL_VALIDATION_ENABLED = "storm.blobstore.acl.validation.enabled";
+
+    /**
      * What blobstore implementation nimbus should use.
      */
     @isString

http://git-wip-us.apache.org/repos/asf/storm/blob/8c7c197d/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreAclHandler.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreAclHandler.java b/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreAclHandler.java
index 8194e91..5b3866d 100644
--- a/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreAclHandler.java
+++ b/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreAclHandler.java
@@ -54,6 +54,7 @@ public class BlobStoreAclHandler {
     public static final List<AccessControl> DEFAULT = new ArrayList<AccessControl>();
     private Set<String> _supervisors;
     private Set<String> _admins;
+    private boolean doAclValidation;
 
     public BlobStoreAclHandler(Map conf) {
         _ptol = AuthUtils.GetPrincipalToLocalPlugin(conf);
@@ -65,6 +66,9 @@ public class BlobStoreAclHandler {
         if (conf.containsKey(Config.NIMBUS_ADMINS)) {
             _admins.addAll((List<String>)conf.get(Config.NIMBUS_ADMINS));
         }
+        if (conf.containsKey(Config.STORM_BLOBSTORE_ACL_VALIDATION_ENABLED)) {
+           doAclValidation = (boolean)conf.get(Config.STORM_BLOBSTORE_ACL_VALIDATION_ENABLED);
+        }
     }
 
     private static AccessControlType parseACLType(String type) {
@@ -245,6 +249,9 @@ public class BlobStoreAclHandler {
      * @throws AuthorizationException
      */
     public void hasAnyPermissions(List<AccessControl> acl, int mask, Subject who, String key) throws AuthorizationException {
+        if (!doAclValidation) {
+            return;
+        }
         Set<String> user = constructUserFromPrincipals(who);
         LOG.debug("user {}", user);
         if (checkForValidUsers(who, mask)) {
@@ -275,6 +282,9 @@ public class BlobStoreAclHandler {
      * @throws AuthorizationException
      */
     public void hasPermissions(List<AccessControl> acl, int mask, Subject who, String key) throws AuthorizationException {
+        if (!doAclValidation) {
+            return;
+        }
         Set<String> user = constructUserFromPrincipals(who);
         LOG.debug("user {}", user);
         if (checkForValidUsers(who, mask)) {


[2/3] storm git commit: Merge branch 'STORM-1661' of https://github.com/redsanket/storm into STORM-1661

Posted by ka...@apache.org.
Merge branch 'STORM-1661' of https://github.com/redsanket/storm into STORM-1661


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/00804b47
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/00804b47
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/00804b47

Branch: refs/heads/master
Commit: 00804b47afbf9ebc4ee2f834c568bb6e5de31762
Parents: b341e12 8c7c197
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Mon May 16 14:35:49 2016 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Mon May 16 14:35:49 2016 +0900

----------------------------------------------------------------------
 conf/defaults.yaml                                       |  2 ++
 storm-core/src/jvm/org/apache/storm/Config.java          | 11 +++++++++--
 .../org/apache/storm/blobstore/BlobStoreAclHandler.java  | 10 ++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/00804b47/conf/defaults.yaml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/00804b47/storm-core/src/jvm/org/apache/storm/Config.java
----------------------------------------------------------------------


[3/3] storm git commit: add STORM-1661 to CHANGELOG.md

Posted by ka...@apache.org.
add STORM-1661 to CHANGELOG.md


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/9a792c14
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/9a792c14
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/9a792c14

Branch: refs/heads/master
Commit: 9a792c1492ae52ae75bcc8730c637dbb874dac2a
Parents: 00804b4
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Mon May 16 14:38:06 2016 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Mon May 16 14:38:06 2016 +0900

----------------------------------------------------------------------
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/9a792c14/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ddf399b..6df2374 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -84,6 +84,7 @@
  * STORM-1769: Added a test to check local nimbus with notifier plugin
 
 ## 1.0.2
+ * STORM-1661: Introduce a config to turn off blobstore acl validation in insecure mode
  * STORM-1773: Utils.javaDeserialize() doesn't work with primitive types
  
 ## 1.0.1