You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2018/03/08 11:45:36 UTC

atlas git commit: ATLAS-2486 :- Policy json file for authorization in distro conf

Repository: atlas
Updated Branches:
  refs/heads/master a6b3521e0 -> e96b1accc


ATLAS-2486 :- Policy json file for authorization in distro conf

Signed-off-by: kevalbhatt <kb...@apache.org>


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

Branch: refs/heads/master
Commit: e96b1accc2d2de4c00edb78afefcc66862f48790
Parents: a6b3521
Author: nixonrodrigues <ni...@apache.org>
Authored: Wed Mar 7 19:14:24 2018 +0530
Committer: kevalbhatt <kb...@apache.org>
Committed: Thu Mar 8 17:15:09 2018 +0530

----------------------------------------------------------------------
 distro/src/conf/atlas-simple-authz-policy.json | 61 +++++++++++++++++++++
 distro/src/conf/policy-store.txt               |  9 ---
 2 files changed, 61 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/e96b1acc/distro/src/conf/atlas-simple-authz-policy.json
----------------------------------------------------------------------
diff --git a/distro/src/conf/atlas-simple-authz-policy.json b/distro/src/conf/atlas-simple-authz-policy.json
new file mode 100644
index 0000000..01104a8
--- /dev/null
+++ b/distro/src/conf/atlas-simple-authz-policy.json
@@ -0,0 +1,61 @@
+{
+  "roles": {
+    "ROLE_ADMIN": {
+      "adminPermissions": [
+        {
+          "privileges": [ ".*" ]
+        }
+      ],
+
+      "entityPermissions": [
+        {
+          "privileges":      [ ".*" ],
+          "entityTypes":     [ ".*" ],
+          "entityIds":       [ ".*" ],
+          "classifications": [ ".*" ]
+        }
+      ],
+
+      "typePermissions": [
+        {
+          "privileges":     [ ".*" ],
+          "typeCategories": [ ".*" ],
+          "typeNames":      [ ".*" ]
+        }
+      ]
+    },
+
+    "DATA_SCIENTIST": {
+      "entityPermissions": [
+        {
+          "privileges":      [ "entity-read", "entity-read-classification" ],
+          "entityTypes":     [ ".*" ],
+          "entityIds":       [ ".*" ],
+          "classifications": [ ".*" ]
+        }
+      ]
+    },
+
+    "DATA_STEWARD": {
+      "entityPermissions": [
+        {
+          "privileges":      [ "entity-read", "entity-create", "entity-update", "entity-read-classification", "entity-add-classification", "entity-update-classification", "entity-remove-classification" ],
+          "entityTypes":     [ ".*" ],
+          "entityIds":       [ ".*" ],
+          "classifications": [ ".*" ]
+        }
+      ]
+    }
+  },
+
+  "userRoles": {
+    "admin": [ "ROLE_ADMIN" ]
+  },
+
+  "groupRoles": {
+    "ROLE_ADMIN":      [ "ROLE_ADMIN" ],
+    "hadoop":          [ "DATA_STEWARD" ],
+    "DATA_STEWARD":    [ "DATA_STEWARD" ],
+    "RANGER_TAG_SYNC": [ "DATA_SCIENTIST" ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/atlas/blob/e96b1acc/distro/src/conf/policy-store.txt
----------------------------------------------------------------------
diff --git a/distro/src/conf/policy-store.txt b/distro/src/conf/policy-store.txt
deleted file mode 100644
index 58d4d4c..0000000
--- a/distro/src/conf/policy-store.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-##Policy Format
-##r-READ, w-WRITE, u-UPDATE, d-DELETE
-##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name
-##
-adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:*,relationship:*
-dataScientistPolicy;;;;DATA_SCIENTIST:r;;type:*,entity:*,relationship:*
-dataStewardPolicy;;;;DATA_STEWARD:rwu;;type:*,entity:*,relationship:*
-hadoopPolicy;;;;hadoop:rwud;;type:*,entity:*,operation:*,relationship:*
-rangerTagSyncPolicy;;;;RANGER_TAG_SYNC:r;;type:*,entity:*