gnodet-bot commented on code in PR #30369:
URL: https://github.com/apache/camel/pull/30369#discussion_r4625421076


##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -214,6 +214,16 @@ option from the JAXB data format configured on the 
CamelContext (such as `camel.
 
 The SOAP data format (camel-soap) is built on the JAXB data format, and always 
ignores these headers.
 
+=== camel-google-drive, camel-google-mail - the OAuth access token is sent 
only in the Authorization header
+
+The producers of `google-drive` and `google-mail` no longer copy the 
`accessToken` option onto the request as the
+`access_token` query parameter of the Google API. The access token is sent in 
the `Authorization` header by the OAuth
+credential of the client, as before, so the request URL no longer carries it. 
The other credential options
+(`clientId`, `clientSecret`, `refreshToken`, `serviceAccountKey` and 
`delegate`) are not set on the request either.
+A `CamelGoogleDrive.accessToken` or `CamelGoogleMail.accessToken` header is 
ignored for the same reason; use a
+separate endpoint with its own `accessToken` to call with another token. 
`google-calendar` follows the same rule; its
+requests had no `access_token` parameter.

Review Comment:
   📝 **Nit (doc accuracy):** The claim " `google-calendar` follows the same 
rule; its requests had no `access_token` parameter" is misleading. 
`GoogleCalendarProducer.java` and `GoogleCalendarConsumer.java` had the 
**identical** vulnerable `BeanIntrospection` loop (removed in this PR), and the 
new `GoogleCalendarRequestCredentialTest` explicitly asserts 
`assertFalse(request.getUrl().contains("access_token"))` for both paths — 
proving the token *would have* appeared without the fix.
   
   Suggested wording:
   > `google-calendar` follows the same rule; its producer and consumer also 
carried the `access_token` parameter in the URL prior to this fix.



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -214,6 +214,16 @@ option from the JAXB data format configured on the 
CamelContext (such as `camel.
 
 The SOAP data format (camel-soap) is built on the JAXB data format, and always 
ignores these headers.
 
+=== camel-google-drive, camel-google-mail - the OAuth access token is sent 
only in the Authorization header
+
+The producers of `google-drive` and `google-mail` no longer copy the 
`accessToken` option onto the request as the

Review Comment:
   📝 **Nit (doc accuracy):** The opening sentence says "The producers of 
`google-drive` and `google-mail`" but the fix equally applies to consumers of 
all three components. `GoogleDriveConsumer.java`, `GoogleMailConsumer.java`, 
`GoogleCalendarConsumer.java`, and `GoogleCalendarProducer.java` all received 
the same `BeanIntrospection`→`GoogleApiRequestHelper` refactor.
   
   Suggested wording:
   > The producers and consumers of `google-drive`, `google-mail`, and 
`google-calendar` no longer copy the `accessToken` option onto the request as 
the `access_token` query parameter…



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