diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/http/authentication/AuthenticationFilter.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/http/authentication/AuthenticationFilter.scala index 15b387607..706b411df 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/http/authentication/AuthenticationFilter.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/http/authentication/AuthenticationFilter.scala @@ -58,7 +58,7 @@ class AuthenticationFilter(conf: KyuubiConf) extends Filter with Logging { val authTypes = conf.get(AUTHENTICATION_METHOD).map(AuthTypes.withName) val spnegoKerberosEnabled = authTypes.contains(KERBEROS) val basicAuthTypeOpt = { - if (authTypes == Set(NOSASL)) { + if (authTypes.toSet == Set(NOSASL)) { authTypes.headOption } else { authTypes.filterNot(_.equals(KERBEROS)).filterNot(_.equals(NOSASL)).headOption