Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5714

Hive[3]ConnectionPool - Kerberos Authentication issue/misleading

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.9.0
    • Extensions
    • None

    Description

      In HiveConnectionPool and Hive3ConnectionPool, in the @OnEnabled method, we have:

      log.info("Hive Security Enabled, logging in as principal {} with keytab {}", new Object[] {resolvedPrincipal, resolvedKeytab});
      try {
          ugi = hiveConfigurator.authenticate(hiveConfig, resolvedPrincipal, resolvedKeytab);
      } catch (AuthenticationFailedException ae) {
          log.error(ae.getMessage(), ae);
      }
      getLogger().info("Successfully logged in as principal {} with keytab {}", new Object[] {resolvedPrincipal, resolvedKeytab});

      Which causes two issues:

      • we're logging the successful message even though the authentication failed
      • the Hive connection is created using the NiFi user identity (this would need to be confirmed but that's what I observed during a test - it could be due to the environment though)

      In my opinion, an InitializationException should be thrown so that the controller service is not enabled.

      Attachments

        Issue Links

          Activity

            People

              pvillard Pierre Villard
              pvillard Pierre Villard
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: