code: @LifecycleStart
    public void authenticate()
    {
      String principal = hdfsKerberosConfig.getPrincipal();
      String keytab = hdfsKerberosConfig.getKeytab();
      if (!Strings.isNullOrEmpty(principal) && !Strings.isNullOrEmpty(keytab)) {
        UserGroupInformation.setConfiguration(hadoopConf);
        if (UserGroupInformation.isSecurityEnabled()) {
          try {
            if (UserGroupInformation.getCurrentUser().hasKerberosCredentials() == false
                || !UserGroupInformation.getCurrentUser().getUserName().equals(principal)) {
              log.info("Trying to authenticate user [%s] with keytab [%s]..", principal, keytab);
              UserGroupInformation.loginUserFromKeytab(principal, keytab);
            }
          }
          catch (IOException e) {
            throw new ISE(e, "Failed to authenticate user principal [%s] with keytab [%s]", principal, keytab);
          }
        }
      }
    }
docs: Dose authenticate against a secured hadoop cluster
  In case of any bug fix make sure to fix the code in JobHelper#authenticate as well.