ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject ranger git commit: RANGER-2209: Added Ranger service definition for ABFS
Date Tue, 16 Oct 2018 20:53:20 GMT
Repository: ranger
Updated Branches:
  refs/heads/ranger-1.1 452bf480c -> 9e783c5b0


RANGER-2209: Added Ranger service definition for ABFS

Signed-off-by: Velmurugan Periasamy <vel@apache.org>
(cherry picked from commit db7e261448411eabe233bf34631ea209ab6a42bb)


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

Branch: refs/heads/ranger-1.1
Commit: 9e783c5b0a3634e9781c50f641ccbd88d6033297
Parents: 452bf48
Author: Yuan Gao <gayua@microsoft.com>
Authored: Tue Oct 9 16:34:52 2018 -0700
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Tue Oct 16 16:53:16 2018 -0400

----------------------------------------------------------------------
 .../plugin/store/EmbeddedServiceDefsUtil.java   |   5 +
 .../service-defs/ranger-servicedef-abfs.json    | 123 +++++++++++++++++++
 2 files changed, 128 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/9e783c5b/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
----------------------------------------------------------------------
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
b/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
index 75dc128..118af1f 100755
--- a/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
@@ -67,6 +67,7 @@ public class EmbeddedServiceDefsUtil {
 	public static final String EMBEDDED_SERVICEDEF_WASB_NAME  = "wasb";
 	public static final String EMBEDDED_SERVICEDEF_SQOOP_NAME = "sqoop";
 	public static final String EMBEDDED_SERVICEDEF_KYLIN_NAME  = "kylin";
+	public static final String EMBEDDED_SERVICEDEF_ABFS_NAME  = "abfs";
 
 	public static final String PROPERTY_CREATE_EMBEDDED_SERVICE_DEFS = "ranger.service.store.create.embedded.service-defs";
 
@@ -100,6 +101,7 @@ public class EmbeddedServiceDefsUtil {
 	private RangerServiceDef wasbServiceDef;
 	private RangerServiceDef sqoopServiceDef;
 	private RangerServiceDef kylinServiceDef;
+	private RangerServiceDef abfsServiceDef;
 
 	private RangerServiceDef tagServiceDef;
 
@@ -142,6 +144,7 @@ public class EmbeddedServiceDefsUtil {
 			wasbServiceDef = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_WASB_NAME);
 			sqoopServiceDef = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_SQOOP_NAME);
 			kylinServiceDef = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_KYLIN_NAME);
+			abfsServiceDef = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_ABFS_NAME);
 
 			// Ensure that tag service def is updated with access types of all service defs
 			store.updateTagServiceDefForAccessTypes();
@@ -212,6 +215,8 @@ public class EmbeddedServiceDefsUtil {
 
 	public long getWasbServiceDefId() { return getId(wasbServiceDef); }
 
+	public long getAbfsServiceDefId() { return getId(abfsServiceDef); }
+
 	public RangerServiceDef getEmbeddedServiceDef(String defType) throws Exception {
 		RangerServiceDef serviceDef=null;
 		if(StringUtils.isNotEmpty(defType)){

http://git-wip-us.apache.org/repos/asf/ranger/blob/9e783c5b/agents-common/src/main/resources/service-defs/ranger-servicedef-abfs.json
----------------------------------------------------------------------
diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-abfs.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-abfs.json
new file mode 100644
index 0000000..18454de
--- /dev/null
+++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-abfs.json
@@ -0,0 +1,123 @@
+{
+  "id":103,
+  "name": "abfs",
+  "implClass": "",
+  "label": "Azure Blob File System",
+  "description": "Ranger plugin for ABFS",
+  "guid":"",
+  "options": { "enableDenyAndExceptionsInPolicies": "true" },
+  "resources": [
+    {
+      "itemId": 1,
+      "name": "storageaccount",
+      "type": "string",
+      "parent": "",
+      "level": 10,
+      "mandatory": true,
+      "lookupSupported": false,
+      "excludesSupported": false,
+      "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
+      "matcherOptions": {"wildCard":true, "ignoreCase":false},
+      "validationRegEx": "",
+      "validationMessage": "",
+      "uiHint": "",
+      "label": "Storage Account",
+      "description": "Storage Account for the Path"
+    },
+    {
+      "itemId":2,
+      "name": "container",
+      "type": "string",
+      "parent": "storageaccount",
+      "level":20,
+      "mandatory": true,
+      "lookupSupported": false,
+      "excludesSupported": false,
+      "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
+      "matcherOptions": {"wildCard":true, "ignoreCase":false},
+      "validationRegEx":"",
+      "validationMessage": "",
+      "uiHint":"",
+      "label": "Storage Account Container",
+      "description": "Storage Account Container for the Path"
+    },
+    {
+      "itemId":3,
+      "name": "relativepath",
+      "type": "path",
+      "parent": "container",
+      "level":30,
+      "mandatory": true,
+      "lookupSupported": true,
+      "recursiveSupported": true,
+      "excludesSupported": false,
+      "matcher": "org.apache.ranger.plugin.resourcematcher.RangerPathResourceMatcher",
+      "matcherOptions": {"wildCard":true, "ignoreCase":false},
+      "validationRegEx":"^[/*]$|^\/.*?[^\/]$",
+      "validationMessage": "Relative Path must not end with a slash",
+      "uiHint":"",
+      "label": "Relative Path",
+      "description": "Relative Path inside Storage Account Container"
+    }
+  ],
+  "accessTypes":
+  [
+    {
+      "itemId": 1,
+      "name": "read",
+      "label": "Read"
+    },
+    {
+      "itemId": 2,
+      "name": "write",
+      "label": "Write"
+    }
+  ],
+  "configs":
+  [
+    {
+      "itemId": 1,
+      "name": "username",
+      "type": "string",
+      "subType": "",
+      "mandatory": false,
+      "validationRegEx":"",
+      "validationMessage": "",
+      "uiHint":"",
+      "label": "Username"
+    },
+    {
+      "itemId": 2,
+      "name": "password",
+      "type": "string",
+      "subType": "",
+      "mandatory": false,
+      "validationRegEx":"",
+      "validationMessage": "",
+      "uiHint":"",
+      "label": "Password"
+    },
+    {
+      "itemId":3,
+      "name": "commonNameForCertificate",
+      "type": "string",
+      "subType": "",
+      "mandatory": false,
+      "validationRegEx":"",
+      "validationMessage": "",
+      "uiHint":"",
+      "label": "Common Name for Certificate"
+    }
+  ],
+  "contextEnrichers": [],
+  "policyConditions":
+  [
+    {
+      "itemId": 1,
+      "name": "ip-range",
+      "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerIpMatcher",
+      "label": "IP Address Range",
+      "description": "IP Address Range"
+    }
+  ]
+}
\ No newline at end of file


Mime
View raw message