Security
Also available as:
PDF
loading table of contents...
Update Policy

API Name

update policy

Request Type

PUT

Request URL

service/public/v2/api/policy/{id}

Request Parameters

Application/json

HDFS Example:

{
 "policyName": "HomePolicy",
 "resourceName": "/home,/apps",
 "description": "Home",
 "isEnabled": true,
 "isRecursive": false,
 "isAuditEnabled": true,
 "repositoryName": "hadoopdev",
 "repositoryType": "hdfs",
 "permMapList": [
 {
 "userList": [
 "john",
 "andrew"
 ],
 "permList": [
 "Write",
 "Admin"
 ]
 },
 {
 "userList": [
 "hr"
 ],
 "groupList": [
 "admin"
 ],
 "permList": [
 "Read",
 "Write",
 "Admin"
 ]
 }
 ]
}

HBase Example:

{
 "name": "hbasedev",
 "description": "HBase Dev",
 "isActive": "true",
 "repositoryType": "hbase"
config: “{
 "username": "hbase",
 "password": "*****",
 "hadoop.security.authentication": "kerberos",
 "hbase.master.kerberos.principal": "hbase/_HOST@EXAMPLE.COM",
 "hbase.security.authentication": "kerberos",
 "hbase.zookeeper.property.clientPort": "2181",
 "hbase.zookeeper.quorum": "ip-172-31-38-49.ec2.internal",
 "zookeeper.znode.parent": "/hbase"
 }”
}

Hive Example:

{
 "name": "hivedev",
 "description": "Hive Dev",
 "isActive": "true",
 "repositoryType": "hive"
config: "{
 "username": "policymgr_hive",
 "password": "policymgr_hive",
 "jdbc.driverClassName": "org.apache.hive.jdbc.HiveDriver",
 "jdbc.url": "jdbc:hive2://127.0.0.1:10000/default",
 "commonNameForCertificate": ""
 }"
}

Knox Example:

{
 "policyName": "Fin Department Policy Updated",
 "description": "Fin policy for Knox",
 "repositoryName": "knoxdev",
 "repositoryType": "Knox",
 "permMapList": [
 {
 "userList": [
 "policymgr"
 ],
 "groupList": [
 "Grp1",
 "Grp2"
 ],
 "permList": [
 "Allow",
 "Admin"
 ],
 "ipAddress": "192.168.0.220,ipAddress2"
 },
 {
 "userList": [
 "policymgr_hive",
 "policymgr_hbase"
 ],
 "permList": [
 "Allow"
 ]
 }
 ],
 "topologies": "topo1, topo2, topo3",
 "services": "service1, service2, service3",
 "isEnabled": true,
 "isAuditEnabled": true
}

Storm Example:

{
 "name": "stormdev_updated",
 "description": "Storm Repo.. Updated",
 "repositoryType": "Storm",
"config": “{
 "username": "storm",
 "password": "*****",
 "nimbus.url": "http://ip-172-31-38-49.ec2.internal:8080/index.html",
 "commonNameForCertificate": ""
 }”
"isActive": true
}

Response

200 - Application/json