senthh commented on PR #3863: URL: https://github.com/apache/celeborn/pull/3863#issuecomment-6117891275
Good point — thanks. Addressed. - Added `HttpAuthUtils.BASIC_AUTH_REALM = "Celeborn"` and a `challengeHeaderValue(scheme)` helper that emits `Basic realm="Celeborn"` for BASIC (RFC 7617) and the bare token for other schemes. - The new no-Authorization-header challenge path now uses it (one `WWW-Authenticate` per registered scheme, Basic with realm). - Also updated the pre-existing bare challenge in `BasicAuthenticationHandler.authenticate()` (when decoded credentials are incomplete) to use the same realm, so both paths are consistent, as you suggested. - Added regression tests (in `ApiBaseResourceAuthenticationSuite`): no-Authorization-header request → 401 with `Basic realm="Celeborn"` and `BEARER` challenges; and an unmatched-scheme header → stays 401. All new code passes `spotless:check` and `service` test-compile. Pushed to the PR branch. -- 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]
