You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/10/08 02:24:11 UTC

[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1175: [KYUUBI #1174] Service discovery supports kerberos

yaooqinn commented on a change in pull request #1175:
URL: https://github.com/apache/incubator-kyuubi/pull/1175#discussion_r724654992



##########
File path: kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala
##########
@@ -256,6 +261,28 @@ object ServiceDiscovery extends Logging {
     }
     serviceNode
   }
+
+  private def addConfsToPublish(conf: KyuubiConf, instance: String): String = {
+    if (!instance.contains(":")) {
+      return instance
+    }
+    val hostPort = instance.split(":", 2)
+    val confsToPublish = collection.mutable.Map[String, String]()
+
+    // Hostname
+    confsToPublish += ("hive.server2.thrift.bind.host" -> hostPort(0))
+    // Transport mode
+    confsToPublish += ("hive.server2.transport.mode" -> "binary")
+    // Transport specific confs
+    confsToPublish += ("hive.server2.thrift.port" -> hostPort(1))
+    confsToPublish += ("hive.server2.thrift.sasl.qop" -> "auth")
+    // Auth specific confs
+    confsToPublish += ("hive.server2.authentication" -> "KERBEROS")
+    confsToPublish += ("hive.server2.authentication.kerberos.principal" ->
+      conf.get(KyuubiConf.SERVER_PRINCIPAL).map(KyuubiHadoopUtils.getServerPrincipal).getOrElse(""))

Review comment:
       Is it able to connect service1 using a principal for server2, e.g. `abc/service2.org@KYUUBI.ORG`?




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

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