Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API nameCreate Policy
Request TypePOST
Request URLservice/public/api/public/policy
 

Application/json

•HDFS Example:

Code Block
themeFadeToGrey
languagejs
titleHDFS Example
linenumberstrue
collapsetrue
 {
 "policyName": "HomePolicy",
 "resourceName": "/home,/apps",
 "description": "Home",
 "repositoryName": "hadoopdev",
 "repositoryType": "hdfs",
 "isEnabled": "true",
 "isRecursive": false,
 "isAuditEnabled": true,
 "permMapList": [
 {
 "userList": [
 "john",
 "andrew"
 ],
 "permList": [
 "SELECT",
 "UPDATE"
 ]
 },
 {
 "userList": [
 "hr"
 ],
 "groupList": [
 "admin"
 ],
 "permList": [
 "DROP",
 "ALTER",
 "ADMIN"
 ]
 }
 ]
}

•HBASE Example:

Code Block
themeFadeToGrey
languagejs
titleHBASE Example
linenumberstrue
collapsetrue
{
 "policyName": "FinancePolicy",
 "tables": "finance,hr",
 "columnFamilies": "invoices,emps",
 "columns": "amt, emp_id",
 "description": "HBase Policy",
 "repositoryName": "hbasedev",
 "repositoryType": "hbase",
 "isEnabled": "true",
 "isAuditEnabled": true,
 "tableType": "Inclusion",
 "columnType": "Inclusion",
 "permMapList": [
 {
 "userList": [
 "john",
 "andrew"
 ],
 "permList": [
 "Write",
 "Admin"
 ]
 },
 {
 "userList": [
 "hr"
 ],
 "groupList": [
 "admin"
 ],
 "permList": [
 "Read",
 "Write",
 "Admin"
 ]
 }
 ]
}

•HIVE Example:

Code Block
themeFadeToGrey
languagejs
titleHIVE Example
linenumberstrue
collapsetrue
{
 "policyName": "FinancePolicy",
 "databases": "finance,hr",
 "tables": "invoices,emps",
 "columns": "amt, emp_id",
 "udfs": "",
 "description": "Hive Policy",
 "repositoryName": "hivedev",
 "repositoryType": "hive",
 "tableType": "Exclusion",
 "columnType": "Inclusion",
 "isEnabled": true,
 "isAuditEnabled": true,
 "permMapList": [
 {
 "userList": [
 "john",
 "andrew"
 ],
 "permList": [
 "Write",
 "Admin"
 ]
 },
 {
 "userList": [
 "hr"
 ],
 "groupList": [
 "admin"
 ],
 "permList": [
 "Read",
 "Write",
 "Admin"
 ]
 }
 ]
}

 •KNOX Example:

Code Block
themeFadeToGrey
languagejs
titleKNOX Example
linenumberstrue
collapsetrue
{
 "policyName": "Fin Department Policy",
 "description": "Fin policy for Knox",
 "repositoryName": "knoxdev",
 "repositoryType": "Knox",
 "permMapList": [
 {
 "userList": [
 "policymgr_hbase",
 "policymgr_hive"
 ],
 "permList": [
 "Allow"
 ],
 "ipAddress": "192.168.0.1, 192.168.200.90"
 },
 {
 "userList": [
 "policymgr"
 ],
 "groupList": [
 "Grp1",
 "Grp2"
 ],
 "permList": [
 "Allow",
 "Admin"
 ]
 }
 ],
 "topologies": "topo1, topo2, topo3",
 "services": "service1, service2, service3",
 "isEnabled": true,
 "isRecursive": false,
 "isAuditEnabled": true
}

•STORM Example:

Code Block
themeFadeToGrey
languagejs
titleSTORM Example
linenumberstrue
collapsetrue
{
 "policyName": "Marketing Department Policy",
 "description": "Marketing Department policy",
 "repositoryName": "stormdev_updated",
 "repositoryType": "Storm",
 "permMapList": [
 {
 "userList": [
 "policymgr"
 ],
 "permList": [
 "getNimbusConf",
 "getClusterInfo",
 "rebalance"
 ]
 },
 {
 "userList": [
 "policymgr_hbase",
 "policymgr_hive"
 ],
 "permList": [
 "fileDownload",
 "fileUpload"
 ]
 }
 ],
 "topologies": "topo1, topo3",
 "isEnabled": true,
 "isRecursive": false,
 "isAuditEnabled": true
}


 Response 200 - Application/json

...