[
https://issues.apache.org/jira/browse/CAMEL-25564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18127437#comment-18127437
]
Andrea Cosentino commented on CAMEL-25564:
------------------------------------------
Downstream test updates for the new webhook secret token check:
* camel-spring-boot: https://github.com/apache/camel-spring-boot/pull/2029
(merged), TelegramWebhookCallTest sends the header.
* camel-quarkus (camel-main): https://github.com/apache/camel-quarkus/pull/9317
(draft), waits for the next camel-main regen.
_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)