You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "aditya-gupta36 (via GitHub)" <gi...@apache.org> on 2025/07/07 13:40:00 UTC

[PR] Atlas[Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

aditya-gupta36 opened a new pull request, #397:
URL: https://github.com/apache/atlas/pull/397

   ## What changes were proposed in this pull request?
   
   ## How was this patch tested?


-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas-5063: [Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "pareshddevalia (via GitHub)" <gi...@apache.org>.
pareshddevalia commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2218244878


##########
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java:
##########
@@ -163,17 +171,12 @@ public void init(FilterConfig filterConfig) throws ServletException {
      */
     @Override
     public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+        setSsoEnabled(false);
         HttpServletResponse         httpResponse    = (HttpServletResponse) servletResponse;

Review Comment:
   Duplciate httpsResponse in doFilter function



##########
webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java:
##########
@@ -1098,6 +1101,14 @@ public Response serviceReadiness() throws AtlasBaseException {
         }
     }
 
+    @GET
+    @Path("/checksso")
+    @Produces(MediaType.TEXT_PLAIN)
+    public String checkSSO() {
+        LOG.debug("SSO Details: {}", atlasKnoxSSOAuthenticationFilter.isSsoEnabled());

Review Comment:
   You're directly injecting the AtlasKnoxSSOAuthenticationFilter into AdminResource. As filters are servlet-managed rather than Spring-managed 
   
   Suggestion:
   If you want to track SSO across requests or sessions, consider storing the flag: In HttpSession



##########
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java:
##########
@@ -187,12 +190,6 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
             return;
         }
 
-        if (jwtProperties == null || isAuthenticated()) {
-            filterChain.doFilter(servletRequest, servletResponse);
-
-            return;
-        }
-
         if (LOG.isDebugEnabled()) {

Review Comment:
   Remove this if (LOG.isDebugEnabled()) { condition, This check avoids the overhead of the debug message



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas-5063: [Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "pareshddevalia (via GitHub)" <gi...@apache.org>.
pareshddevalia commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2218399019


##########
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java:
##########
@@ -163,17 +171,12 @@ public void init(FilterConfig filterConfig) throws ServletException {
      */
     @Override
     public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+        setSsoEnabled(false);
         HttpServletResponse         httpResponse    = (HttpServletResponse) servletResponse;
         AtlasResponseRequestWrapper responseWrapper = new AtlasResponseRequestWrapper(httpResponse);
 
         HeadersUtil.setSecurityHeaders(responseWrapper);
 
-        if (!ssoEnabled) {
-            filterChain.doFilter(servletRequest, servletResponse);
-
-            return;
-        }
-
         HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
 
         if (LOG.isDebugEnabled()) {

Review Comment:
   remove if (LOG.isDebugEnabled()) { condition



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas-5063: [Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "aditya-gupta36 (via GitHub)" <gi...@apache.org>.
aditya-gupta36 commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2241609598


##########
webapp/src/test/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilterTest.java:
##########
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.atlas.web.filters;
+
+import org.apache.atlas.web.resources.AdminResource;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.mock.web.MockHttpSession;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import java.io.IOException;
+import java.util.Arrays;
+
+import static org.mockito.Mockito.verify;
+import static org.testng.Assert.*;

Review Comment:
   Okay, got it, have fixed this wrt: "checkstyle.xml"



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas-5063: [Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "chaitalicod (via GitHub)" <gi...@apache.org>.
chaitalicod commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2241583869


##########
webapp/src/test/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilterTest.java:
##########
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.atlas.web.filters;
+
+import org.apache.atlas.web.resources.AdminResource;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.mock.web.MockHttpSession;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import java.io.IOException;
+import java.util.Arrays;
+
+import static org.mockito.Mockito.verify;
+import static org.testng.Assert.*;

Review Comment:
   Check if you really need Assert.* if not avoid using * in import



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas-5063: [Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "aditya-gupta36 (via GitHub)" <gi...@apache.org>.
aditya-gupta36 commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2218926704


##########
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java:
##########
@@ -163,17 +171,12 @@ public void init(FilterConfig filterConfig) throws ServletException {
      */
     @Override
     public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+        setSsoEnabled(false);
         HttpServletResponse         httpResponse    = (HttpServletResponse) servletResponse;
         AtlasResponseRequestWrapper responseWrapper = new AtlasResponseRequestWrapper(httpResponse);
 
         HeadersUtil.setSecurityHeaders(responseWrapper);
 
-        if (!ssoEnabled) {
-            filterChain.doFilter(servletRequest, servletResponse);
-
-            return;
-        }
-
         HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
 
         if (LOG.isDebugEnabled()) {

Review Comment:
   Removed



##########
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java:
##########
@@ -187,12 +190,6 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
             return;
         }
 
-        if (jwtProperties == null || isAuthenticated()) {
-            filterChain.doFilter(servletRequest, servletResponse);
-
-            return;
-        }
-
         if (LOG.isDebugEnabled()) {

Review Comment:
   Removed



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas-5063: [Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "aditya-gupta36 (via GitHub)" <gi...@apache.org>.
aditya-gupta36 commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2218932093


##########
webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java:
##########
@@ -1098,6 +1101,14 @@ public Response serviceReadiness() throws AtlasBaseException {
         }
     }
 
+    @GET
+    @Path("/checksso")
+    @Produces(MediaType.TEXT_PLAIN)
+    public String checkSSO() {
+        LOG.debug("SSO Details: {}", atlasKnoxSSOAuthenticationFilter.isSsoEnabled());

Review Comment:
   Correct, we can store the attribute in httpRequest itslef.



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas-5063: [Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "aditya-gupta36 (via GitHub)" <gi...@apache.org>.
aditya-gupta36 commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2218929184


##########
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java:
##########
@@ -163,17 +171,12 @@ public void init(FilterConfig filterConfig) throws ServletException {
      */
     @Override
     public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+        setSsoEnabled(false);
         HttpServletResponse         httpResponse    = (HttpServletResponse) servletResponse;

Review Comment:
   optimised the duplicate HTTPResponse Object



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas-5063: [Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "aditya-gupta36 (via GitHub)" <gi...@apache.org>.
aditya-gupta36 commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2241609598


##########
webapp/src/test/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilterTest.java:
##########
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.atlas.web.filters;
+
+import org.apache.atlas.web.resources.AdminResource;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.mock.web.MockHttpSession;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import java.io.IOException;
+import java.util.Arrays;
+
+import static org.mockito.Mockito.verify;
+import static org.testng.Assert.*;

Review Comment:
   We need this: [ import static org.testng.Assert.*; ]
   
   Since it uses testng functions



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Atlas[Backend] Fix for improving logout mechanism in Atlas Backend code base [atlas]

Posted by "pareshddevalia (via GitHub)" <gi...@apache.org>.
pareshddevalia commented on code in PR #397:
URL: https://github.com/apache/atlas/pull/397#discussion_r2192884767


##########
webapp/src/main/java/org/apache/atlas/web/security/CustomLogoutSuccessHandler.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.atlas.web.security;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
+import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
+import org.springframework.stereotype.Component;
+
+import javax.inject.Inject;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+@Component
+public class CustomLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler implements LogoutSuccessHandler {
+    private final ObjectMapper mapper;
+    private static final Logger LOG = LoggerFactory.getLogger(CustomLogoutSuccessHandler.class);
+
+    @Inject
+    public CustomLogoutSuccessHandler(ObjectMapper mapper) {
+        this.mapper = mapper;
+    }
+
+    @Override
+    public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) {
+        request.getServletContext().removeAttribute(request.getRequestedSessionId());
+        response.setContentType("application/json;charset=UTF-8");

Review Comment:
   Try to get the header from HeadersUtil.class



##########
webapp/src/main/java/org/apache/atlas/web/security/CustomLogoutSuccessHandler.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.atlas.web.security;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
+import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
+import org.springframework.stereotype.Component;
+
+import javax.inject.Inject;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+@Component
+public class CustomLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler implements LogoutSuccessHandler {
+    private final ObjectMapper mapper;
+    private static final Logger LOG = LoggerFactory.getLogger(CustomLogoutSuccessHandler.class);
+
+    @Inject
+    public CustomLogoutSuccessHandler(ObjectMapper mapper) {
+        this.mapper = mapper;
+    }
+
+    @Override
+    public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) {
+        request.getServletContext().removeAttribute(request.getRequestedSessionId());
+        response.setContentType("application/json;charset=UTF-8");
+        response.setHeader("Cache-Control", "no-cache");
+        response.setHeader("X-Frame-Options", "DENY");
+
+        try {
+            Map<String, Object> responseMap = new HashMap<>();
+            responseMap.put("statusCode", HttpServletResponse.SC_OK);
+            responseMap.put("msgDesc", "Logout Successful");
+            String jsonStr = mapper.writeValueAsString(responseMap);
+
+            response.setStatus(HttpServletResponse.SC_OK);
+            response.getWriter().write(jsonStr);
+            LOG.info("Log-out Successfully done. Returning Json : " + jsonStr);

Review Comment:
   Avoid logging at INFO for regular logout, use DEBUG



##########
webapp/src/main/java/org/apache/atlas/web/filters/RestUtil.java:
##########
@@ -30,7 +30,7 @@ public class RestUtil {
     private static final Logger LOG = LoggerFactory.getLogger(RestUtil.class);
 
     public static final  String TIMEOUT_ACTION = "timeout";
-    public static final  String LOGOUT_URL     = "/logout.html";
+    public static final String LOGOUT_URL = "/logout";

Review Comment:
   Check the inconsistent spacing and alignment 



##########
webapp/src/test/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilterTest.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.atlas.web.filters;
+
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.mock.web.MockHttpSession;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+
+import java.io.IOException;
+import java.util.Arrays;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
+
+public class AtlasKnoxSSOAuthenticationFilterTest {
+    @Mock
+    private FilterChain filterChain;
+
+    @InjectMocks
+    private AtlasKnoxSSOAuthenticationFilter filter;
+
+    private MockHttpServletRequest request;
+    private MockHttpServletResponse response;
+    private MockHttpSession session;
+
+    @BeforeMethod
+    public void testSetup() {
+        MockitoAnnotations.openMocks(this);  // Required for @Mock
+
+        request = new MockHttpServletRequest();
+        response = new MockHttpServletResponse();
+        session = new MockHttpSession();
+        request.setSession(session);
+
+        request.setRequestURI("/api/atlas/admin/checksso");
+        request.addHeader("User-Agent", "Chrome");
+    }
+

Review Comment:
   Add Test for /admin/checksso API



##########
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java:
##########
@@ -163,17 +171,12 @@ public void init(FilterConfig filterConfig) throws ServletException {
      */
     @Override
     public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+        setSsoEnabled(false);

Review Comment:
   private boolean ssoEnabled in a singleton filter is not thread-safe.
   Consider storing ssoEnabled as a request attribute instead, to ensure thread safety across concurrent requests.



-- 
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: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org