Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-988

It's better to let SentryAuthorization setter path always fall through and update HDFS

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: Hdfs Plugin
    • Labels:
      None

      Description

      Currently SentryAuthorizationProvider rejects setter calls to Sentry-managed paths, and issue an error message when enabled.

      There are two issues:
      1. When creating a file or dir, the parent dir's group will be set to the newly created file/dir, this is supposed to be logged to fsimage in-memory representation, but because the rejection of Sentry, it's not.

      2. (as an example) When user issue a setOwner call via the following RPC:

      @Override // ClientProtocol
        public void setOwner(String src, String username, String groupname)
            throws IOException {
          checkNNStartup();
          namesystem.setOwner(src, username, groupname);
        }
      

      Two calls are executed in the deep stack:

      a.     dir.setOwner(src, username, group);
      b.     getEditLog().logSetOwner(src, username, group);
      

      The first call is the one gets rejected by Sentry, however, the second one still updates the entry to Edit log. This would indicate an inconsistency between in-memory representation of the attribute and what's recorded on edit log.

      Creating this jira to make SentryAuthorizationProvider always fallthrough to write to HDFS, and issue a warning msg when it "rejects" (for Sentry-managed paths).

        Attachments

        1. SENTRY-988.001.patch
          9 kB
          Yongjun Zhang
        2. SENTRY-988.002.patch
          11 kB
          Yongjun Zhang
        3. SENTRY-988.003.patch
          12 kB
          Yongjun Zhang
        4. SENTRY-988.004.patch
          13 kB
          Yongjun Zhang

          Issue Links

            Activity

              People

              • Assignee:
                yzhangal Yongjun Zhang
                Reporter:
                yzhangal Yongjun Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: