Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-3307

Python client: get_service_def returns incorrect resources in rowFilterDef

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 3.0.0, 2.2.0
    • intg
    • None

    Description

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

          "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
                  }
              ]
          } 

       

      It should be:

          "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
                  }
              ]
          } 

      Attachments

        1. RANGER-3307.patch
          1 kB
          Madhan Neethiraj

        Activity

          People

            madhan Madhan Neethiraj
            madhan Madhan Neethiraj
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: