You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Madhan Neethiraj (Jira)" <ji...@apache.org> on 2021/06/04 03:55:00 UTC

[jira] [Created] (RANGER-3307) Python client: get_service_def returns incorrect resources in rowFilterDef

Madhan Neethiraj created RANGER-3307:
----------------------------------------

             Summary: Python client: get_service_def returns incorrect resources in rowFilterDef
                 Key: RANGER-3307
                 URL: https://issues.apache.org/jira/browse/RANGER-3307
             Project: Ranger
          Issue Type: Bug
          Components: intg
    Affects Versions: 2.1.0
            Reporter: Madhan Neethiraj
            Assignee: Madhan Neethiraj


Service-def returned by get_service_def() API has incorrect resources in rowFilterDef.  It returns:


{noformat}
    "rowFilterDef": {
        "accessTypes": [
            {
                "itemId": 1,
                "name": "select",
                "label": "select",
                "rbKeyLabel": null,
                "impliedGrants": []
            }
        ],
        "resources": [
            {
                "itemId": 1,
                "name": "select",
                "type": null,
                "level": 1,
                "parent": null,
                "mandatory": null,
                "lookupSupported": null,
                "recursiveSupported": null,
                "excludesSupported": null,
                "matcher": null,
                "matcherOptions": null,
                "validationRegEx": null,
                "validationMessage": null,
                "uiHint": null,
                "label": "select",
                "description": null,
                "rbKeyLabel": null,
                "rbKeyDescription": null,
                "rbKeyValidationMessage": null,
                "accessTypeRestrictions": null,
                "isValidLeaf": null
            }
        ]
    } {noformat}
 

It should be:
{noformat}
    "rowFilterDef": {
        "accessTypes": [
            {
                "itemId": 1,
                "name": "select",
                "label": "select",
                "impliedGrants": []
            }
        ],
        "resources": [
            {
                "itemId": 1,
                "name": "database",
                "type": "string",
                "level": 10,
                "mandatory": true,
                "lookupSupported": true,
                "recursiveSupported": false,
                "excludesSupported": false,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "wildCard": "false",
                    "ignoreCase": "true"
                },
                "validationRegEx": "",
                "validationMessage": "",
                "uiHint": "{ \"singleValue\":true }",
                "label": "Hive Database",
                "description": "Hive Database",
                "accessTypeRestrictions": [],
                "isValidLeaf": false
            },
            {
                "itemId": 2,
                "name": "table",
                "type": "string",
                "level": 20,
                "parent": "database",
                "mandatory": true,
                "lookupSupported": true,
                "recursiveSupported": false,
                "excludesSupported": false,
                "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
                "matcherOptions": {
                    "wildCard": "false",
                    "ignoreCase": "true"
                },
                "validationRegEx": "",
                "validationMessage": "",
                "uiHint": "{ \"singleValue\":true }",
                "label": "Hive Table",
                "description": "Hive Table",
                "accessTypeRestrictions": [],
                "isValidLeaf": true
            }
        ]
    } {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)