You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/04/24 18:16:56 UTC

[kyuubi] branch branch-1.7 updated: [KYUUBI #4763] [DOCS] Fix the Kyuubi JDBC kerberos parameters

This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.7 by this push:
     new 002ec126e [KYUUBI #4763] [DOCS] Fix the Kyuubi JDBC kerberos parameters
002ec126e is described below

commit 002ec126eff10ef43521263d20802eddb2d53350
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Tue Apr 25 02:16:28 2023 +0800

    [KYUUBI #4763] [DOCS] Fix the Kyuubi JDBC kerberos parameters
    
    ### _Why are the changes needed?_
    
    The Kerberos-related parameters in Kyuubi JDBC driver are
    
    - `kyuubiClientPrincipal`
    - `kyuubiClientKeytab`
    - `principal`. Since 1.7.0, `kyuubiServerPrincipal` is added as an alias
    
    ### _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.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #4763 from pan3793/kerberos-doc.
    
    Closes #4763
    
    7400e3a08 [Cheng Pan] nit
    021c73174 [Cheng Pan] nit
    337fb1229 [Cheng Pan] fix
    4c4907bc8 [Cheng Pan] fix
    d2478eeb7 [Cheng Pan] nit
    3b0899d3e [Cheng Pan] nit
    8dfdb6bde [Cheng Pan] [DOCS] Fix the Kyuubi JDBC kerberos parameters
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit e1e57e52336c9d7c60e9983b1beed2dd20af75e7)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 docs/client/advanced/kerberos.md          |  2 +-
 docs/client/jdbc/kyuubi_jdbc.rst          | 16 ++++++++--------
 docs/quick_start/quick_start_with_jdbc.md |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/docs/client/advanced/kerberos.md b/docs/client/advanced/kerberos.md
index 4962dd2c8..a9cb55812 100644
--- a/docs/client/advanced/kerberos.md
+++ b/docs/client/advanced/kerberos.md
@@ -242,5 +242,5 @@ jdbc:hive2://<kyuubi_server_address>:<kyuubi_server_port>/<db>;kyuubiServerPrinc
 - `principal` is inherited from Hive JDBC Driver and is a little ambiguous, and we could use `kyuubiServerPrincipal` as its alias.
 - `kyuubi_server_principal` is the value of `kyuubi.kinit.principal` set in `kyuubi-defaults.conf`.
 - As a command line argument, JDBC URL should be quoted to avoid being split into 2 commands by ";".
-- As to DBeaver, `<db>;principal=<kyuubi_server_principal>` should be set as the `Database/Schema` argument.
+- As to DBeaver, `<db>;principal=<kyuubi_server_principal>` or `<db>;kyuubiServerPrincipal=<kyuubi_server_principal>` should be set as the `Database/Schema` argument.
 
diff --git a/docs/client/jdbc/kyuubi_jdbc.rst b/docs/client/jdbc/kyuubi_jdbc.rst
index ab59859aa..d4270ea8a 100644
--- a/docs/client/jdbc/kyuubi_jdbc.rst
+++ b/docs/client/jdbc/kyuubi_jdbc.rst
@@ -168,12 +168,12 @@ It's straightforward to use principal and keytab for Kerberos authentication, ju
 
 .. code-block::
 
-   jdbc:kyuubi://host:port/schema;clientKeytab=<clientKeytab>;clientPrincipal=<clientPrincipal>;serverPrincipal=<serverPrincipal>
+   jdbc:kyuubi://host:port/schema;kyuubiClientPrincipal=<clientPrincipal>;kyuubiClientKeytab=<clientKeytab>;kyuubiServerPrincipal=<serverPrincipal>
 
-- clientKeytab: path of Kerberos ``keytab`` file for client authentication
-- clientPrincipal: Kerberos ``principal`` for client authentication
-- serverPrincipal: Kerberos ``principal`` configured by `kyuubi.kinit.principal` at the server side. ``serverPrincipal`` is available
-  since 1.7.0, for previous versions, use ``principal`` instead.
+- kyuubiClientPrincipal: Kerberos ``principal`` for client authentication
+- kyuubiClientKeytab: path of Kerberos ``keytab`` file for client authentication
+- kyuubiServerPrincipal: Kerberos ``principal`` configured by `kyuubi.kinit.principal` at the server side. ``kyuubiServerPrincipal`` is available
+  as an alias of ``principal`` since 1.7.0, use ``principal`` for previous versions.
 
 Authentication by Principal and TGT Cache
 *****************************************
@@ -183,7 +183,7 @@ does Kerberos authentication through the TGT cache.
 
 .. code-block::
 
-   jdbc:kyuubi://host:port/schema;serverPrincipal=<serverPrincipal>
+   jdbc:kyuubi://host:port/schema;kyuubiServerPrincipal=<serverPrincipal>
 
 Authentication by `Hadoop UserGroupInformation`_ ``doAs`` (programing only)
 ***************************************************************************
@@ -195,7 +195,7 @@ Authentication by `Hadoop UserGroupInformation`_ ``doAs`` (programing only)
 
 .. code-block::
 
-  String jdbcUrl = "jdbc:kyuubi://host:port/schema;serverPrincipal=<serverPrincipal>"
+  String jdbcUrl = "jdbc:kyuubi://host:port/schema;kyuubiServerPrincipal=<serverPrincipal>"
   UserGroupInformation ugi = UserGroupInformation.loginUserFromKeytab(clientPrincipal, clientKeytab);
   ugi.doAs((PrivilegedExceptionAction<String>) () -> {
     Connection conn = DriverManager.getConnection(jdbcUrl);
@@ -207,7 +207,7 @@ Authentication by Subject (programing only)
 
 .. code-block:: java
 
-   String jdbcUrl = "jdbc:kyuubi://host:port/schema;serverPrincipal=<serverPrincipal>;kerberosAuthType=fromSubject"
+   String jdbcUrl = "jdbc:kyuubi://host:port/schema;kyuubiServerPrincipal=<serverPrincipal>;kerberosAuthType=fromSubject"
    Subject kerberizedSubject = ...;
    Subject.doAs(kerberizedSubject, (PrivilegedExceptionAction<String>) () -> {
      Connection conn = DriverManager.getConnection(jdbcUrl);
diff --git a/docs/quick_start/quick_start_with_jdbc.md b/docs/quick_start/quick_start_with_jdbc.md
index c40958191..c7001db64 100644
--- a/docs/quick_start/quick_start_with_jdbc.md
+++ b/docs/quick_start/quick_start_with_jdbc.md
@@ -74,7 +74,7 @@ public class KyuubiJDBCDemo {
 
   private static String driverName = "org.apache.kyuubi.jdbc.KyuubiHiveDriver";
   private static String kyuubiJdbcUrlTemplate = "jdbc:kyuubi://localhost:10009/default;" +
-          "clientPrincipal=%s;clientKeytab=%s;serverPrincipal=%s";
+          "kyuubiClientPrincipal=%s;kyuubiClientKeytab=%s;kyuubiServerPrincipal=%s";
 
   public static void main(String[] args) throws SQLException {
     String clientPrincipal = args[0]; // Kerberos principal