turboFei commented on code in PR #6624:
URL: https://github.com/apache/kyuubi/pull/6624#discussion_r1722393845
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/operation/thrift/http/KyuubiOperationThriftHttpKerberosAndPlainAuthSuite.scala:
##########
@@ -49,19 +58,46 @@ class KyuubiOperationThriftHttpKerberosAndPlainAuthSuite
UserGroupInformation.setConfiguration(config)
assert(UserGroupInformation.isSecurityEnabled)
- KyuubiConf().set(KyuubiConf.AUTHENTICATION_METHOD, Seq("KERBEROS", "LDAP",
"CUSTOM"))
+ KyuubiConf().set(KyuubiConf.AUTHENTICATION_METHOD, Seq("KERBEROS",
"CUSTOM", "LDAP"))
.set(KyuubiConf.SERVER_KEYTAB, testKeytab)
.set(KyuubiConf.SERVER_PRINCIPAL, testPrincipal)
.set(KyuubiConf.AUTHENTICATION_LDAP_URL, ldapUrl)
.set(KyuubiConf.AUTHENTICATION_LDAP_BASE_DN, ldapBaseDn.head)
.set(
KyuubiConf.AUTHENTICATION_CUSTOM_CLASS,
classOf[UserDefineAuthenticationProviderImpl].getCanonicalName)
+ .set(
+ KyuubiConf.AUTHENTICATION_CUSTOM_BEARER_CLASS,
+ classOf[UserDefineAuthenticationProviderImpl].getCanonicalName)
.set(KyuubiConf.SERVER_SPNEGO_KEYTAB, testKeytab)
.set(KyuubiConf.SERVER_SPNEGO_PRINCIPAL, testSpnegoPrincipal)
}
override protected def getJdbcUrl: String =
s"jdbc:hive2://${server.frontendServices.head.connectionUrl}/default;transportMode=http;"
+
s"httpPath=cliservice"
+
+ test("test with valid CUSTOM http bearer authentication") {
+ val conn = DriverManager.getConnection(JdbcUrlWithValidBearerToken)
Review Comment:
FYI:
```
withSessionConf(Map("bearerToken" -> "token"))()() {
val conn = DriverManager.getConnection(jdbcUrlWithConf)
}
```
--
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]