Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-2805

S3NotebookRepo does not use user's pricinpal for directory structure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • zeppelin-zengine
    • None

    Description

      I enabled S3NotebookRepo in zeppelin-site and rename shiro.ini in order to enable standard security.
      I expected the S3 directory structure to be:
      s3://

      {bucket}

      /

      {username}/{notebook-id}/note.json where {username}

      is the user's login name.

      in S3NotebookRepo.java's save function
      String key = user + "/" + "notebook" + "/" + note.getId() + "/" + "note.json";
      I added log, it showed that the key has the value of "user/notebook/[note_id]/note.json"

      the line 92 of S3NotebookRepo.java, the user is from ZeppelinConfiguration.getUser(), it doesn't sound right to me. I believe it should be passed from user principal similar to
      https://github.com/apache/zeppelin/blob/master/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java#L799

      String user = fromMessage.principal;

      I am not sure where this info is passed to S3NotebookRepo

      Attachments

        Activity

          People

            Unassigned Unassigned
            richardxin168 Richard Xin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: