Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-9150

[importer] Avoid creating scratchdir outside of encryption zone

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 4.6.0
    • Fix Version/s: None
    • Component/s: app.importer
    • Labels:
      None

      Description

      The parent directory /enc_zn is created as an encryption zone, user uploads a file to /enc_zn/systest and run importer will encounter following error:

      403 Client Error: Forbidden for url: http://yc-c6ii1k-1.gce.cloudera.com:20101/webhdfs/v1/enc_zn/systest/airports.csv?destination=%2Fuser%2Fsystest%2F.scratchdir&op=RENAME&user.name=hue&doas=systest {"RemoteException":{"exception":"IOException","javaClassName":"java.io.IOException","message":"/enc_zn/systest/airports.csv can't be moved from an encryption zone."}} (error 403)

      [12/Feb/2020 19:27:27 -0800] models       ERROR    Failed to extract json message: Extra data: line 1 column 5 - line 2 column 167 (char 4 - 365)
      Traceback (most recent call last):
        File "/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/lib/hue/desktop/libs/dashboard/src/dashboard/models.py", line 958, in extract_solr_exception_message
          message = json.loads(e.message)
        File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
          return _default_decoder.decode(s)
        File "/usr/lib64/python2.7/json/decoder.py", line 369, in decode
          raise ValueError(errmsg("Extra data", s, end, len(s)))
      ValueError: Extra data: line 1 column 5 - line 2 column 167 (char 4 - 365)
      [12/Feb/2020 19:27:27 -0800] models       ERROR    Failed to parse json response: 403 Client Error: Forbidden for url: http://yc-c6ii1k-1.gce.cloudera.com:20101/webhdfs/v1/enc_zn/systest/airports.csv?destination=%2Fuser%2Fsystest%2F.scratchdir&op=RENAME&user.name=hue&doas=systest
      {"RemoteException":{"exception":"IOException","javaClassName":"java.io.IOException","message":"/enc_zn/systest/airports.csv can't be moved from an encryption zone."}} (error 403)
      Traceback (most recent call last):
        File "/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/lib/hue/desktop/libs/dashboard/src/dashboard/models.py", line 958, in extract_solr_exception_message
          message = json.loads(e.message)
        File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
          return _default_decoder.decode(s)
        File "/usr/lib64/python2.7/json/decoder.py", line 369, in decode
          raise ValueError(errmsg("Extra data", s, end, len(s)))
      ValueError: Extra data: line 1 column 5 - line 2 column 167 (char 4 - 365)
      

        Attachments

          Activity

            People

            • Assignee:
              yingc Ying Chen
              Reporter:
              yingc Ying Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: