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

Query for the list of hybrid cubes results in NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • v2.2.0
    • v2.3.0
    • REST Service
    • None
    • 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

        1. KYLIN-3223.master.001.patch
          2 kB
          Vsevolod Ostapenko
        2. 0001-KYLIN-3223-Query-for-the-list-of-hybrid-cubes-result.patch
          5 kB
          Vsevolod Ostapenko

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: