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

Make the HBaseMiniCluster compliant with Kerberos

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 1.2.0, 1.3.0, 0.98.16, 2.0.0
    • security, test
    • None
    • Reviewed

    Description

      Whne using MiniKDC and the minicluster in a unit test, there is a conflict causeed by HBaseTestingUtility:

        public static User getDifferentUser(final Configuration c,
          final String differentiatingSuffix)
        throws IOException {
         // snip
          String username = User.getCurrent().getName() +
            differentiatingSuffix; <==================== problem here
          User user = User.createUserForTesting(c, username,
              new String[]{"supergroup"});
          return user;
        }
      

      This creates users like securedUser/localhost@EXAMPLE.COM.hfs.0, and this does not work.

      My fix is to return the current user when Kerberos is set. I don't think that there is another option (any other opinion?). However this user is not in a group so we have logs like 'WARN [IPC Server handler 9 on 61366] security.UserGroupInformation (UserGroupInformation.java:getGroupNames(1521)) - No groups available for user securedUser' I'm not sure of its impact. apurtell, what do you think?

      Attachments

        1. hbase-14580.v2.patch
          1 kB
          Michael Stack
        2. hbase-14580.v2.patch
          1 kB
          Nicolas Liochon
        3. patch-14580.v1.patch
          1 kB
          Nicolas Liochon

        Activity

          People

            nkeywal Nicolas Liochon
            nkeywal Nicolas Liochon
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: