You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/07/06 08:47:18 UTC

[GitHub] [incubator-kyuubi] pan3793 opened a new pull request, #3023: Decouple Kyuubi JDBC Kerberos from UGI

pan3793 opened a new pull request, #3023:
URL: https://github.com/apache/incubator-kyuubi/pull/3023

   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] turboFei commented on pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication w/ JAAS

Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on PR #3023:
URL: https://github.com/apache/kyuubi/pull/3023#issuecomment-1459375720

   hi @pan3793 
   
   see that ugi.doAs does not work after this change if KRB5CCNAME env is set and does not set `kerberosAuthType=fromSubject` explicitly.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 closed pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication w/ JAAS

Posted by GitBox <gi...@apache.org>.
pan3793 closed pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication w/ JAAS
URL: https://github.com/apache/incubator-kyuubi/pull/3023


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication w/ JAAS

Posted by GitBox <gi...@apache.org>.
pan3793 commented on PR #3023:
URL: https://github.com/apache/incubator-kyuubi/pull/3023#issuecomment-1195841005

   Since #3096 got approved, I'm going to merge this PR, thanks all for helping reviews.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication w/ JAAS

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #3023:
URL: https://github.com/apache/kyuubi/pull/3023#issuecomment-1459532063

   @turboFei @gabrywu thanks for reporting this issue, raised https://github.com/apache/kyuubi/pull/4479 to fix it, please take a look


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication by JAAS

Posted by GitBox <gi...@apache.org>.
pan3793 commented on PR #3023:
URL: https://github.com/apache/incubator-kyuubi/pull/3023#issuecomment-1187277215

   @yaooqinn for review convince, this PR has been split into multiple parts, I updated the PR description to reflect the changes, please take a look when you have time.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] turboFei commented on pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication w/ JAAS

Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on PR #3023:
URL: https://github.com/apache/kyuubi/pull/3023#issuecomment-1459376199

   cc @gabrywu 


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #3023: Decouple Kyuubi JDBC Kerberos from UGI

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #3023:
URL: https://github.com/apache/incubator-kyuubi/pull/3023#issuecomment-1176009862

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3023](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48e1888) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/1f59a592d8f9f67a6cfc4b5df40cab760c1be911?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1f59a59) will **increase** coverage by `0.91%`.
   > The diff coverage is `1.94%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3023      +/-   ##
   ============================================
   + Coverage     50.47%   51.39%   +0.91%     
     Complexity        6        6              
   ============================================
     Files           454      452       -2     
     Lines         25449    24982     -467     
     Branches       3572     3489      -83     
   ============================================
   - Hits          12845    12839       -6     
   + Misses        11386    10919     -467     
   - Partials       1218     1224       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../main/java/org/apache/hadoop/security/UGIShim.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaGFkb29wL3NlY3VyaXR5L1VHSVNoaW0uamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../java/org/apache/kyuubi/jdbc/KyuubiHiveDriver.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvS3l1dWJpSGl2ZURyaXZlci5qYXZh) | `4.87% <0.00%> (+0.22%)` | :arrow_up: |
   | [...uubi/jdbc/hive/HttpKerberosRequestInterceptor.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9IdHRwS2VyYmVyb3NSZXF1ZXN0SW50ZXJjZXB0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...e/kyuubi/jdbc/hive/HttpRequestInterceptorBase.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9IdHRwUmVxdWVzdEludGVyY2VwdG9yQmFzZS5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...che/kyuubi/jdbc/hive/HttpTokenAuthInterceptor.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9IdHRwVG9rZW5BdXRoSW50ZXJjZXB0b3IuamF2YQ==) | `0.00% <ø> (ø)` | |
   | [...n/java/org/apache/kyuubi/jdbc/hive/JdbcColumn.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9KZGJjQ29sdW1uLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...in/java/org/apache/kyuubi/jdbc/hive/JdbcTable.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9KZGJjVGFibGUuamF2YQ==) | `0.00% <ø> (ø)` | |
   | [...g/apache/kyuubi/jdbc/hive/KyuubiBaseResultSet.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9LeXV1YmlCYXNlUmVzdWx0U2V0LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/jdbc/hive/KyuubiConnection.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9LeXV1YmlDb25uZWN0aW9uLmphdmE=) | `4.11% <0.00%> (-0.02%)` | :arrow_down: |
   | [.../org/apache/kyuubi/jdbc/hive/KyuubiDataSource.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9LeXV1YmlEYXRhU291cmNlLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | ... and [32 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1f59a59...48e1888](https://codecov.io/gh/apache/incubator-kyuubi/pull/3023?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on pull request #3023: Decouple Kyuubi JDBC Kerberos from UGI

Posted by GitBox <gi...@apache.org>.
pan3793 commented on PR #3023:
URL: https://github.com/apache/incubator-kyuubi/pull/3023#issuecomment-1185090361

   cc @yaooqinn @zhouyifan279 @cxzl25 @turboFei 


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #3023: Decouple Kyuubi JDBC Kerberos from UGI

Posted by GitBox <gi...@apache.org>.
pan3793 commented on code in PR #3023:
URL: https://github.com/apache/incubator-kyuubi/pull/3023#discussion_r921123057


##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/auth/HttpKerberosRequestInterceptor.java:
##########
@@ -61,10 +60,10 @@ protected void addHttpAuthHeader(HttpRequest httpRequest, HttpContext httpContex
       // Locking ensures the tokens are unique in case of concurrent requests
       kerberosLock.lock();
       String kerberosAuthHeader =
-          HttpAuthUtils.getKerberosServiceTicket(principal, host, loggedInSubject);
+          HttpAuthUtils.getKerberosServiceTicket(serverPrincipal, host, loggedInSubject);
       // Set the session key token (Base64 encoded) in the headers
       httpRequest.addHeader(
-          HttpAuthUtils.AUTHORIZATION + ": " + HttpAuthUtils.NEGOTIATE + " ", kerberosAuthHeader);
+          HttpAuthUtils.AUTHORIZATION, HttpAuthUtils.NEGOTIATE + " " + kerberosAuthHeader);

Review Comment:
   This fixed the SPNEGO implementation bug. https://datatracker.ietf.org/doc/html/rfc4559#section-5



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] cxzl25 commented on a diff in pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication w/ JAAS

Posted by GitBox <gi...@apache.org>.
cxzl25 commented on code in PR #3023:
URL: https://github.com/apache/incubator-kyuubi/pull/3023#discussion_r926222365


##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiConnection.java:
##########
@@ -83,7 +82,6 @@ public class KyuubiConnection implements SQLConnection, KyuubiLoggable {
   public static final Logger LOG = LoggerFactory.getLogger(KyuubiConnection.class.getName());
   public static final String BEELINE_MODE_PROPERTY = "BEELINE_MODE";
   public static final String HS2_PROXY_USER = "hive.server2.proxy.user";
-  public static final String HS2_CLIENT_TOKEN = "hiveserver2ClientToken";

Review Comment:
   n this PR we do not support the `delegationToken` authentication method, we will add it back in the subsequent PR #3096, right?



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #3023: Kyuubi Hive JDBC: Replace UGI-based Kerberos authentication w/ JAAS

Posted by GitBox <gi...@apache.org>.
pan3793 commented on code in PR #3023:
URL: https://github.com/apache/incubator-kyuubi/pull/3023#discussion_r926222515


##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiConnection.java:
##########
@@ -83,7 +82,6 @@ public class KyuubiConnection implements SQLConnection, KyuubiLoggable {
   public static final Logger LOG = LoggerFactory.getLogger(KyuubiConnection.class.getName());
   public static final String BEELINE_MODE_PROPERTY = "BEELINE_MODE";
   public static final String HS2_PROXY_USER = "hive.server2.proxy.user";
-  public static final String HS2_CLIENT_TOKEN = "hiveserver2ClientToken";

Review Comment:
   yea



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org