g3rg0 commented on code in PR #4774:
URL: https://github.com/apache/hive/pull/4774#discussion_r1349689125


##########
service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java:
##########
@@ -283,7 +283,7 @@ protected void doPost(HttpServletRequest request, 
HttpServletResponse response)
       }
       // Send a 401 to the client
       response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
-      if(isAuthTypeEnabled(request, HiveAuthConstants.AuthTypes.KERBEROS)) {
+      if(authType.isEnabled(HiveAuthConstants.AuthTypes.KERBEROS)) {

Review Comment:
   > I have some questions, it may not related to problem though, imaging the 
HS2 supports both LDAP and Kerberos:
   > 
   > * How the Kerberos Knox validate the LDAP client?
   > * How the LDAP Knox validate the Kerberos client?
   
   Unfortunately, I don't know Knox, so I can't give you exact answers.
   I could try out the following, if that helps:
   
   In the environment I was testing, Knox was configured to only allow password 
based auth from the outside, and to use Kerberos auth inside when connecting to 
the Hiveserver (the user connected from outside was used as doAs user).
   - First I tried what happens when I connect with an incorrect user (password 
based auth):
   
   ```
   javax.net.ssl|FINE|01|main|2023-10-08 12:01:07.237 
CEST|SSLCipher.java:1460|Padded plaintext before ENCRYPTION (
     0000: 93 3D 2F 66 C5 E9 20 A0   54 21 7F 22 07 2D 0B 62  .=/f.. .T!.".-.b
     0010: 50 4F 53 54 20 2F 67 61   74 65 77 61 79 2F 63 64  POST /gateway/cd
     0020: 70 2D 70 72 6F 78 79 2D   61 70 69 2F 68 69 76 65  p-proxy-api/hive
     0030: 20 48 54 54 50 2F 31 2E   31 0D 0A 43 6F 6E 74 65   HTTP/1.1..Conte
     0040: 6E 74 2D 54 79 70 65 3A   20 61 70 70 6C 69 63 61  nt-Type: applica
     0050: 74 69 6F 6E 2F 78 2D 74   68 72 69 66 74 0D 0A 41  tion/x-thrift..A
     0060: 63 63 65 70 74 3A 20 61   70 70 6C 69 63 61 74 69  ccept: applicati
     0070: 6F 6E 2F 78 2D 74 68 72   69 66 74 0D 0A 55 73 65  on/x-thrift..Use
     0080: 72 2D 41 67 65 6E 74 3A   20 4A 61 76 61 2F 54 48  r-Agent: Java/TH
     0090: 74 74 70 43 6C 69 65 6E   74 2F 48 43 0D 0A 41 75  ttpClient/HC..Au
     00A0: 74 68 6F 72 69 7A 61 74   69 6F 6E 3A 20 42 61 73  thorization: Bas
     00B0: 69 63 20 59 57 35 76 62   6E 6C 74 62 33 56 7A 4F  ic YW5vbnltb3VzO
     00C0: 6D 46 75 62 32 35 35 62   57 39 31 63 77 3D 3D 0D  mFub255bW91cw==.
     00D0: 0A 43 6F 6F 6B 69 65 3A   20 0D 0A 43 6F 6E 74 65  .Cookie: ..Conte
     00E0: 6E 74 2D 4C 65 6E 67 74   68 3A 20 31 34 34 0D 0A  nt-Length: 144..
     00F0: 48 6F 73 74 3A 20 67 66   61 72 6B 61 73 2D 31 2E  Host: gfarkas-1.
     0100: 67 66 61 72 6B 61 73 2E   72 6F 6F 74 2E 68 77 78  gfarkas.root.hwx
     0110: 2E 73 69 74 65 3A 38 34   34 33 0D 0A 43 6F 6E 6E  .site:8443..Conn
     0120: 65 63 74 69 6F 6E 3A 20   4B 65 65 70 2D 41 6C 69  ection: Keep-Ali
     0130: 76 65 0D 0A 41 63 63 65   70 74 2D 45 6E 63 6F 64  ve..Accept-Encod
     0140: 69 6E 67 3A 20 67 7A 69   70 2C 64 65 66 6C 61 74  ing: gzip,deflat
     0150: 65 0D 0A 58 2D 58 53 52   46 2D 48 45 41 44 45 52  e..X-XSRF-HEADER
     0160: 3A 20 74 72 75 65 0D 0A   0D 0A 80 01 00 01 00 00  : true..........
     0170: 00 0B 4F 70 65 6E 53 65   73 73 69 6F 6E 00 00 00  ..OpenSession...
     0180: 01 0C 00 01 08 00 01 00   00 00 09 0D 00 04 0B 0B  ................
     0190: 00 00 00 02 00 00 00 3D   73 65 74 3A 68 69 76 65  .......=set:hive
     01A0: 63 6F 6E 66 3A 68 69 76   65 2E 73 65 72 76 65 72  conf:hive.server
     01B0: 32 2E 74 68 72 69 66 74   2E 72 65 73 75 6C 74 73  2.thrift.results
     01C0: 65 74 2E 64 65 66 61 75   6C 74 2E 66 65 74 63 68  et.default.fetch
     01D0: 2E 73 69 7A 65 00 00 00   04 31 30 30 30 00 00 00  .size....1000...
     01E0: 0C 75 73 65 3A 64 61 74   61 62 61 73 65 00 00 00  .use:database...
     01F0: 07 64 65 66 61 75 6C 74   00 00 B7 83 98 BE 14 41  .default.......A
     0200: C3 1B 8A 21 F1 3D 31 10   F5 10 75 EE D0 CF 18 55  ...!.=1...u....U
     0210: 42 43 05 E6 FB 08 CD 97   54 0E EC 6F 33 07 12 94  BC......T..o3...
     0220: B7 64 4F 89 16 ED CF 8E   FE 47 05 05 05 05 05 05  .dO......G......
   )
   javax.net.ssl|FINE|01|main|2023-10-08 12:01:09.275 
CEST|SSLCipher.java:1306|Padded plaintext after DECRYPTION (
     0000: 3F 90 A7 E9 61 B6 8D B6   92 00 63 1D CF 6B E7 7C  ?...a.....c..k..
     0010: 48 54 54 50 2F 31 2E 31   20 34 30 31 20 55 6E 61  HTTP/1.1 401 Una
     0020: 75 74 68 6F 72 69 7A 65   64 0D 0A 44 61 74 65 3A  uthorized..Date:
     0030: 20 53 75 6E 2C 20 30 38   20 4F 63 74 20 32 30 32   Sun, 08 Oct 202
     0040: 33 20 31 30 3A 30 31 3A   30 37 20 47 4D 54 0D 0A  3 10:01:07 GMT..
     0050: 53 65 74 2D 43 6F 6F 6B   69 65 3A 20 72 65 6D 65  Set-Cookie: reme
     0060: 6D 62 65 72 4D 65 3D 64   65 6C 65 74 65 4D 65 3B  mberMe=deleteMe;
     0070: 20 50 61 74 68 3D 2F 67   61 74 65 77 61 79 2F 63   Path=/gateway/c
     0080: 64 70 2D 70 72 6F 78 79   2D 61 70 69 3B 20 4D 61  dp-proxy-api; Ma
     0090: 78 2D 41 67 65 3D 30 3B   20 45 78 70 69 72 65 73  x-Age=0; Expires
     00A0: 3D 53 61 74 2C 20 30 37   2D 4F 63 74 2D 32 30 32  =Sat, 07-Oct-202
     00B0: 33 20 31 30 3A 30 31 3A   30 39 20 47 4D 54 3B 20  3 10:01:09 GMT; 
     00C0: 53 61 6D 65 53 69 74 65   3D 6C 61 78 0D 0A 57 57  SameSite=lax..WW
     00D0: 57 2D 41 75 74 68 65 6E   74 69 63 61 74 65 3A 20  W-Authenticate: 
     00E0: 42 41 53 49 43 20 72 65   61 6C 6D 3D 22 61 70 70  BASIC realm="app
     00F0: 6C 69 63 61 74 69 6F 6E   22 0D 0A 43 6F 6E 74 65  lication"..Conte
     0100: 6E 74 2D 4C 65 6E 67 74   68 3A 20 30 0D 0A 0D 0A  nt-Length: 0....
     0110: 58 C8 B8 29 CF 18 41 78   ED DF 44 F1 A2 8B A5 B8  X..)..Ax..D.....
     0120: A1 0A 21 9C 31 2F A5 7E   A5 F1 BB 67 35 FE EF 42  ..!.1/.....g5..B
     0130: 4F 00 D3 06 E0 9E D6 2A   A2 9B 86 69 4F AB B0 41  O......*...iO..A
     0140: 0F 0F 0F 0F 0F 0F 0F 0F   0F 0F 0F 0F 0F 0F 0F 0F  ................
   )
   Error: Could not open client transport with JDBC Uri: 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive:
 Could not establish connection to 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive:
 HTTP Response code: 401 (state=08S01,code=0)
   java.sql.SQLException: Could not open client transport with JDBC Uri: 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive:
 Could not establish connection to 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive:
 HTTP Response code: 401
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:412)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:282)
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:208)
        at 
org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:145)
        at 
org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:209)
        at org.apache.hive.beeline.Commands.connect(Commands.java:1680)
        at org.apache.hive.beeline.Commands.connect(Commands.java:1574)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:56)
        at 
org.apache.hive.beeline.BeeLine.execCommandWithPrefix(BeeLine.java:1463)
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1502)
        at org.apache.hive.beeline.BeeLine.connectUsingArgs(BeeLine.java:922)
        at org.apache.hive.beeline.BeeLine.initArgs(BeeLine.java:804)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1115)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1089)
        at 
org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:547)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:529)
   Caused by: java.sql.SQLException: Could not establish connection to 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive:
 HTTP Response code: 401
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1165)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:384)
        ... 21 more
   Caused by: org.apache.thrift.transport.TTransportException: HTTP Response 
code: 401
        at 
org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:291)
        at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:346)
        at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73)
        at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:143)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:135)
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1219)
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1150)
        ... 22 more
   ```
   
   
   - After that I checked what happens if I use Kerberos auth to connect 
externally to the Knox that only allowed password based auth:
   
   ```
   javax.net.ssl|FINE|01|main|2023-10-08 11:59:53.180 
CEST|SSLCipher.java:1460|Padded plaintext before ENCRYPTION (
     0000: 9D C2 DB 4E B3 43 0B 0C   1E 85 A4 E7 B4 B9 BD 31  ...N.C.........1
     0010: 50 4F 53 54 20 2F 67 61   74 65 77 61 79 2F 63 64  POST /gateway/cd
     0020: 70 2D 70 72 6F 78 79 2D   61 70 69 2F 68 69 76 65  p-proxy-api/hive
     0030: 20 48 54 54 50 2F 31 2E   31 0D 0A 43 6F 6E 74 65   HTTP/1.1..Conte
     0040: 6E 74 2D 54 79 70 65 3A   20 61 70 70 6C 69 63 61  nt-Type: applica
     0050: 74 69 6F 6E 2F 78 2D 74   68 72 69 66 74 0D 0A 41  tion/x-thrift..A
     0060: 63 63 65 70 74 3A 20 61   70 70 6C 69 63 61 74 69  ccept: applicati
     0070: 6F 6E 2F 78 2D 74 68 72   69 66 74 0D 0A 55 73 65  on/x-thrift..Use
     0080: 72 2D 41 67 65 6E 74 3A   20 4A 61 76 61 2F 54 48  r-Agent: Java/TH
     0090: 74 74 70 43 6C 69 65 6E   74 2F 48 43 0D 0A 41 75  ttpClient/HC..Au
     00A0: 74 68 6F 72 69 7A 61 74   69 6F 6E 3A 20 4E 65 67  thorization: Neg
     00B0: 6F 74 69 61 74 65 20 3A   20 59 49 49 46 73 67 59  otiate : YIIFsgY
     00C0: 4A 4B 6F 5A 49 68 76 63   53 41 51 49 43 41 51 42  JKoZIhvcSAQICAQB
   ...here I have removed a few unnecessary lines from the token...
     0840: 70 69 79 7A 7A 53 32 70   59 2F 63 66 52 63 45 33  piyzzS2pY/cfRcE3
     0850: 77 2B 54 54 4F 69 77 3D   3D 0D 0A 43 6F 6F 6B 69  w+TTOiw==..Cooki
     0860: 65 3A 20 0D 0A 43 6F 6E   74 65 6E 74 2D 4C 65 6E  e: ..Content-Len
     0870: 67 74 68 3A 20 31 34 34   0D 0A 48 6F 73 74 3A 20  gth: 144..Host: 
     0880: 67 66 61 72 6B 61 73 2D   31 2E 67 66 61 72 6B 61  gfarkas-1.gfarka
     0890: 73 2E 72 6F 6F 74 2E 68   77 78 2E 73 69 74 65 3A  s.root.hwx.site:
     08A0: 38 34 34 33 0D 0A 43 6F   6E 6E 65 63 74 69 6F 6E  8443..Connection
     08B0: 3A 20 4B 65 65 70 2D 41   6C 69 76 65 0D 0A 41 63  : Keep-Alive..Ac
     08C0: 63 65 70 74 2D 45 6E 63   6F 64 69 6E 67 3A 20 67  cept-Encoding: g
     08D0: 7A 69 70 2C 64 65 66 6C   61 74 65 0D 0A 58 2D 58  zip,deflate..X-X
     08E0: 53 52 46 2D 48 45 41 44   45 52 3A 20 74 72 75 65  SRF-HEADER: true
     08F0: 0D 0A 0D 0A 80 01 00 01   00 00 00 0B 4F 70 65 6E  ............Open
     0900: 53 65 73 73 69 6F 6E 00   00 00 01 0C 00 01 08 00  Session.........
     0910: 01 00 00 00 09 0D 00 04   0B 0B 00 00 00 02 00 00  ................
     0920: 00 3D 73 65 74 3A 68 69   76 65 63 6F 6E 66 3A 68  .=set:hiveconf:h
     0930: 69 76 65 2E 73 65 72 76   65 72 32 2E 74 68 72 69  ive.server2.thri
     0940: 66 74 2E 72 65 73 75 6C   74 73 65 74 2E 64 65 66  ft.resultset.def
     0950: 61 75 6C 74 2E 66 65 74   63 68 2E 73 69 7A 65 00  ault.fetch.size.
     0960: 00 00 04 31 30 30 30 00   00 00 0C 75 73 65 3A 64  ...1000....use:d
     0970: 61 74 61 62 61 73 65 00   00 00 07 64 65 66 61 75  atabase....defau
     0980: 6C 74 00 00 A7 5B 23 F4   B0 8F 95 9A 02 B2 B5 84  lt...[#.........
     0990: D1 47 90 C3 18 05 00 CE   6B B6 EC EE C2 20 B2 49  .G......k.... .I
     09A0: 3B A3 21 BC B2 C5 B3 27   BB 34 31 84 E0 07 51 85  ;.!....'.41...Q.
     09B0: C3 50 D1 62 0B 0B 0B 0B   0B 0B 0B 0B 0B 0B 0B 0B  .P.b............
   )
   
   javax.net.ssl|FINE|01|main|2023-10-08 11:59:53.376 
CEST|SSLCipher.java:1306|Padded plaintext after DECRYPTION (
     0000: 49 BB 53 14 4A 36 F1 97   D4 2F A4 AC BC 13 46 77  I.S.J6.../....Fw
     0010: 48 54 54 50 2F 31 2E 31   20 34 30 31 20 55 6E 61  HTTP/1.1 401 Una
     0020: 75 74 68 6F 72 69 7A 65   64 0D 0A 44 61 74 65 3A  uthorized..Date:
     0030: 20 53 75 6E 2C 20 30 38   20 4F 63 74 20 32 30 32   Sun, 08 Oct 202
     0040: 33 20 30 39 3A 35 39 3A   35 33 20 47 4D 54 0D 0A  3 09:59:53 GMT..
     0050: 57 57 57 2D 41 75 74 68   65 6E 74 69 63 61 74 65  WWW-Authenticate
     0060: 3A 20 42 41 53 49 43 20   72 65 61 6C 6D 3D 22 61  : BASIC realm="a
     0070: 70 70 6C 69 63 61 74 69   6F 6E 22 0D 0A 43 6F 6E  pplication"..Con
     0080: 74 65 6E 74 2D 4C 65 6E   67 74 68 3A 20 30 0D 0A  tent-Length: 0..
     0090: 0D 0A FC FA 7A 17 1A 8C   6D A5 71 87 B6 10 03 63  ....z...m.q....c
     00A0: A0 64 CB 43 58 2A 25 EF   F4 FE 6A CE 33 1D 89 00  .d.CX*%...j.3...
     00B0: AF B4 18 99 15 C9 A7 47   92 79 0E D7 1D 9E 57 A1  .......G.y....W.
     00C0: 1F 9D 0D 0D 0D 0D 0D 0D   0D 0D 0D 0D 0D 0D 0D 0D  ................
   )
   Error: Could not open client transport with JDBC Uri: 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive;principal=hivefoo0/[email protected]:
 Could not establish connection to 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive;principal=hivefoo0/[email protected]:
 HTTP Response code: 401 (state=08S01,code=0)
   java.sql.SQLException: Could not open client transport with JDBC Uri: 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive;principal=hivefoo0/[email protected]:
 Could not establish connection to 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive;principal=hivefoo0/[email protected]:
 HTTP Response code: 401
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:412)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:282)
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:208)
        at 
org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:145)
        at 
org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:209)
        at org.apache.hive.beeline.Commands.connect(Commands.java:1680)
        at org.apache.hive.beeline.Commands.connect(Commands.java:1574)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:56)
        at 
org.apache.hive.beeline.BeeLine.execCommandWithPrefix(BeeLine.java:1463)
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1502)
        at org.apache.hive.beeline.BeeLine.connectUsingArgs(BeeLine.java:922)
        at org.apache.hive.beeline.BeeLine.initArgs(BeeLine.java:804)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1115)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1089)
        at 
org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:547)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:529)
   Caused by: java.sql.SQLException: Could not establish connection to 
jdbc:hive2://gfarkas-1.gfarkas.root.hwx.site:8443/;ssl=true;sslTrustStore=./gfarkas-1.jks;trustStorePassword=changeit;transportMode=http;httpPath=gateway/cdp-proxy-api/hive;principal=hivefoo0/[email protected]:
 HTTP Response code: 401
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1165)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:384)
        ... 21 more
   Caused by: org.apache.thrift.transport.TTransportException: HTTP Response 
code: 401
        at 
org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:291)
        at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:346)
        at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73)
        at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:143)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:135)
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1219)
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1150)
        ... 22 more
   ```
   
   In both cases there was an Authorization header, but this is not surprising 
because the JDBC driver is implemented to submit it, and in both cases there 
was also a WWW-Authenticate header, which contained a Basic auth challenge. 
Unfortunately I couldn't configure Knox to accept Kerberos auth from the 
outside, so I couldn't test such cases.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to