Octavi00 commented on code in PR #11812:
URL: https://github.com/apache/gravitino/pull/11812#discussion_r3576138235
##########
server-common/src/main/java/org/apache/gravitino/server/authentication/AuthenticationFilter.java:
##########
@@ -41,15 +41,21 @@
import org.apache.gravitino.utils.PrincipalUtils;
public class AuthenticationFilter implements Filter {
-
- private final List<Authenticator> filterAuthenticators;
+ private static final String WEB_LOGIN_HEADER = "X-Gravitino-Web-Login";
/**
* The matcher used to identify health check paths that bypass
authentication. Subclasses may
* replace this with a server-specific matcher (e.g. {@code
IcebergHealthCheckPathMatcher}).
*/
protected HealthCheckPathMatcher healthCheckMatcher = new
HealthCheckPathMatcher();
+ private final List<Authenticator> filterAuthenticators;
+ // Skip HTTP challenge for Web UI login requests to avoid the browser's
native Basic auth popup.
+ private boolean isWebLoginRequest(ServletRequest request) {
+ return request instanceof HttpServletRequest
+ && "true".equalsIgnoreCase(((HttpServletRequest)
request).getHeader(WEB_LOGIN_HEADER));
+ }
+
Review Comment:
Im using isWebLoginRequest, as a way to avoid an unwanted web popup when an
incorrect passsword is entered. Maybe I could add more description to these
changes, but as of right now, removing the addition added to line 117 would
recreate my issue.
<img width="1311" height="953" alt="Image"
src="https://github.com/user-attachments/assets/71ec65a8-0d1b-411e-b664-39e65605b962"
/>
--
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]