[ 
https://issues.apache.org/jira/browse/CAMEL-27122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18150694#comment-18150694
 ] 

Guillaume Nodet commented on CAMEL-27122:
-----------------------------------------

This issue is being investigated by a coding agent (on behalf of gnodet).

Triage analysis: The oauthProfile producer option is not yet implemented in 
camel-http. The camel-http-base module has an OAuthProfileAwareHttpEndpoint 
interface (since 4.21) for consumer-side validation, but no producer-side 
per-exchange Bearer token injection exists. The fix is bounded: add an 
oauthProfile field to HttpEndpoint, resolve the token via camel-oauth 
OAuthClientAuthenticationFactory for each exchange, and inject it as an 
Authorization: Bearer header while respecting the existing redirect token-leak 
protection. Single-PR scope.

_Note: This comment was generated by an AI coding agent and requires manual 
verification._

> camel-http - oauthProfile option: send the bearer token of a camel-oauth 
> profile, resolved for each exchange
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27122
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27122
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-http
>            Reporter: Federico Mariani
>            Assignee: Guillaume Nodet
>            Priority: Major
>              Labels: oauth, security
>
> Add an {{oauthProfile}} producer option to camel-http: the name of a 
> camel-oauth profile whose token is sent as {{Authorization: Bearer}} with 
> each request, resolved *for each exchange*.
> Today the {{oauth2*}} options implement the client credentials grant with a 
> client secret inside an HttpClient request interceptor, which has no access 
> to the exchange. Resolving through camel-oauth for each exchange makes every 
> grant of the profiles available to HTTP calls:
> * a token exchange profile acts on behalf of the user whose validated token 
> the exchange carries (an MCP tool route, a {{platform-http}} route);
> * an assertion profile sends the workload JWT-SVID to another workload;
> * client credentials with a SPIFFE client assertion instead of a secret.
> {noformat}
> - to:
>     uri: https://api.example.com/api/my-sessions
>     parameters:
>       oauthProfile: on-behalf-of-user
> {noformat}
> The option must keep the guarantees the {{oauth2*}} options have: the token 
> only goes to the endpoint's own authority, including on redirects 
> ({{HttpOAuth2RedirectTokenLeakTest}}).
> _Claude Code on behalf of Federico Mariani_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to