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

   ## Summary
   
   CAMEL-27575: the endpoint resolved the token of `oauthProfile` once at 
startup and stored it as `apiKey`, so the IBM Cloud SDK `IamAuthenticator` 
posted it to IAM as an API key, which IAM rejects, and the token was never 
renewed. Same defect as CAMEL-27570 in camel-ibm-watsonx-ai (see also 
CAMEL-27125 for the other AI components).
   
   - A new `OAuthProfileAuthenticator` (an IBM Cloud `sdk-core` 
`Authenticator`) asks camel-oauth for the token on every request (camel-oauth 
caches it until it expires) and sends `Authorization: Bearer`.
   - The endpoint fails at startup when the profile gives no token. A client 
created before startup also uses the profile.
   - `apiKey` works as before and is no longer marked required. Docs, 
catalog/DSL and a 4.24 upgrade-guide entry are updated.
   
   ## Tests
   
   - `WatsonxDataOAuthTest` against a fake HTTP server: the token is sent as 
Bearer, a renewed token is used on the next request, the profile is asked on 
every request, no IAM authenticator is used, startup fails without a token. 
Module tests: 26, 0 failures.
   - Not tested against a live watsonx.data instance (none available).
   
   ## Notes
   
   - Expect a small conflict with the camel-ibm-watsonx-ai PR (CAMEL-27570 and 
others) in the 4.24 upgrade guide.
   


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