oscerd opened a new pull request, #25575:
URL: https://github.com/apache/camel/pull/25575

   Backport of #25567 (`a3a98e4c959f`) to `camel-4.22.x`. Fixes 
[CAMEL-24411](https://issues.apache.org/jira/browse/CAMEL-24411) on this 
release line.
   
   ## What it fixes
   
   The camel-oauth processors returned normally from `process()` on the paths 
where they do **not** authenticate the caller, so the rest of the route still 
ran — and overwrote the response the processor had just prepared. Three denial 
points were affected: a missing or unparseable `Authorization` header, the 
code-flow redirect to the IdP, and a callback without the `code` parameter. 
There was no `setRouteStop`, `CamelAuthorizationException` or `RoutePolicy` 
anywhere in camel-oauth `src/main`.
   
   Now all three reject and stop the route; the bearer path answers `401` with 
a `WWW-Authenticate: Bearer` challenge (RFC 6750) instead of `400`. 
`sendRedirect()` and `OAuthLogoutProcessor` are unchanged, so the shipped 
logout flow that relies on the step after the redirect still works. 
Authenticated requests are unaffected.
   
   ## Deliberate differences from the main commit
   
   1. **No upgrade-guide entry.** It stays on `main`; a doc-sync entry for this 
release line will be added to the matching `camel-4x-upgrade-guide` file there, 
per the project's guide policy.
   2. **JUnit assertions instead of AssertJ.** `camel-oauth` has no 
`assertj-core` on this branch (nor on any maintenance branch — it was added to 
the pom on main). Rather than introduce a test dependency in a patch release, 
`OAuthProcessorFailClosedTest` uses JUnit assertions here and `pom.xml` is 
untouched.
   
   ## Verification on this branch
   
   ```
   mvn -pl components/camel-oauth -am install -DskipTests   # OK
   mvn test -Dtest=OAuthProcessorFailClosedTest             # 3 passed
   ```
   
   Diff is 5 files, camel-oauth only — no generated-file drift.
   
   ---
   _Claude Code on behalf of 


-- 
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]

Reply via email to