diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/JdbcAuthenticationProviderImpl.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/JdbcAuthenticationProviderImpl.scala index e2b1ba476..898e5a9bc 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/JdbcAuthenticationProviderImpl.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/JdbcAuthenticationProviderImpl.scala @@ -108,8 +108,7 @@ class JdbcAuthenticationProviderImpl(conf: KyuubiConf) extends PasswdAuthenticat // Check if JDBC parameters valid require(driverClass.nonEmpty, "JDBC driver class is not configured.") require(authDbJdbcUrl.nonEmpty, "JDBC url is not configured.") - require(authDbUser.nonEmpty, "JDBC user is not configured.") - // allow empty auth db password + // allow empty auth db user or password require(authQuery.nonEmpty, "Query SQL is not configured") val query = authQuery.get.trim.toLowerCase diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/JdbcAuthenticationProviderImplSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/JdbcAuthenticationProviderImplSuite.scala index 7c45ed50e..dcbc62dfa 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/JdbcAuthenticationProviderImplSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/JdbcAuthenticationProviderImplSuite.scala @@ -104,11 +104,6 @@ class JdbcAuthenticationProviderImplSuite extends KyuubiFunSuite { val e5 = intercept[IllegalArgumentException] { new JdbcAuthenticationProviderImpl(_conf) } assert(e5.getMessage.contains("JDBC url is not configured")) - _conf = conf.clone - _conf.unset(AUTHENTICATION_JDBC_USER) - val e6 = intercept[IllegalArgumentException] { new JdbcAuthenticationProviderImpl(_conf) } - assert(e6.getMessage.contains("JDBC user is not configured")) - _conf = conf.clone _conf.unset(AUTHENTICATION_JDBC_QUERY) val e8 = intercept[IllegalArgumentException] { new JdbcAuthenticationProviderImpl(_conf) }