Page tree
Skip to end of metadata
Go to start of metadata

 

Apache Ranger PUBLIC REST APIs


Service Definition APIs

Get Service Definition by id

API Name

Get Service Definition

Request Type

GET

Request URL

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

Request Params

 

Response

• HDFS Example Response:

{
    "accessTypes": [
        {
            "impliedGrants": [],
            "itemId": 1,
            "label": "Read",
            "name": "read"
        },
        {
            "impliedGrants": [],
            "itemId": 2,
            "label": "Write",
            "name": "write"
        },
        {
            "impliedGrants": [],
            "itemId": 3,
            "label": "Execute",
            "name": "execute"
        }
    ],
    "configs": [
        {
            "itemId": 1,
            "label": "Username",
            "mandatory": true,
            "name": "username",
            "subType": "",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 2,
            "label": "Password",
            "mandatory": true,
            "name": "password",
            "subType": "",
            "type": "password",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 3,
            "label": "Namenode URL",
            "mandatory": true,
            "name": "fs.default.name",
            "subType": "",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "defaultValue": "false",
            "itemId": 4,
            "label": "Authorization Enabled",
            "mandatory": true,
            "name": "hadoop.security.authorization",
            "subType": "YesTrue:NoFalse",
            "type": "bool",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "defaultValue": "simple",
            "itemId": 5,
            "label": "Authentication Type",
            "mandatory": true,
            "name": "hadoop.security.authentication",
            "subType": "authnType",
            "type": "enum",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 6,
            "mandatory": false,
            "name": "hadoop.security.auth_to_local",
            "subType": "",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 7,
            "mandatory": false,
            "name": "dfs.datanode.kerberos.principal",
            "subType": "",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 8,
            "mandatory": false,
            "name": "dfs.namenode.kerberos.principal",
            "subType": "",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 9,
            "mandatory": false,
            "name": "dfs.secondary.namenode.kerberos.principal",
            "subType": "",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "defaultValue": "authentication",
            "itemId": 10,
            "label": "RPC Protection Type",
            "mandatory": false,
            "name": "hadoop.rpc.protection",
            "subType": "rpcProtection",
            "type": "enum",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 11,
            "label": "Common Name for Certificate",
            "mandatory": false,
            "name": "commonNameForCertificate",
            "subType": "",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "contextEnrichers": [],
    "createTime": 1450756476000,
    "description": "HDFS Repository",
    "enums": [
        {
            "defaultIndex": 0,
            "elements": [
                {
                    "itemId": 1,
                    "label": "Simple",
                    "name": "simple"
                },
                {
                    "itemId": 2,
                    "label": "Kerberos",
                    "name": "kerberos"
                }
            ],
            "itemId": 1,
            "name": "authnType"
        },
        {
            "defaultIndex": 0,
            "elements": [
                {
                    "itemId": 1,
                    "label": "Authentication",
                    "name": "authentication"
                },
                {
                    "itemId": 2,
                    "label": "Integrity",
                    "name": "integrity"
                },
                {
                    "itemId": 3,
                    "label": "Privacy",
                    "name": "privacy"
                }
            ],
            "itemId": 2,
            "name": "rpcProtection"
        }
    ],
    "guid": "0d047247-bafe-4cf8-8e9b-d5d377284b2d",
    "id": 1,
    "implClass": "org.apache.ranger.services.hdfs.RangerServiceHdfs",
    "isEnabled": true,
    "label": "HDFS Repository",
    "name": "hdfs",
    "options": {},
    "policyConditions": [],
    "resources": [
        {
            "description": "HDFS file or directory path",
            "excludesSupported": false,
            "itemId": 1,
            "label": "Resource Path",
            "level": 10,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerPathResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "false",
                "wildCard": "true"
            },
            "name": "path",
            "recursiveSupported": true,
            "type": "path",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "updateTime": 1450756477000,
    "version": 1
}

Get Service Definition by name

API Name

Get Service Definition

Request Type

GET

Request URL

service/public/v2/api/servicedef/name/{name}

Request Params

 

Response

• Hive Example Response:

{
    "accessTypes": [
        {
            "impliedGrants": [],
            "itemId": 1,
            "label": "select",
            "name": "select"
        },
        {
            "impliedGrants": [],
            "itemId": 2,
            "label": "update",
            "name": "update"
        },
        {
            "impliedGrants": [],
            "itemId": 3,
            "label": "Create",
            "name": "create"
        },
        {
            "impliedGrants": [],
            "itemId": 4,
            "label": "Drop",
            "name": "drop"
        },
        {
            "impliedGrants": [],
            "itemId": 5,
            "label": "Alter",
            "name": "alter"
        },
        {
            "impliedGrants": [],
            "itemId": 6,
            "label": "Index",
            "name": "index"
        },
        {
            "impliedGrants": [],
            "itemId": 7,
            "label": "Lock",
            "name": "lock"
        },
        {
            "impliedGrants": [
                "select",
                "update",
                "create",
                "drop",
                "alter",
                "index",
                "lock"
            ],
            "itemId": 8,
            "label": "All",
            "name": "all"
        }
    ],
    "configs": [
        {
            "itemId": 1,
            "label": "Username",
            "mandatory": true,
            "name": "username",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 2,
            "label": "Password",
            "mandatory": true,
            "name": "password",
            "type": "password",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "defaultValue": "org.apache.hive.jdbc.HiveDriver",
            "itemId": 3,
            "mandatory": true,
            "name": "jdbc.driverClassName",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "defaultValue": "",
            "itemId": 4,
            "mandatory": true,
            "name": "jdbc.url",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 5,
            "label": "Common Name for Certificate",
            "mandatory": false,
            "name": "commonNameForCertificate",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "contextEnrichers": [],
    "createTime": 1450756479000,
    "description": "Hive Server2",
    "enums": [],
    "guid": "3e1afb5a-184a-4e82-9d9c-87a5cacc243c",
    "id": 3,
    "implClass": "org.apache.ranger.services.hive.RangerServiceHive",
    "isEnabled": true,
    "label": "Hive Server2",
    "name": "hive",
    "options": {},
    "policyConditions": [
        {
            "description": "List of Hive resources",
            "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerHiveResourcesAccessedTogetherCondition",
            "evaluatorOptions": {},
            "itemId": 1,
            "label": "Hive Resources Accessed Together?",
            "name": "resources-accessed-together"
        }
    ],
    "resources": [
        {
            "description": "Hive Database",
            "excludesSupported": true,
            "itemId": 1,
            "label": "Hive Database",
            "level": 10,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "database",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Hive Table",
            "excludesSupported": true,
            "itemId": 2,
            "label": "Hive Table",
            "level": 20,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "table",
            "parent": "database",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Hive UDF",
            "excludesSupported": true,
            "itemId": 3,
            "label": "Hive UDF",
            "level": 20,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "udf",
            "parent": "database",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Hive Column",
            "excludesSupported": true,
            "itemId": 4,
            "label": "Hive Column",
            "level": 30,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "column",
            "parent": "table",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "updateTime": 1450756479000,
    "version": 1
}

Create Service Definition

API Name

Create Service Definition

Request Type

Post

Request URL

service/public/v2/api/servicedef

Request Params

application/json

• Example:

{
    "accessTypes": [
        {
            "impliedGrants": [],
            "itemId": 1,
            "label": "select",
            "name": "select"
        },
        {
            "impliedGrants": [],
            "itemId": 2,
            "label": "update",
            "name": "update"
        },
        {
            "impliedGrants": [],
            "itemId": 3,
            "label": "Create",
            "name": "create"
        },
        {
            "impliedGrants": [],
            "itemId": 4,
            "label": "Drop",
            "name": "drop"
        },
        {
            "impliedGrants": [
                "select",
                "update",
                "create",
                "drop"
            ],
            "itemId": 5,
            "label": "All",
            "name": "all"
        }
    ],
    "configs": [
        {
            "itemId": 1,
            "label": "Username",
            "mandatory": true,
            "name": "username",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 2,
            "label": "Password",
            "mandatory": true,
            "name": "password",
            "type": "password",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "contextEnrichers": [],
    "description": "Test Component",
    "enums": [],
    "implClass": "org.apache.ranger.services.test.RangerServiceTest",
    "isEnabled": true,
    "label": "Test Component",
    "name": "test",
    "options": {},
    "policyConditions": [],
    "resources": [
        {
            "description": "Root Of Resource Hierarchy for Test Component",
            "excludesSupported": true,
            "itemId": 1,
            "label": "Test Root Resource",
            "level": 10,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Sub Resource for Test Component",
            "excludesSupported": true,
            "itemId": 2,
            "label": "Test sub resource",
            "level": 20,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "sub",
            "parent": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "version": 1
}

Response

200-Application/json

{
    "accessTypes": [
        {
            "impliedGrants": [],
            "itemId": 1,
            "label": "select",
            "name": "select"
        },
        {
            "impliedGrants": [],
            "itemId": 2,
            "label": "update",
            "name": "update"
        },
        {
            "impliedGrants": [],
            "itemId": 3,
            "label": "Create",
            "name": "create"
        },
        {
            "impliedGrants": [],
            "itemId": 4,
            "label": "Drop",
            "name": "drop"
        },
        {
            "impliedGrants": [
                "select",
                "update",
                "create",
                "drop"
            ],
            "itemId": 5,
            "label": "All",
            "name": "all"
        }
    ],
    "configs": [
        {
            "itemId": 1,
            "label": "Username",
            "mandatory": true,
            "name": "username",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 2,
            "label": "Password",
            "mandatory": true,
            "name": "password",
            "type": "password",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "contextEnrichers": [],
    "createTime": 1451347300617,
    "createdBy": "Admin",
    "description": "Test Component",
    "enums": [],
    "guid": "f889f2d3-920a-4504-9905-809bbc417902",
    "id": 101,
    "implClass": "org.apache.ranger.services.test.RangerServiceTest",
    "isEnabled": true,
    "label": "Test Component",
    "name": "test",
    "options": {},
    "policyConditions": [],
    "resources": [
        {
            "description": "Root Of Resource Hierarchy for Test Component",
            "excludesSupported": true,
            "itemId": 1,
            "label": "Test Root Resource",
            "level": 10,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Sub Resource for Test Component",
            "excludesSupported": true,
            "itemId": 2,
            "label": "Test sub resource",
            "level": 20,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "sub",
            "parent": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "updateTime": 1451347300618,
    "updatedBy": "Admin",
    "version": 1
}

Update Service Definition by id

API Name

Update Service Definition

Request Type

PUT

Request URL

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

Request Params

Application/json

• Example:

{
    "accessTypes": [
        {
            "impliedGrants": [],
            "itemId": 1,
            "label": "select",
            "name": "select"
        },
        {
            "impliedGrants": [],
            "itemId": 2,
            "label": "update",
            "name": "update"
        },
        {
            "impliedGrants": [],
            "itemId": 3,
            "label": "Create",
            "name": "create"
        },
        {
            "impliedGrants": [],
            "itemId": 4,
            "label": "Drop",
            "name": "drop"
        },
        {
            "impliedGrants": [],
            "itemId": 5,
            "label": "Index",
            "name": "index"
        },
        {
            "impliedGrants": [
                "select",
                "update",
                "create",
                "drop",
                "index"
            ],
            "itemId": 6,
            "label": "All",
            "name": "all"
        }
    ],
    "configs": [
        {
            "itemId": 1,
            "label": "Username",
            "mandatory": true,
            "name": "username",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 2,
            "label": "Password",
            "mandatory": true,
            "name": "password",
            "type": "password",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "contextEnrichers": [],
    "description": "Test Component",
    "enums": [],
    "implClass": "org.apache.ranger.services.test.RangerServiceTest",
    "isEnabled": true,
    "label": "Test Component",
    "name": "test",
    "options": {},
    "policyConditions": [],
    "resources": [
        {
            "description": "Root Of Resource Hierarchy for Test Component",
            "excludesSupported": true,
            "itemId": 1,
            "label": "Test Root Resource",
            "level": 10,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Sub Resource for Test Component",
            "excludesSupported": true,
            "itemId": 2,
            "label": "Test sub resource",
            "level": 20,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "sub",
            "parent": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ]
}

Response

200-Application/json

{
    "accessTypes": [
        {
            "impliedGrants": [],
            "itemId": 1,
            "label": "select",
            "name": "select"
        },
        {
            "impliedGrants": [],
            "itemId": 2,
            "label": "update",
            "name": "update"
        },
        {
            "impliedGrants": [],
            "itemId": 3,
            "label": "Create",
            "name": "create"
        },
        {
            "impliedGrants": [],
            "itemId": 4,
            "label": "Drop",
            "name": "drop"
        },
        {
            "impliedGrants": [],
            "itemId": 5,
            "label": "Index",
            "name": "index"
        },
        {
            "impliedGrants": [
                "select",
                "update",
                "create",
                "drop",
                "index"
            ],
            "itemId": 6,
            "label": "All",
            "name": "all"
        }
    ],
    "configs": [
        {
            "itemId": 1,
            "label": "Username",
            "mandatory": true,
            "name": "username",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 2,
            "label": "Password",
            "mandatory": true,
            "name": "password",
            "type": "password",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "contextEnrichers": [],
    "createTime": 1451347301000,
    "createdBy": "Admin",
    "description": "Test Component",
    "enums": [],
    "guid": "f889f2d3-920a-4504-9905-809bbc417902",
    "id": 101,
    "implClass": "org.apache.ranger.services.test.RangerServiceTest",
    "isEnabled": true,
    "label": "Test Component",
    "name": "test",
    "options": {},
    "policyConditions": [],
    "resources": [
        {
            "description": "Root Of Resource Hierarchy for Test Component",
            "excludesSupported": true,
            "itemId": 1,
            "label": "Test Root Resource",
            "level": 10,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Sub Resource for Test Component",
            "excludesSupported": true,
            "itemId": 2,
            "label": "Test sub resource",
            "level": 20,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "sub",
            "parent": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "updateTime": 1451351474321,
    "updatedBy": "Admin",
    "version": 2
}

 

Update Service Definition by name

API Name

Update Service Definition

Request Type

PUT

Request URL

service/public/v2/api/servicedef/{name}

Request Params

Application/json

• Example:

Response

200-Application/json

Delete Service Definition by id

API Name

Delete Service Definition

Request Type

DELETE

Request URL

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

Request Param

 

Response

204-No Content

Delete Service Definition by name

 

API Name

Delete Service Definition

Request Type

DELETE

Request URL

service/public/v2/api/servicedef/name/{name}

Request Param

 

Response

204-No Content

Search Service Definitions

API Name

Search Service Definitions

Request Type

GET

Request URL

service/public/v2/api/servicedef

Request Params

Query Params

pageSize int The page size required

startIndex int The start record index

serviceType string The service definition names("hdfs","hive","hbase","knox","storm", "solr", "kafka","yarn")

isEnabled boolean The enabled status : true if enabled; false otherwise

Example :

  pageSize=25&startIndex=0

Response

200-Application/json

• Example:

[
    {
        "accessTypes": [
            {
                "impliedGrants": [],
                "itemId": 1,
                "label": "Read",
                "name": "read"
            },
            {
                "impliedGrants": [],
                "itemId": 2,
                "label": "Write",
                "name": "write"
            },
            {
                "impliedGrants": [],
                "itemId": 3,
                "label": "Execute",
                "name": "execute"
            }
        ],
        "configs": [
            {
                "itemId": 1,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 2,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "subType": "",
                "type": "password",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 3,
                "label": "Namenode URL",
                "mandatory": true,
                "name": "fs.default.name",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "false",
                "itemId": 4,
                "label": "Authorization Enabled",
                "mandatory": true,
                "name": "hadoop.security.authorization",
                "subType": "YesTrue:NoFalse",
                "type": "bool",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "simple",
                "itemId": 5,
                "label": "Authentication Type",
                "mandatory": true,
                "name": "hadoop.security.authentication",
                "subType": "authnType",
                "type": "enum",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 6,
                "mandatory": false,
                "name": "hadoop.security.auth_to_local",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 7,
                "mandatory": false,
                "name": "dfs.datanode.kerberos.principal",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 8,
                "mandatory": false,
                "name": "dfs.namenode.kerberos.principal",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 9,
                "mandatory": false,
                "name": "dfs.secondary.namenode.kerberos.principal",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "authentication",
                "itemId": 10,
                "label": "RPC Protection Type",
                "mandatory": false,
                "name": "hadoop.rpc.protection",
                "subType": "rpcProtection",
                "type": "enum",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 11,
                "label": "Common Name for Certificate",
                "mandatory": false,
                "name": "commonNameForCertificate",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "contextEnrichers": [],
        "createTime": 1450756476000,
        "description": "HDFS Repository",
        "enums": [
            {
                "defaultIndex": 0,
                "elements": [
                    {
                        "itemId": 1,
                        "label": "Simple",
                        "name": "simple"
                    },
                    {
                        "itemId": 2,
                        "label": "Kerberos",
                        "name": "kerberos"
                    }
                ],
                "itemId": 1,
                "name": "authnType"
            },
            {
                "defaultIndex": 0,
                "elements": [
                    {
                        "itemId": 1,
                        "label": "Authentication",
                        "name": "authentication"
                    },
                    {
                        "itemId": 2,
                        "label": "Integrity",
                        "name": "integrity"
                    },
                    {
                        "itemId": 3,
                        "label": "Privacy",
                        "name": "privacy"
                    }
                ],
                "itemId": 2,
                "name": "rpcProtection"
            }
        ],
        "guid": "0d047247-bafe-4cf8-8e9b-d5d377284b2d",
        "id": 1,
        "implClass": "org.apache.ranger.services.hdfs.RangerServiceHdfs",
        "isEnabled": true,
        "label": "HDFS Repository",
        "name": "hdfs",
        "options": {},
        "policyConditions": [],
        "resources": [
            {
                "description": "HDFS file or directory path",
                "excludesSupported": false,
                "itemId": 1,
                "label": "Resource Path",
                "level": 10,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerPathResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "wildCard": "true"
                },
                "name": "path",
                "recursiveSupported": true,
                "type": "path",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1450756477000,
        "version": 1
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [],
                "itemId": 1,
                "label": "Read",
                "name": "read"
            },
            {
                "impliedGrants": [],
                "itemId": 2,
                "label": "Write",
                "name": "write"
            },
            {
                "impliedGrants": [],
                "itemId": 3,
                "label": "Create",
                "name": "create"
            },
            {
                "impliedGrants": [
                    "read",
                    "write",
                    "create"
                ],
                "itemId": 4,
                "label": "Admin",
                "name": "admin"
            }
        ],
        "configs": [
            {
                "itemId": 1,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 2,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "subType": "",
                "type": "password",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "simple",
                "itemId": 3,
                "mandatory": true,
                "name": "hadoop.security.authentication",
                "subType": "authnType",
                "type": "enum",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "",
                "itemId": 4,
                "mandatory": false,
                "name": "hbase.master.kerberos.principal",
                "subType": "",
                "type": "string"
            },
            {
                "defaultValue": "simple",
                "itemId": 5,
                "mandatory": true,
                "name": "hbase.security.authentication",
                "subType": "authnType",
                "type": "enum",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "2181",
                "itemId": 6,
                "mandatory": true,
                "name": "hbase.zookeeper.property.clientPort",
                "subType": "",
                "type": "int",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "",
                "itemId": 7,
                "mandatory": true,
                "name": "hbase.zookeeper.quorum",
                "subType": "",
                "type": "string",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "/hbase",
                "itemId": 8,
                "mandatory": true,
                "name": "zookeeper.znode.parent",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 9,
                "label": "Common Name for Certificate",
                "mandatory": false,
                "name": "commonNameForCertificate",
                "subType": "",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "contextEnrichers": [],
        "createTime": 1450756478000,
        "description": "HBase",
        "enums": [
            {
                "defaultIndex": 0,
                "elements": [
                    {
                        "itemId": 1,
                        "label": "Simple",
                        "name": "simple"
                    },
                    {
                        "itemId": 2,
                        "label": "Kerberos",
                        "name": "kerberos"
                    }
                ],
                "itemId": 1,
                "name": "authnType"
            }
        ],
        "guid": "d6cea1f0-2509-4791-8fc1-7b092399ba3b",
        "id": 2,
        "implClass": "org.apache.ranger.services.hbase.RangerServiceHBase",
        "isEnabled": true,
        "label": "HBase",
        "name": "hbase",
        "options": {},
        "policyConditions": [],
        "resources": [
            {
                "description": "HBase Table",
                "excludesSupported": true,
                "itemId": 1,
                "label": "HBase Table",
                "level": 10,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "wildCard": "true"
                },
                "name": "table",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "description": "HBase Column-family",
                "excludesSupported": true,
                "itemId": 2,
                "label": "HBase Column-family",
                "level": 20,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "wildCard": "true"
                },
                "name": "column-family",
                "parent": "table",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "description": "HBase Column",
                "excludesSupported": true,
                "itemId": 3,
                "label": "HBase Column",
                "level": 30,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "wildCard": "true"
                },
                "name": "column",
                "parent": "column-family",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1450756478000,
        "version": 1
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [],
                "itemId": 1,
                "label": "select",
                "name": "select"
            },
            {
                "impliedGrants": [],
                "itemId": 2,
                "label": "update",
                "name": "update"
            },
            {
                "impliedGrants": [],
                "itemId": 3,
                "label": "Create",
                "name": "create"
            },
            {
                "impliedGrants": [],
                "itemId": 4,
                "label": "Drop",
                "name": "drop"
            },
            {
                "impliedGrants": [],
                "itemId": 5,
                "label": "Alter",
                "name": "alter"
            },
            {
                "impliedGrants": [],
                "itemId": 6,
                "label": "Index",
                "name": "index"
            },
            {
                "impliedGrants": [],
                "itemId": 7,
                "label": "Lock",
                "name": "lock"
            },
            {
                "impliedGrants": [
                    "select",
                    "update",
                    "create",
                    "drop",
                    "alter",
                    "index",
                    "lock"
                ],
                "itemId": 8,
                "label": "All",
                "name": "all"
            }
        ],
        "configs": [
            {
                "itemId": 1,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 2,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "type": "password",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "org.apache.hive.jdbc.HiveDriver",
                "itemId": 3,
                "mandatory": true,
                "name": "jdbc.driverClassName",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "",
                "itemId": 4,
                "mandatory": true,
                "name": "jdbc.url",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 5,
                "label": "Common Name for Certificate",
                "mandatory": false,
                "name": "commonNameForCertificate",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "contextEnrichers": [],
        "createTime": 1450756479000,
        "description": "Hive Server2",
        "enums": [],
        "guid": "3e1afb5a-184a-4e82-9d9c-87a5cacc243c",
        "id": 3,
        "implClass": "org.apache.ranger.services.hive.RangerServiceHive",
        "isEnabled": true,
        "label": "Hive Server2",
        "name": "hive",
        "options": {},
        "policyConditions": [
            {
                "description": "List of Hive resources",
                "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerHiveResourcesAccessedTogetherCondition",
                "evaluatorOptions": {},
                "itemId": 1,
                "label": "Hive Resources Accessed Together?",
                "name": "resources-accessed-together"
            }
        ],
        "resources": [
            {
                "description": "Hive Database",
                "excludesSupported": true,
                "itemId": 1,
                "label": "Hive Database",
                "level": 10,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "true",
                    "wildCard": "true"
                },
                "name": "database",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "description": "Hive Table",
                "excludesSupported": true,
                "itemId": 2,
                "label": "Hive Table",
                "level": 20,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "true",
                    "wildCard": "true"
                },
                "name": "table",
                "parent": "database",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "description": "Hive UDF",
                "excludesSupported": true,
                "itemId": 3,
                "label": "Hive UDF",
                "level": 20,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "true",
                    "wildCard": "true"
                },
                "name": "udf",
                "parent": "database",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "description": "Hive Column",
                "excludesSupported": true,
                "itemId": 4,
                "label": "Hive Column",
                "level": 30,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "true",
                    "wildCard": "true"
                },
                "name": "column",
                "parent": "table",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1450756479000,
        "version": 1
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [],
                "itemId": 1,
                "label": "submit-app",
                "name": "submit-app"
            },
            {
                "impliedGrants": [
                    "submit-app"
                ],
                "itemId": 2,
                "label": "admin-queue",
                "name": "admin-queue"
            }
        ],
        "configs": [
            {
                "itemId": 1,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 2,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "type": "password",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "",
                "itemId": 3,
                "label": "YARN REST URL",
                "mandatory": true,
                "name": "yarn.url",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "simple",
                "itemId": 4,
                "label": "Authentication Type",
                "mandatory": false,
                "name": "hadoop.security.authentication",
                "subType": "authnType",
                "type": "enum",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 5,
                "label": "Common Name for Certificate",
                "mandatory": false,
                "name": "commonNameForCertificate",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "contextEnrichers": [],
        "createTime": 1450756481000,
        "description": "YARN",
        "enums": [
            {
                "defaultIndex": 0,
                "elements": [
                    {
                        "itemId": 1,
                        "label": "Simple",
                        "name": "simple"
                    },
                    {
                        "itemId": 2,
                        "label": "Kerberos",
                        "name": "kerberos"
                    }
                ],
                "itemId": 1,
                "name": "authnType"
            }
        ],
        "guid": "5b710438-edcf-4e20-834c-a9a267b5b963",
        "id": 4,
        "implClass": "org.apache.ranger.services.yarn.RangerServiceYarn",
        "isEnabled": true,
        "label": "YARN",
        "name": "yarn",
        "options": {},
        "policyConditions": [],
        "resources": [
            {
                "description": "Queue",
                "excludesSupported": false,
                "itemId": 1,
                "label": "Queue",
                "level": 10,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerPathResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "pathSeparatorChar": ".",
                    "wildCard": "true"
                },
                "name": "queue",
                "recursiveSupported": true,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1450756481000,
        "version": 1
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [],
                "itemId": 1,
                "label": "Allow",
                "name": "allow"
            }
        ],
        "configs": [
            {
                "itemId": 1,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 2,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "type": "password",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "",
                "itemId": 3,
                "mandatory": true,
                "name": "knox.url",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 4,
                "label": "Common Name for Certificate",
                "mandatory": false,
                "name": "commonNameForCertificate",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "contextEnrichers": [],
        "createTime": 1450756480000,
        "description": "Knox Gateway",
        "enums": [],
        "guid": "84b481b5-f23b-4f71-b8b6-ab33977149ca",
        "id": 5,
        "implClass": "org.apache.ranger.services.knox.RangerServiceKnox",
        "isEnabled": true,
        "label": "Knox Gateway",
        "name": "knox",
        "options": {},
        "policyConditions": [
            {
                "description": "IP Address Range",
                "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerIpMatcher",
                "evaluatorOptions": {},
                "itemId": 1,
                "label": "IP Address Range",
                "name": "ip-range",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "resources": [
            {
                "description": "Knox Topology",
                "excludesSupported": true,
                "itemId": 1,
                "label": "Knox Topology",
                "level": 10,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "wildCard": "true"
                },
                "name": "topology",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "description": "Knox Service",
                "excludesSupported": true,
                "itemId": 2,
                "label": "Knox Service",
                "level": 20,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "wildCard": "true"
                },
                "name": "service",
                "parent": "topology",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1450756480000,
        "version": 1
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [
                    "fileUpload",
                    "fileDownload"
                ],
                "itemId": 1,
                "label": "Submit Topology",
                "name": "submitTopology"
            },
            {
                "impliedGrants": [],
                "itemId": 2,
                "label": "File Upload",
                "name": "fileUpload"
            },
            {
                "impliedGrants": [],
                "itemId": 3,
                "label": "Get Nimbus Conf",
                "name": "getNimbusConf"
            },
            {
                "impliedGrants": [],
                "itemId": 4,
                "label": "Get Cluster Info",
                "name": "getClusterInfo"
            },
            {
                "impliedGrants": [],
                "itemId": 5,
                "label": "File Download",
                "name": "fileDownload"
            },
            {
                "impliedGrants": [],
                "itemId": 6,
                "label": "Kill Topology",
                "name": "killTopology"
            },
            {
                "impliedGrants": [],
                "itemId": 7,
                "label": "Rebalance",
                "name": "rebalance"
            },
            {
                "impliedGrants": [],
                "itemId": 8,
                "label": "Activate",
                "name": "activate"
            },
            {
                "impliedGrants": [],
                "itemId": 9,
                "label": "Deactivate",
                "name": "deactivate"
            },
            {
                "impliedGrants": [],
                "itemId": 10,
                "label": "Get Topology Conf",
                "name": "getTopologyConf"
            },
            {
                "impliedGrants": [],
                "itemId": 11,
                "label": "Get Topology",
                "name": "getTopology"
            },
            {
                "impliedGrants": [],
                "itemId": 12,
                "label": "Get User Topology",
                "name": "getUserTopology"
            },
            {
                "impliedGrants": [],
                "itemId": 13,
                "label": "Get Topology Info",
                "name": "getTopologyInfo"
            },
            {
                "impliedGrants": [],
                "itemId": 14,
                "label": "Upload New Credential",
                "name": "uploadNewCredentials"
            }
        ],
        "configs": [
            {
                "itemId": 1,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 2,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "type": "password",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "",
                "itemId": 3,
                "label": "Nimbus URL",
                "mandatory": true,
                "name": "nimbus.url",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 4,
                "label": "Common Name for Certificate",
                "mandatory": false,
                "name": "commonNameForCertificate",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "contextEnrichers": [],
        "createTime": 1450756480000,
        "description": "Storm",
        "enums": [],
        "guid": "2a60f427-edcf-4e20-834c-a9a267b5b963",
        "id": 6,
        "implClass": "org.apache.ranger.services.storm.RangerServiceStorm",
        "isEnabled": true,
        "label": "Storm",
        "name": "storm",
        "options": {},
        "policyConditions": [],
        "resources": [
            {
                "description": "Storm Topology",
                "excludesSupported": true,
                "itemId": 1,
                "label": "Storm Topology",
                "level": 10,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "wildCard": "true"
                },
                "name": "topology",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1450756480000,
        "version": 1
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [],
                "itemId": 100,
                "label": "Query",
                "name": "query"
            },
            {
                "impliedGrants": [],
                "itemId": 200,
                "label": "Update",
                "name": "update"
            },
            {
                "impliedGrants": [],
                "itemId": 300,
                "label": "Others",
                "name": "others"
            },
            {
                "impliedGrants": [
                    "query",
                    "update",
                    "others"
                ],
                "itemId": 900,
                "label": "Solr Admin",
                "name": "solr_admin"
            }
        ],
        "configs": [
            {
                "itemId": 100,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 200,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "type": "password",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "defaultValue": "",
                "itemId": 400,
                "label": "Solr URL",
                "mandatory": true,
                "name": "solr.url",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 500,
                "label": "Ranger Plugin SSL CName",
                "mandatory": false,
                "name": "commonNameForCertificate",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "contextEnrichers": [],
        "createTime": 1450756482000,
        "description": "Solr",
        "enums": [],
        "guid": "2c3d4e68-0701-4a6a-9b5b-d3ed89faf30a",
        "id": 8,
        "implClass": "org.apache.ranger.services.solr.RangerServiceSolr",
        "isEnabled": true,
        "label": "SOLR",
        "name": "solr",
        "options": {},
        "policyConditions": [
            {
                "description": "IP Address Range",
                "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerIpMatcher",
                "evaluatorOptions": {},
                "itemId": 100,
                "label": "IP Address Range",
                "name": "ip-range",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "resources": [
            {
                "description": "Solr Collection",
                "excludesSupported": true,
                "itemId": 100,
                "label": "Solr Collection",
                "level": 10,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "true",
                    "wildCard": "true"
                },
                "name": "collection",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1450756482000,
        "version": 1
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [
                    "describe"
                ],
                "itemId": 1,
                "label": "Publish",
                "name": "publish"
            },
            {
                "impliedGrants": [
                    "describe"
                ],
                "itemId": 2,
                "label": "Consume",
                "name": "consume"
            },
            {
                "impliedGrants": [
                    "describe"
                ],
                "itemId": 5,
                "label": "Configure",
                "name": "configure"
            },
            {
                "impliedGrants": [],
                "itemId": 6,
                "label": "Describe",
                "name": "describe"
            },
            {
                "impliedGrants": [],
                "itemId": 8,
                "label": "Create",
                "name": "create"
            },
            {
                "impliedGrants": [],
                "itemId": 9,
                "label": "Delete",
                "name": "delete"
            },
            {
                "impliedGrants": [
                    "publish",
                    "consume",
                    "configure",
                    "describe",
                    "create",
                    "delete"
                ],
                "itemId": 7,
                "label": "Kafka Admin",
                "name": "kafka_admin"
            }
        ],
        "configs": [
            {
                "itemId": 1,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "type": "string"
            },
            {
                "itemId": 2,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "type": "password"
            },
            {
                "defaultValue": "localhost:2181",
                "itemId": 3,
                "label": "Zookeeper Connect String",
                "mandatory": true,
                "name": "zookeeper.connect",
                "type": "string"
            },
            {
                "itemId": 4,
                "label": "Ranger Plugin SSL CName",
                "mandatory": false,
                "name": "commonNameForCertificate",
                "type": "string"
            }
        ],
        "contextEnrichers": [],
        "createTime": 1450756481000,
        "description": "Apache Kafka",
        "enums": [],
        "guid": "5b5f3eb8-a7bc-4484-8285-a0ca53ff52bb",
        "id": 9,
        "implClass": "org.apache.ranger.services.kafka.RangerServiceKafka",
        "isEnabled": true,
        "label": "Kafka",
        "name": "kafka",
        "options": {},
        "policyConditions": [
            {
                "description": "IP Address Range",
                "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerIpMatcher",
                "evaluatorOptions": {},
                "itemId": 1,
                "label": "IP Address Range",
                "name": "ip-range",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "resources": [
            {
                "description": "Topic",
                "excludesSupported": true,
                "itemId": 1,
                "label": "Topic",
                "level": 1,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "true",
                    "wildCard": "true"
                },
                "name": "topic",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1450756481000,
        "version": 1
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [],
                "itemId": 1002,
                "label": "Read",
                "name": "hdfs:read"
            },
            {
                "impliedGrants": [],
                "itemId": 1003,
                "label": "Write",
                "name": "hdfs:write"
            },
            {
                "impliedGrants": [],
                "itemId": 1004,
                "label": "Execute",
                "name": "hdfs:execute"
            },
            {
                "impliedGrants": [],
                "itemId": 2003,
                "label": "Read",
                "name": "hbase:read"
            },
            {
                "impliedGrants": [],
                "itemId": 2004,
                "label": "Write",
                "name": "hbase:write"
            },
            {
                "impliedGrants": [],
                "itemId": 2005,
                "label": "Create",
                "name": "hbase:create"
            },
            {
                "impliedGrants": [
                    "hbase:read",
                    "hbase:write",
                    "hbase:create"
                ],
                "itemId": 2006,
                "label": "Admin",
                "name": "hbase:admin"
            },
            {
                "impliedGrants": [],
                "itemId": 3004,
                "label": "select",
                "name": "hive:select"
            },
            {
                "impliedGrants": [],
                "itemId": 3005,
                "label": "update",
                "name": "hive:update"
            },
            {
                "impliedGrants": [],
                "itemId": 3006,
                "label": "Create",
                "name": "hive:create"
            },
            {
                "impliedGrants": [],
                "itemId": 3007,
                "label": "Drop",
                "name": "hive:drop"
            },
            {
                "impliedGrants": [],
                "itemId": 3008,
                "label": "Alter",
                "name": "hive:alter"
            },
            {
                "impliedGrants": [],
                "itemId": 3009,
                "label": "Index",
                "name": "hive:index"
            },
            {
                "impliedGrants": [],
                "itemId": 3010,
                "label": "Lock",
                "name": "hive:lock"
            },
            {
                "impliedGrants": [
                    "hive:select",
                    "hive:update",
                    "hive:create",
                    "hive:drop",
                    "hive:alter",
                    "hive:index",
                    "hive:lock"
                ],
                "itemId": 3011,
                "label": "All",
                "name": "hive:all"
            },
            {
                "impliedGrants": [],
                "itemId": 4005,
                "label": "submit-app",
                "name": "yarn:submit-app"
            },
            {
                "impliedGrants": [
                    "yarn:submit-app"
                ],
                "itemId": 4006,
                "label": "admin-queue",
                "name": "yarn:admin-queue"
            },
            {
                "impliedGrants": [],
                "itemId": 5006,
                "label": "Allow",
                "name": "knox:allow"
            },
            {
                "impliedGrants": [
                    "storm:fileUpload",
                    "storm:fileDownload"
                ],
                "itemId": 6007,
                "label": "Submit Topology",
                "name": "storm:submitTopology"
            },
            {
                "impliedGrants": [],
                "itemId": 6008,
                "label": "File Upload",
                "name": "storm:fileUpload"
            },
            {
                "impliedGrants": [],
                "itemId": 6009,
                "label": "Get Nimbus Conf",
                "name": "storm:getNimbusConf"
            },
            {
                "impliedGrants": [],
                "itemId": 6010,
                "label": "Get Cluster Info",
                "name": "storm:getClusterInfo"
            },
            {
                "impliedGrants": [],
                "itemId": 6011,
                "label": "File Download",
                "name": "storm:fileDownload"
            },
            {
                "impliedGrants": [],
                "itemId": 6012,
                "label": "Kill Topology",
                "name": "storm:killTopology"
            },
            {
                "impliedGrants": [],
                "itemId": 6013,
                "label": "Rebalance",
                "name": "storm:rebalance"
            },
            {
                "impliedGrants": [],
                "itemId": 6014,
                "label": "Activate",
                "name": "storm:activate"
            },
            {
                "impliedGrants": [],
                "itemId": 6015,
                "label": "Deactivate",
                "name": "storm:deactivate"
            },
            {
                "impliedGrants": [],
                "itemId": 6016,
                "label": "Get Topology Conf",
                "name": "storm:getTopologyConf"
            },
            {
                "impliedGrants": [],
                "itemId": 6017,
                "label": "Get Topology",
                "name": "storm:getTopology"
            },
            {
                "impliedGrants": [],
                "itemId": 6018,
                "label": "Get User Topology",
                "name": "storm:getUserTopology"
            },
            {
                "impliedGrants": [],
                "itemId": 6019,
                "label": "Get Topology Info",
                "name": "storm:getTopologyInfo"
            },
            {
                "impliedGrants": [],
                "itemId": 6020,
                "label": "Upload New Credential",
                "name": "storm:uploadNewCredentials"
            },
            {
                "impliedGrants": [],
                "itemId": 7008,
                "label": "Create",
                "name": "kms:create"
            },
            {
                "impliedGrants": [],
                "itemId": 7009,
                "label": "Delete",
                "name": "kms:delete"
            },
            {
                "impliedGrants": [],
                "itemId": 7010,
                "label": "Rollover",
                "name": "kms:rollover"
            },
            {
                "impliedGrants": [],
                "itemId": 7011,
                "label": "Set Key Material",
                "name": "kms:setkeymaterial"
            },
            {
                "impliedGrants": [],
                "itemId": 7012,
                "label": "Get",
                "name": "kms:get"
            },
            {
                "impliedGrants": [],
                "itemId": 7013,
                "label": "Get Keys",
                "name": "kms:getkeys"
            },
            {
                "impliedGrants": [],
                "itemId": 7014,
                "label": "Get Metadata",
                "name": "kms:getmetadata"
            },
            {
                "impliedGrants": [],
                "itemId": 7015,
                "label": "Generate EEK",
                "name": "kms:generateeek"
            },
            {
                "impliedGrants": [],
                "itemId": 7016,
                "label": "Decrypt EEK",
                "name": "kms:decrypteek"
            },
            {
                "impliedGrants": [],
                "itemId": 8108,
                "label": "Query",
                "name": "solr:query"
            },
            {
                "impliedGrants": [],
                "itemId": 8208,
                "label": "Update",
                "name": "solr:update"
            },
            {
                "impliedGrants": [],
                "itemId": 8308,
                "label": "Others",
                "name": "solr:others"
            },
            {
                "impliedGrants": [
                    "solr:query",
                    "solr:update",
                    "solr:others"
                ],
                "itemId": 8908,
                "label": "Solr Admin",
                "name": "solr:solr_admin"
            },
            {
                "impliedGrants": [
                    "kafka:describe"
                ],
                "itemId": 9010,
                "label": "Publish",
                "name": "kafka:publish"
            },
            {
                "impliedGrants": [
                    "kafka:describe"
                ],
                "itemId": 9011,
                "label": "Consume",
                "name": "kafka:consume"
            },
            {
                "impliedGrants": [
                    "kafka:describe"
                ],
                "itemId": 9014,
                "label": "Configure",
                "name": "kafka:configure"
            },
            {
                "impliedGrants": [],
                "itemId": 9015,
                "label": "Describe",
                "name": "kafka:describe"
            },
            {
                "impliedGrants": [],
                "itemId": 9017,
                "label": "Create",
                "name": "kafka:create"
            },
            {
                "impliedGrants": [],
                "itemId": 9018,
                "label": "Delete",
                "name": "kafka:delete"
            },
            {
                "impliedGrants": [
                    "kafka:publish",
                    "kafka:consume",
                    "kafka:configure",
                    "kafka:describe",
                    "kafka:create",
                    "kafka:delete"
                ],
                "itemId": 9016,
                "label": "Kafka Admin",
                "name": "kafka:kafka_admin"
            },
            {
                "impliedGrants": [],
                "itemId": 101102,
                "label": "select",
                "name": "test:select"
            },
            {
                "impliedGrants": [],
                "itemId": 101103,
                "label": "update",
                "name": "test:update"
            },
            {
                "impliedGrants": [],
                "itemId": 101104,
                "label": "Create",
                "name": "test:create"
            },
            {
                "impliedGrants": [],
                "itemId": 101105,
                "label": "Drop",
                "name": "test:drop"
            },
            {
                "impliedGrants": [],
                "itemId": 101106,
                "label": "Index",
                "name": "test:index"
            },
            {
                "impliedGrants": [
                    "test:select",
                    "test:update",
                    "test:create",
                    "test:drop",
                    "test:index"
                ],
                "itemId": 101107,
                "label": "All",
                "name": "test:all"
            }
        ],
        "configs": [],
        "contextEnrichers": [
            {
                "enricher": "org.apache.ranger.plugin.contextenricher.RangerTagEnricher",
                "enricherOptions": {
                    "tagRefresherPollingInterval": "60000",
                    "tagRetrieverClassName": "org.apache.ranger.plugin.contextenricher.RangerAdminTagRetriever"
                },
                "itemId": 1,
                "name": "TagEnricher"
            }
        ],
        "createTime": 1450756482000,
        "createdBy": "Admin",
        "description": "TAG Service Definition",
        "enums": [],
        "guid": "0d047248-baff-4cf9-8e9e-d5d377284b2e",
        "id": 100,
        "implClass": "org.apache.ranger.services.tag.RangerServiceTag",
        "isEnabled": true,
        "label": "TAG",
        "name": "tag",
        "options": {
            "ui.pages": "tag-based-policies"
        },
        "policyConditions": [
            {
                "description": "Accessed after expiry_date? (yes/no)",
                "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerScriptTemplateConditionEvaluator",
                "evaluatorOptions": {
                    "scriptTemplate": "ctx.isAccessedAfter('expiry_date');"
                },
                "itemId": 1,
                "label": "Accessed after expiry_date (yes/no)?",
                "name": "accessed-after-expiry",
                "uiHint": "{ \"singleValue\":true }"
            }
        ],
        "resources": [
            {
                "description": "TAG",
                "excludesSupported": false,
                "itemId": 1,
                "label": "TAG",
                "level": 1,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "false",
                    "wildCard": "false"
                },
                "name": "tag",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "{ \"singleValue\":true }",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1451351474000,
        "updatedBy": "Admin",
        "version": 12
    },
    {
        "accessTypes": [
            {
                "impliedGrants": [],
                "itemId": 1,
                "label": "select",
                "name": "select"
            },
            {
                "impliedGrants": [],
                "itemId": 2,
                "label": "update",
                "name": "update"
            },
            {
                "impliedGrants": [],
                "itemId": 3,
                "label": "Create",
                "name": "create"
            },
            {
                "impliedGrants": [],
                "itemId": 4,
                "label": "Drop",
                "name": "drop"
            },
            {
                "impliedGrants": [],
                "itemId": 5,
                "label": "Index",
                "name": "index"
            },
            {
                "impliedGrants": [
                    "select",
                    "update",
                    "create",
                    "drop",
                    "index"
                ],
                "itemId": 6,
                "label": "All",
                "name": "all"
            }
        ],
        "configs": [
            {
                "itemId": 1,
                "label": "Username",
                "mandatory": true,
                "name": "username",
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "itemId": 2,
                "label": "Password",
                "mandatory": true,
                "name": "password",
                "type": "password",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "contextEnrichers": [],
        "createTime": 1451347301000,
        "createdBy": "Admin",
        "description": "Test Component",
        "enums": [],
        "guid": "f889f2d3-920a-4504-9905-809bbc417902",
        "id": 101,
        "implClass": "org.apache.ranger.services.test.RangerServiceTest",
        "isEnabled": true,
        "label": "Test Component",
        "name": "test",
        "options": {},
        "policyConditions": [],
        "resources": [
            {
                "description": "Root Of Resource Hierarchy for Test Component",
                "excludesSupported": true,
                "itemId": 1,
                "label": "Test Root Resource",
                "level": 10,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "true",
                    "wildCard": "true"
                },
                "name": "root",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            },
            {
                "description": "Sub Resource for Test Component",
                "excludesSupported": true,
                "itemId": 2,
                "label": "Test sub resource",
                "level": 20,
                "lookupSupported": true,
                "mandatory": true,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "ignoreCase": "true",
                    "wildCard": "true"
                },
                "name": "sub",
                "parent": "root",
                "recursiveSupported": false,
                "type": "string",
                "uiHint": "",
                "validationMessage": "",
                "validationRegEx": ""
            }
        ],
        "updateTime": 1451351474000,
        "updatedBy": "Admin",
        "version": 2
    }
]

Service APIs

Get Service by id

API Name

Get Service

Request Type

GET

Request URL

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

Request Params

 

Response

• HDFS Example Response:

{
    "configs": {
        "fs.default.name": "hdfs://akulkarni-etp-real-final-1.novalocal:8020",
        "hadoop.security.auth_to_local": "DEFAULT",
        "hadoop.security.authentication": "simple",
        "hadoop.security.authorization": "false",
        "password": "*****",
        "username": "hadoop"
    },
    "createTime": 1450757397000,
    "createdBy": "amb_ranger_admin",
    "description": "hdfs repo",
    "guid": "ec082eea-0c22-43b8-84e0-129422f689b9",
    "id": 1,
    "isEnabled": true,
    "name": "cl1_hadoop",
    "policyUpdateTime": 1450757398000,
    "policyVersion": 2,
    "tagVersion": 1,
    "type": "hdfs",
    "updateTime": 1450757398000,
    "updatedBy": "amb_ranger_admin",
    "version": 3
}

Get Service by name

API Name

Get Service

Request Type

GET

Request URL

service/public/v2/api/service/name/{name}

Request Params

 

Response

• Hive Example :

{
    "configs": {
        "jdbc.driverClassName": "org.apache.hive.jdbc.HiveDriver",
        "jdbc.url": "jdbc:hive2://akulkarni-etp-real-final-1.novalocal:10000",
        "password": "*****",
        "username": "hive"
    },
    "createTime": 1450757992000,
    "createdBy": "amb_ranger_admin",
    "description": "hive repo",
    "guid": "2bca8f98-4859-43c3-a8f4-d31a15f28793",
    "id": 3,
    "isEnabled": true,
    "name": "cl1_hive",
    "policyUpdateTime": 1450757995000,
    "policyVersion": 4,
    "tagUpdateTime": 1450916660000,
    "tagVersion": 74,
    "type": "hive",
    "updateTime": 1450757995000,
    "updatedBy": "amb_ranger_admin",
    "version": 78
}

 

Create Service

API Name

Create Service

Request Type

Post

Request URL

service/public/v2/api/service

Request Params

application/json

• Example:

{
    "configs": {
        "password": "*****",
        "username": "hadoop"
    },
    "description": "test service",
    "isEnabled": true,
    "name": "cl1_test",
    "type": "test",
    "version": 1
}

Response

200-Application/json

{
    "configs": {
        "password": "*****",
        "username": "hadoop"
    },
    "createTime": 1451348710255,
    "createdBy": "Admin",
    "description": "test service",
    "guid": "e72cb64d-66d7-4632-b5ae-c6966cb52105",
    "id": 6,
    "isEnabled": true,
    "name": "cl1_test",
    "tagVersion": 1,
    "type": "test",
    "updateTime": 1451348710256,
    "updatedBy": "Admin",
    "version": 1
}

 

Update Service by id

API Name

Update Service

Request Type

PUT

Request URL

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

Request Params

Application/json

• Example:

Response

200-Application/json

Update Service by name

API Name

Update Service

Request Type

PUT

Request URL

service/public/v2/api/service/name/{name}

Request Params

Application/json

• Example:

{
    "configs": {
        "password": "*****",
        "username": "admin"
    },
    "description": "test service",
    "isEnabled": true,
    "name": "cl1_test",
    "type": "test"
}

Response

200-Application/json

{
    "configs": {
        "password": "*****",
        "username": "admin"
    },
    "createTime": 1451348710000,
    "createdBy": "Admin",
    "description": "test service",
    "guid": "e72cb64d-66d7-4632-b5ae-c6966cb52105",
    "id": 6,
    "isEnabled": true,
    "name": "cl1_test",
    "policyUpdateTime": 1451351474000,
    "policyVersion": 3,
    "tagVersion": 1,
    "type": "test",
    "updateTime": 1451352016713,
    "updatedBy": "Admin",
    "version": 5
}

Delete Service by id

API Name

Delete Service

Request Type

DELETE

Request URL

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

Request Param

 

Response

204-No Content

Delete Service by name

API Name

Delete Service

Request Type

DELETE

Request URL

service/public/v2/api/service/name/{name}

Request Param

 

Response

204-No Content

 

Search Services

API Name

Search Services

Request Type

GET

Request URL

service/public/v2/api/service

Request Params

Query Parameters:

pageSize int The page size required

startIndex int The start record index

serviceName string The service name

serviceNamePartial string Partial service name

serviceType string The service types(such as "hdfs","hive","hbase","knox","storm")

isEnabled boolean The enabled status (true/false): true is enabled, false otherwise

Example :

  pageSize=25&startIndex=0

Response

200-Application/json

• Example:

[
    {
        "configs": {
            "fs.default.name": "hdfs://akulkarni-etp-real-final-1.novalocal:8020",
            "hadoop.security.auth_to_local": "DEFAULT",
            "hadoop.security.authentication": "simple",
            "hadoop.security.authorization": "false",
            "password": "*****",
            "username": "hadoop"
        },
        "createTime": 1450757397000,
        "createdBy": "amb_ranger_admin",
        "description": "hdfs repo",
        "guid": "ec082eea-0c22-43b8-84e0-129422f689b9",
        "id": 1,
        "isEnabled": true,
        "name": "cl1_hadoop",
        "policyUpdateTime": 1450757398000,
        "policyVersion": 2,
        "tagVersion": 1,
        "type": "hdfs",
        "updateTime": 1450757398000,
        "updatedBy": "amb_ranger_admin",
        "version": 3
    },
    {
        "configs": {
            "password": "*****",
            "username": "yarn",
            "yarn.url": "http://akulkarni-etp-real-final-1.novalocal:8088"
        },
        "createTime": 1450757747000,
        "createdBy": "amb_ranger_admin",
        "description": "yarn repo",
        "guid": "080970a9-2216-4660-962e-2b48046bf87e",
        "id": 2,
        "isEnabled": true,
        "name": "cl1_yarn",
        "policyUpdateTime": 1450757747000,
        "policyVersion": 1,
        "tagVersion": 1,
        "type": "yarn",
        "updateTime": 1450757747000,
        "updatedBy": "amb_ranger_admin",
        "version": 2
    },
    {
        "configs": {
            "jdbc.driverClassName": "org.apache.hive.jdbc.HiveDriver",
            "jdbc.url": "jdbc:hive2://akulkarni-etp-real-final-1.novalocal:10000",
            "password": "*****",
            "username": "hive"
        },
        "createTime": 1450757992000,
        "createdBy": "amb_ranger_admin",
        "description": "hive repo",
        "guid": "2bca8f98-4859-43c3-a8f4-d31a15f28793",
        "id": 3,
        "isEnabled": true,
        "name": "cl1_hive",
        "policyUpdateTime": 1450757995000,
        "policyVersion": 4,
        "tagUpdateTime": 1450916660000,
        "tagVersion": 74,
        "type": "hive",
        "updateTime": 1450757995000,
        "updatedBy": "amb_ranger_admin",
        "version": 78
    },
    {
        "configs": {
            "hadoop.security.authentication": "simple",
            "hbase.security.authentication": "simple",
            "hbase.zookeeper.property.clientPort": "2181",
            "hbase.zookeeper.quorum": "akulkarni-etp-real-final-1.novalocal",
            "password": "*****",
            "username": "hbase",
            "zookeeper.znode.parent": "/hbase-unsecure"
        },
        "createTime": 1450758200000,
        "createdBy": "amb_ranger_admin",
        "description": "hbase repo",
        "guid": "6495d4c9-cd1b-4bdf-a023-bdc82806186f",
        "id": 4,
        "isEnabled": true,
        "name": "cl1_hbase",
        "policyUpdateTime": 1450758202000,
        "policyVersion": 2,
        "tagVersion": 1,
        "type": "hbase",
        "updateTime": 1450758202000,
        "updatedBy": "amb_ranger_admin",
        "version": 3
    },
    {
        "configs": {
            "password": "*****",
            "username": "kafka",
            "zookeeper.connect": "akulkarni-etp-real-final-1.novalocal:2181"
        },
        "createTime": 1450758481000,
        "createdBy": "amb_ranger_admin",
        "description": "kafka repo",
        "guid": "bd25a697-7c45-4c75-b23d-bb02071c98c2",
        "id": 5,
        "isEnabled": true,
        "name": "cl1_kafka",
        "policyUpdateTime": 1450805416000,
        "policyVersion": 2,
        "tagVersion": 1,
        "type": "kafka",
        "updateTime": 1450805416000,
        "updatedBy": "amb_ranger_admin",
        "version": 3
    },
    {
        "configs": {
            "password": "*****",
            "username": "admin"
        },
        "createTime": 1451348710000,
        "createdBy": "Admin",
        "description": "test service",
        "guid": "e72cb64d-66d7-4632-b5ae-c6966cb52105",
        "id": 6,
        "isEnabled": true,
        "name": "cl1_test",
        "policyUpdateTime": 1451352708000,
        "policyVersion": 4,
        "tagVersion": 1,
        "type": "test",
        "updateTime": 1451352708000,
        "updatedBy": "Admin",
        "version": 6
    }
]

 

 

 

Policy APIs

Get Policy by id

API Name

Get Policy

Request Type

Get

Request URL

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

Request Params

 

Response

 • Example: 

 200 - Application/json

{
    "allowExceptions": [],
    "createTime": 1450757397000,
    "createdBy": "amb_ranger_admin",
    "denyExceptions": [],
    "denyPolicyItems": [],
    "description": "Default Policy for Service: cl1_hadoop",
    "guid": "4c2f7afb-23fa-45e9-9b41-29bdc7423b65",
    "id": 1,
    "isAuditEnabled": true,
    "isEnabled": true,
    "name": "cl1_hadoop-1-20151222040957",
    "policyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "read"
                },
                {
                    "isAllowed": true,
                    "type": "write"
                },
                {
                    "isAllowed": true,
                    "type": "execute"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [],
            "users": [
                "ambari-qa"
            ]
        }
    ],
    "resourceSignature": "6f956063401eda656f1eae8870c1afac",
    "resources": {
        "path": {
            "isExcludes": false,
            "isRecursive": true,
            "values": [
                "/*"
            ]
        }
    },
    "service": "cl1_hadoop",
    "updateTime": 1450757398000,
    "updatedBy": "amb_ranger_admin",
    "version": 2
}

Get Policy by service-name and policy-name

 

API Name

Get Policy

Request Type

Get

Request URL

service/public/v2/api/service/{service-name}/policy/{policy-name}

Request Params

 

Response

 • Hive Example Policy: 

200 - Application/json

{
    "allowExceptions": [],
    "createTime": 1450757992000,
    "createdBy": "amb_ranger_admin",
    "denyExceptions": [],
    "denyPolicyItems": [],
    "description": "Default Policy for Service: cl1_hive",
    "guid": "d6218120-1b66-43e6-9fef-9c917a8e9e25",
    "id": 4,
    "isAuditEnabled": true,
    "isEnabled": true,
    "name": "cl1_hive-2-20151222041952",
    "policyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "select"
                },
                {
                    "isAllowed": true,
                    "type": "update"
                },
                {
                    "isAllowed": true,
                    "type": "create"
                },
                {
                    "isAllowed": true,
                    "type": "drop"
                },
                {
                    "isAllowed": true,
                    "type": "alter"
                },
                {
                    "isAllowed": true,
                    "type": "index"
                },
                {
                    "isAllowed": true,
                    "type": "lock"
                },
                {
                    "isAllowed": true,
                    "type": "all"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [],
            "users": [
                "ambari-qa"
            ]
        }
    ],
    "resourceSignature": "c834ed2b8c7462d2aa8bbffdb05226c8",
    "resources": {
        "database": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "*"
            ]
        },
        "udf": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "*"
            ]
        }
    },
    "service": "cl1_hive",
    "updateTime": 1450757995000,
    "updatedBy": "amb_ranger_admin",
    "version": 2
}

 

Create Policy

API name

Create Policy

Request Type

POST

Request URL

service/public/v2/api/policy

Request Params

Application/json

{
    "allowExceptions": [],
    "denyExceptions": [],
    "denyPolicyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [],
            "users": [
		"hadoop"
            ]
        }
	],
    "description": "Policy for Service: cl1_test",
    "isAuditEnabled": true,
    "isEnabled": true,
    "name": "cl1_test-1",
    "policyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "select"
                },
                {
                    "isAllowed": true,
                    "type": "update"
                },
                {
                    "isAllowed": true,
                    "type": "create"
                },
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": ["public"],
            "users": [
            ]
        }
    ],
    "resources": {
        "root": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "abc"
            ]
        },
        "sub": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "*"
            ]
        }
    },
    "service": "cl1_test",
    "version": 1
}

 Response

 200 - Application/json

{
    "allowExceptions": [],
    "createTime": 1451350456093,
    "createdBy": "Admin",
    "denyExceptions": [],
    "denyPolicyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [],
            "users": [
                "hadoop"
            ]
        }
    ],
    "description": "Policy for Service: cl1_test",
    "guid": "ff0b3c4a-6aa0-4803-9314-17f3b8950482",
    "id": 8,
    "isAuditEnabled": true,
    "isEnabled": true,
    "name": "cl1_test-1",
    "policyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "select"
                },
                {
                    "isAllowed": true,
                    "type": "update"
                },
                {
                    "isAllowed": true,
                    "type": "create"
                },
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [
                "public"
            ],
            "users": []
        }
    ],
    "resourceSignature": "8a2fac99ba72c687defacff39d6354fb",
    "resources": {
        "root": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "abc"
            ]
        },
        "sub": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "*"
            ]
        }
    },
    "service": "cl1_test",
    "updateTime": 1451350456094,
    "updatedBy": "Admin",
    "version": 1
}

 

Update Policy by id

API Name

update policy

Request Type

PUT

Request URL

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

Request Params

Application /json 

 

{
    "id": 8,
    "allowExceptions": [],
    "denyExceptions": [],
    "denyPolicyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [],
            "users": [
		"admin"
            ]
        }
	],
    "description": "Policy for Service: cl1_test",
    "isAuditEnabled": true,
    "isEnabled": true,
    "name": "cl1_test-1",
    "policyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "select"
                },
                {
                    "isAllowed": true,
                    "type": "update"
                },
                {
                    "isAllowed": true,
                    "type": "create"
                },
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": ["public"],
            "users": [
            ]
        }
    ],
    "resources": {
        "root": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "abc"
            ]
        },
        "sub": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "*"
            ]
        }
    },
    "service": "cl1_test",
    "version": 1
}

 Response

 200 - Application/json

{
    "allowExceptions": [],
    "createTime": 1451350456000,
    "createdBy": "Admin",
    "denyExceptions": [],
    "denyPolicyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [],
            "users": [
                "admin"
            ]
        }
    ],
    "description": "Policy for Service: cl1_test",
    "guid": "ff0b3c4a-6aa0-4803-9314-17f3b8950482",
    "id": 8,
    "isAuditEnabled": true,
    "isEnabled": true,
    "name": "cl1_test-1",
    "policyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "select"
                },
                {
                    "isAllowed": true,
                    "type": "update"
                },
                {
                    "isAllowed": true,
                    "type": "create"
                },
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [
                "public"
            ],
            "users": []
        }
    ],
    "resourceSignature": "8a2fac99ba72c687defacff39d6354fb",
    "resources": {
        "root": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "abc"
            ]
        },
        "sub": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "*"
            ]
        }
    },
    "service": "cl1_test",
    "updateTime": 1451955041580,
    "updatedBy": "Admin",
    "version": 3
}

Update Policy by service-name and policy-name

 

API Name

update policy

Request Type

PUT

Request URL

service/public/v2/api/service/{service-name}/policy/{policy-name}

Request Params

• Example: 

Application /json

 

{
    "allowExceptions": [],
    "denyExceptions": [],
    "denyPolicyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [],
            "users": [
		"hadoop",
		"admin"
            ]
        }
	],
    "description": "Policy for Service: cl1_test",
    "isAuditEnabled": true,
    "isEnabled": true,
    "name": "cl1_test-1",
    "policyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "select"
                },
                {
                    "isAllowed": true,
                    "type": "update"
                },
                {
                    "isAllowed": true,
                    "type": "create"
                },
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": ["public"],
            "users": [
            ]
        }
    ],
    "resources": {
        "root": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "abc"
            ]
        },
        "sub": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "*"
            ]
        }
    },
    "service": "cl1_test",
    "version": 1
}

 

 

 

 Response

 200 - Application/json

{
    "allowExceptions": [],
    "createTime": 1451350456000,
    "createdBy": "Admin",
    "denyExceptions": [],
    "denyPolicyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [],
            "users": [
                "hadoop",
                "admin"
            ]
        }
    ],
    "description": "Policy for Service: cl1_test",
    "guid": "ff0b3c4a-6aa0-4803-9314-17f3b8950482",
    "id": 8,
    "isAuditEnabled": true,
    "isEnabled": true,
    "name": "cl1_test-1",
    "policyItems": [
        {
            "accesses": [
                {
                    "isAllowed": true,
                    "type": "select"
                },
                {
                    "isAllowed": true,
                    "type": "update"
                },
                {
                    "isAllowed": true,
                    "type": "create"
                },
                {
                    "isAllowed": true,
                    "type": "drop"
                }
            ],
            "conditions": [],
            "delegateAdmin": true,
            "groups": [
                "public"
            ],
            "users": []
        }
    ],
    "resourceSignature": "8a2fac99ba72c687defacff39d6354fb",
    "resources": {
        "root": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "abc"
            ]
        },
        "sub": {
            "isExcludes": false,
            "isRecursive": false,
            "values": [
                "*"
            ]
        }
    },
    "service": "cl1_test",
    "updateTime": 1451352707567,
    "updatedBy": "Admin",
    "version": 2
}

 

Delete policy by id

API Name

Delete Policy

Request Type

DELETE

Request URL

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

Request Params

 

Response

204 - No Content

Delete policy by service-name and policy-name

API Name

Delete Policy

Request Type

DELETE

Request URL

service/public/v2/api/policy

Request Params

Query Parameters:

servicename string The name of service

policyname string The name of policy


Example:

servicename=service-name&policyname=policy-name

Response

204 - No Content

 

Search Policies in a Service

API Name

Search Policies in a Service

API Name

Search Policies in a Service

Request Type

GET

Request URL

service/public/v2/api/service/{service-name}/policy

Request Params

Query Parameters:

pageSize int The page size required

startIndex int The start record index

policyName string The Exact Name of the policy

policyNamePartial string The Partial Name of the policy

policyId string The policy ID

polResource string The policy resource value

resource:resource-type string The policy resource value for given resource-type

user string The user name

group string The group name

isRecursive boolean The isRecursive property ("true" or "false")

isEnabled boolean The enable/disabled property ("true" or "false")

 

Example =

pageSize=25&startIndex=0&resource:database=finance

Response

200 - Application/json

Example:

 

[
    {
        "allowExceptions": [],
        "createTime": 1450757992000,
        "createdBy": "amb_ranger_admin",
        "denyExceptions": [],
        "denyPolicyItems": [],
        "description": "Default Policy for Service: cl1_hive",
        "guid": "4a322a05-c17f-4d6c-b291-94cae3e6c353",
        "id": 3,
        "isAuditEnabled": true,
        "isEnabled": true,
        "name": "cl1_hive-1-20151222041951",
        "policyItems": [
            {
                "accesses": [
                    {
                        "isAllowed": true,
                        "type": "select"
                    },
                    {
                        "isAllowed": true,
                        "type": "update"
                    },
                    {
                        "isAllowed": true,
                        "type": "create"
                    },
                    {
                        "isAllowed": true,
                        "type": "drop"
                    },
                    {
                        "isAllowed": true,
                        "type": "alter"
                    },
                    {
                        "isAllowed": true,
                        "type": "index"
                    },
                    {
                        "isAllowed": true,
                        "type": "lock"
                    },
                    {
                        "isAllowed": true,
                        "type": "all"
                    }
                ],
                "conditions": [],
                "delegateAdmin": true,
                "groups": [],
                "users": [
                    "ambari-qa"
                ]
            }
        ],
        "resourceSignature": "6e79c1c989c79b7e53af663d3bdc2de6",
        "resources": {
            "column": {
                "isExcludes": false,
                "isRecursive": false,
                "values": [
                    "*"
                ]
            },
            "database": {
                "isExcludes": false,
                "isRecursive": false,
                "values": [
                    "*"
                ]
            },
            "table": {
                "isExcludes": false,
                "isRecursive": false,
                "values": [
                    "*"
                ]
            }
        },
        "service": "cl1_hive",
        "updateTime": 1450757994000,
        "updatedBy": "amb_ranger_admin",
        "version": 2
    },
    {
        "allowExceptions": [],
        "createTime": 1450757992000,
        "createdBy": "amb_ranger_admin",
        "denyExceptions": [],
        "denyPolicyItems": [],
        "description": "Default Policy for Service: cl1_hive",
        "guid": "d6218120-1b66-43e6-9fef-9c917a8e9e25",
        "id": 4,
        "isAuditEnabled": true,
        "isEnabled": true,
        "name": "cl1_hive-2-20151222041952",
        "policyItems": [
            {
                "accesses": [
                    {
                        "isAllowed": true,
                        "type": "select"
                    },
                    {
                        "isAllowed": true,
                        "type": "update"
                    },
                    {
                        "isAllowed": true,
                        "type": "create"
                    },
                    {
                        "isAllowed": true,
                        "type": "drop"
                    },
                    {
                        "isAllowed": true,
                        "type": "alter"
                    },
                    {
                        "isAllowed": true,
                        "type": "index"
                    },
                    {
                        "isAllowed": true,
                        "type": "lock"
                    },
                    {
                        "isAllowed": true,
                        "type": "all"
                    }
                ],
                "conditions": [],
                "delegateAdmin": true,
                "groups": [],
                "users": [
                    "ambari-qa"
                ]
            }
        ],
        "resourceSignature": "c834ed2b8c7462d2aa8bbffdb05226c8",
        "resources": {
            "database": {
                "isExcludes": false,
                "isRecursive": false,
                "values": [
                    "*"
                ]
            },
            "udf": {
                "isExcludes": false,
                "isRecursive": false,
                "values": [
                    "*"
                ]
            }
        },
        "service": "cl1_hive",
        "updateTime": 1450757995000,
        "updatedBy": "amb_ranger_admin",
        "version": 2
    }
]

 


  • No labels