[
https://issues.apache.org/jira/browse/CAMEL-25564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126719#comment-18126719
]
Andrea Cosentino commented on CAMEL-25564:
------------------------------------------
Merged on main for 4.24.0 with https://github.com/apache/camel/pull/27716
(60104cd3a195).
Backports:
* camel-4.22.x (4.22.2): https://github.com/apache/camel/pull/27781
* camel-4.18.x (4.18.6): to follow
On both maintenance branches, the change to the error messages is applied to
the version of TelegramAsyncHandler without CAMEL-25577, which is on main only.
_Claude Code on behalf of oscerd_
> camel-telegram - verify the Bot API secret token on webhook updates
> -------------------------------------------------------------------
>
> Key: CAMEL-25564
> URL: https://issues.apache.org/jira/browse/CAMEL-25564
> Project: Camel
> Issue Type: Improvement
> Components: camel-telegram
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.18.6, 4.22.2, 4.24.0
>
>
> In webhook mode, camel-telegram registers the webhook by calling
> {{setWebhook}} with the {{url}} parameter only. The Bot API's {{setWebhook}}
> also accepts a {{secret_token}} parameter, which Telegram sends back in the
> {{X-Telegram-Bot-Api-Secret-Token}} header of every webhook request.
> Add support for it:
> * add an endpoint option for the secret token, with a default derived from
> the bot token, so the value stays the same across restarts and replicas;
> * pass the token to {{setWebhook}} when the webhook is registered;
> * in {{TelegramWebhookProcessor}}, answer a request whose header does not
> match with HTTP 403, without passing it to the route;
> * document the option in the webhook mode section, and add an upgrade-guide
> note for deployments that register the webhook themselves
> ({{webhookAutoRegister=false}}).
> This mirrors the inbound webhook verification of camel-clickup and the
> {{webhookSecret}} option of camel-whatsapp.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)