Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-3223

Query for the list of hybrid cubes results in NPE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: v2.2.0
    • Fix Version/s: v2.3.0
    • Component/s: REST Service
    • Labels:
      None
    • Environment:
      HDP 2.5.6, Kylin 2.2

      Description

      Calling REST API to get the list of hybrid cubes returns stack trace with NPE exception.

      curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {}  http://localhost:7070/kylin/api/hybrids
       

       

      If a parameter project without a value is specified, call succeeds. E.g.

      curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {} http://localhost:7070/kylin/api/hybrids?project

      Quick look at the HybridService.java suggests that there is a bug in the code, where the very first line tries to check ACLs on the project using the project name, which is NULL, when project parameter is not specified as part of the URL.
      If parameter is specified without a value, ACL check is not performed, so it's another bug, as the list of projects is retrieved without read permission checking.

        Attachments

          Activity

            People

            • Assignee:
              seva_ostapenko Vsevolod Ostapenko
              Reporter:
              seva_ostapenko Vsevolod Ostapenko
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: