Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14350

Relative path for Kerberos keytab is not working on IBM JDK

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7.3
    • None
    • common, security
    • None
    • IBM JDK

    Description

      For the sample code below:

      public class TestKrb {
        public static void main(String[] args) throws IOException {
          String user = args[0], path = args[1];
          UserGroupInformation ugi = UserGroupInformation.loginUserFromKeytabAndReturnUGI(user, path);
          System.out.println("Login successfully");
        }
      }
      

      When I use IBM JDK and pass a relative path for the Kerberos keytab, it will throw error messages. According to the debug log, it always tries to read the keytab from the root path. See the debug logs below:

      In above log, the useKeytab=<value> entry is showing a <value> prefaced by a leading "//". It appears that HADOOP is adjusting the user supplied keytab file and most likely prefacing it with something like "FILE://", which would cause the resulting IBM normalized value to then be prefaced by "//" before the user supplied keytab file. This is the cause for why relative paths used with HADOOP are not working with IBM JVM's.

      Attachments

        Activity

          People

            Unassigned Unassigned
            shuitingjianle Wen Yuan Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: