Skip to content

[CELEBORN-2559] Require completed HTTP authentication before dispatching requests - #3977

Open
zaynt4606 wants to merge 1 commit into
apache:mainfrom
zaynt4606:require-http-authentication-completion
Open

zaynt4606 wants to merge 1 commit into
apache:mainfrom
zaynt4606:require-http-authentication-completion

Conversation

@zaynt4606

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Honor the completion result of AuthenticationHandler.authenticate before delegating HTTP requests. When a handler returns no user, preserve its response until authentication completes.

Add filter coverage for incomplete Basic credentials and pending Negotiate responses, together with Master and Worker HTTP resource regressions. Keep successful authentication, explicitly configured anonymous providers and configured bypass paths working as before.

Why are the changes needed?

https://issues.apache.org/jira/browse/CELEBORN-2559

The handler contract allows an authentication mechanism to own the response while authentication is incomplete. The filter should wait for an authenticated user before dispatching the request and preserve the handler status and WWW-Authenticate challenge.

Does this PR resolve a correctness bug?

  • Yes

Does this PR introduce any user-facing change?

  • Yes

Requests with incomplete authentication retain the handler response rather than entering application processing. No configuration change is required.

How was this patch tested?

Validated with JDK 17 and Maven 3.9.16:

  • 39 tests passed: 15 service filter/handler tests, 12 Master HTTP tests and 12 Worker HTTP tests.
  • The new filter regressions and Master HTTP regression fail on the original implementation and pass with the fix.
  • Handler tests cover pending Negotiate responses; local Master/Worker HTTP tests cover Basic/Bearer authentication, challenges, bypass paths and administrator checks.
  • dev/reformat passed all 16 configured invocations.
build/mvn test -pl worker -am -Dtest=none \
  -DwildcardSuites=org.apache.celeborn.server.common.http.authentication.AuthenticationFilterSuite,org.apache.celeborn.server.common.http.authentication.AuthenticationHandlerSuite,org.apache.celeborn.service.deploy.master.ApiMasterResourceAuthenticationSuite,org.apache.celeborn.service.deploy.worker.storage.ApiWorkerResourceAuthenticationSuite

dev/reformat

…ing requests

Honor the AuthenticationHandler completion contract before dispatching HTTP requests, and preserve responses while authentication is pending.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-6
AI-Contributed/Feature: 8/8
AI-Contributed/UT: 197/197
@github-actions github-actions Bot added correctness Correctness bugfix module:service labels Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant