Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9144

Beeline + Kerberos shouldn't prompt for unused username + password

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.13.0
    • Fix Version/s: 2.1.0
    • Component/s: Beeline
    • Labels:
      None
    • Environment:

      Hive 0.13 on MapR 4.0.1

      Description

      When using beeline to connect to a kerberized HiveServer2 it still prompts for a username and password that aren't used. It should be changed to not prompt when using Kerberos:

      /opt/mapr/hive/hive-0.13/bin/beeline
      Beeline version 0.13.0-mapr-1409 by Apache Hive
      beeline> !connect jdbc:hive2://<host>:10000/default;principal=hive/<host>@REALM
      scan complete in 6ms
      Connecting to jdbc:hive2://<host>:10000/default;principal=hive/<host>@REALM
      Enter username for jdbc:hive2://<host>:10000/default;principal=hive/<host>@REALM: wronguser
      Enter password for jdbc:hive2://<host>:10000/default;principal=hive/<host>@REALM: <enter>
      Connected to: Apache Hive (version 0.13.0-mapr-1409)
      Driver: Hive JDBC (version 0.13.0-mapr-1409)
      Transaction isolation: TRANSACTION_REPEATABLE_READ
      

      Hive conf includes (as concisely shown by set):

      hive.server2.authentication = KERBEROS
      hive.server2.enable.doAs = true
      hive.server2.enable.impersonation = true
      

      I can't see how to demonstrate in HQL session that I am not connected as "wronguser" (which obviously doesn't exist either locally or as a Kerberos principal or account in my LDAP directory), so I've raised another ticket for that HIVE-9143, but it should be clear given I specifed a non-existent user and a completely blank password just hitting enter that it's not using those credentials. Same happens with <enter>, <enter> for both username and password.

      Regards,

      Hari Sekhon
      http://www.linkedin.com/in/harisekhon

        Issue Links

          Activity

          Hide
          ngangam Naveen Gangam added a comment -

          I have included the fix for this in HIVE-13502. Should be fixed now.

          Show
          ngangam Naveen Gangam added a comment - I have included the fix for this in HIVE-13502 . Should be fixed now.

            People

            • Assignee:
              ngangam Naveen Gangam
              Reporter:
              harisekhon Hari Sekhon
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development