Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-28421

Add ofs (Ozone Filesystem) support for acquireDelegationToken

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • security

    Description

      Currently acquireDelegationToken is hardcoded for checking swebhdfs, webhdfs and hdfs(Refer below or here).
      We should add support for Ozone also. 

      public void acquireDelegationToken(final FileSystem fs) throws IOException {
        String tokenKind;
        String scheme = fs.getUri().getScheme();
        if (SWEBHDFS_SCHEME.equalsIgnoreCase(scheme)) {
          tokenKind = SWEBHDFS_TOKEN_KIND.toString();
        } else if (WEBHDFS_SCHEME.equalsIgnoreCase(scheme)) {
          tokenKind = WEBHDFS_TOKEN_KIND.toString();
        } else if (HDFS_URI_SCHEME.equalsIgnoreCase(scheme)) {
          tokenKind = HDFS_DELEGATION_KIND.toString();
        } else {
          LOG.warn("Unknown FS URI scheme: " + scheme);
          // Preserve default behavior
          tokenKind = HDFS_DELEGATION_KIND.toString();
        }
      
        acquireDelegationToken(tokenKind, fs);
      } 

      This can impact jobs like BulkLoad on a secure environment.

      Thanks bszabolcs for the debug help!

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pratyush.bhatt Pratyush Bhatt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: