From 9ade78981be64a47043a214dfc83354ea1eca228 Mon Sep 17 00:00:00 2001 From: wforget <643348094@qq.com> Date: Mon, 18 Mar 2024 17:29:42 +0800 Subject: [PATCH] [FOLLOWUP] Disable rest api authentication, remove auth filter --- .../apache/kyuubi/server/KyuubiRestFrontendService.scala | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala index 3517b6c5323..6a05133dda1 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala @@ -17,16 +17,14 @@ package org.apache.kyuubi.server -import java.util.EnumSet import java.util.concurrent.{Future, TimeUnit} import java.util.concurrent.atomic.{AtomicBoolean, AtomicInteger} -import javax.servlet.DispatcherType import javax.ws.rs.WebApplicationException import javax.ws.rs.core.Response.Status import com.google.common.annotations.VisibleForTesting import org.apache.hadoop.conf.Configuration -import org.eclipse.jetty.servlet.{ErrorPageErrorHandler, FilterHolder} +import org.eclipse.jetty.servlet.ErrorPageErrorHandler import org.apache.kyuubi.{KyuubiException, Utils} import org.apache.kyuubi.config.KyuubiConf @@ -101,11 +99,9 @@ class KyuubiRestFrontendService(override val serverable: Serverable) private def startInternal(): Unit = { val contextHandler = ApiRootResource.getServletHandler(this) - val holder = new FilterHolder(new AuthenticationFilter(conf)) - contextHandler.addFilter(holder, "/v1/*", EnumSet.allOf(classOf[DispatcherType])) - val authenticationFactory = new KyuubiHttpAuthenticationFactory(conf) server.addHandler(contextHandler) + val authenticationFactory = new KyuubiHttpAuthenticationFactory(conf) val proxyHandler = ApiRootResource.getEngineUIProxyHandler(this) server.addHandler(authenticationFactory.httpHandlerWrapperFactory.wrapHandler(proxyHandler))