vernedeng commented on code in PR #8390:
URL: https://github.com/apache/inlong/pull/8390#discussion_r1248904614


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/tenant/TenantAuthenticatingFilter.java:
##########
@@ -48,23 +55,24 @@ public void doFilter(ServletRequest request, 
ServletResponse response, FilterCha
         HttpServletRequest httpServletRequest = (HttpServletRequest) request;
         Subject subject = SecurityUtils.getSubject();
 
+        UserInfo loginUserInfo;
         // pre-check
         if (!subject.isAuthenticated()) {
-            log.error("The request should be authed before tenant 
authentication, user:{}, path:{}",
-                    subject.getPrincipal(),
-                    httpServletRequest.getServletPath());
-            ((HttpServletResponse) 
response).sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-            return;
+            log.debug("the request is not authed before tenant authentication, 
use default user:{}, path:{}",
+                    DEFAULT_USER, httpServletRequest.getServletPath());
+            loginUserInfo = defaultUserInfo();

Review Comment:
   The idea of @fuweng11 is a good solution. 



-- 
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]

Reply via email to