You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JwtAuthFilter: switch to eager 401 on missing/invalid token, opt-out via @PermitAll #4901
common/auth/src/main/scala/org/apache/texera/auth/JwtAuthFilter.scala silently passes through any request whose Authorization: Bearer … header is missing or whose token fails verification. No SecurityContext is set; the request continues to the resource method.
This drifts from the toastshaman-based path (amber/.../web/auth/JwtAuth.scala), which returns 401 immediately from the filter with a WWW-Authenticate: Bearer realm="…" challenge. RFC 6750 §3 also expects an explicit Bearer challenge, with error="invalid_token" distinguishing "your token is bad" from "you didn't authenticate at all".
The lazy-401 path also obscures the failure mode in logs (no warning is emitted on missing header), and routes auth signaling through Dropwizard's @Auth parameter binder rather than the filter itself, so invalid-token attempts are not surfaced server-side.
How to reproduce?
Start any microservice (e.g. access-control-service).
curl -i http://localhost:<port>/api/<auth-protected-endpoint> (no Authorization header).
Observe: the request reaches the filter (JwtAuthFilter.filter called), but no WWW-Authenticate header is set on the response and the 401 (if any) only comes from @Auth injection — not from the filter.
Observe: the filter logs Invalid JWT: Unable to parse token and continues without aborting; the eventual 401 (again from @Auth injection) lacks WWW-Authenticate.
Activity
fix(auth): JwtAuthFilter eager-401 with @permitAll opt-out
fix(auth): JwtAuthFilter eager-401 with @permitAll opt-out (#4903)
Yicong-Huang commentedon May 11, 2026
To fix with frontend change on config service.
feat(config-service): split /config/pre-login from authenticated endp…
fix(frontend): handle 401 by clearing session, skip sending expired J…
fix(frontend): handle 401 by clearing session, skip sending expired J…
fix(auth): make JwtAuthFilter eager-401 with @permitAll opt-out (#5404)
fix(auth): make JwtAuthFilter eager-401 with @permitAll opt-out (#5404)
fix(auth): JwtAuthFilter eager-401 with @permitAll opt-out (apache#4903)
feat(config-service): split /config/pre-login from authenticated endp…
fix(frontend): handle 401 by clearing session, skip sending expired J…
fix(auth): make JwtAuthFilter eager-401 with @permitAll opt-out (apac…