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

   [CAMEL-25994](https://issues.apache.org/jira/browse/CAMEL-25994)
   
   `CamelWebSocketHandler` records, for each WebSocket connection, which 
endpoints of the path the handshake was checked against: the security provider, 
the allowed roles and the custom handlers of a consumer are kept per endpoint 
URI. The result of the `oauthProfile` validation was kept without the endpoint 
that did the validation, so the later checks of an open connection only saw 
that *some* OAuth validation had happened.
   
   Changes:
   
   - The handshake result also records the endpoints whose OAuth profile 
validated the connection.
   - `isAuthenticated` requires the OAuth validation of the endpoint whose 
settings currently apply to the path. Open connections are already checked on 
every message and before every send, so a connection validated by another 
endpoint is no longer sent messages, and is closed with 1008 when it sends.
   - New test `UndertowWsOAuthProfileConsumerChangeTest`: a producer route 
keeps the path registered while the consumer is replaced by one with another 
OAuth profile. It fails without the change.
   
   Notes:
   
   - #28237 (CAMEL-25917) changes the same class and closes peers that no 
longer pass the checks as soon as a consumer is set. The two fit together; 
whichever merges second needs a small rebase.
   - The same code is on `camel-4.22.x` (WebSocket `oauthProfile` came in 
4.21), so this should be backported there. `camel-4.18.x` does not have it.
   
   Tests: `mvn verify` in `components/camel-undertow` passes locally (236 
tests, 1 skipped).
   
   _Claude Code on behalf of @davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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