iachat/app/javascript/dashboard
Shivam Mishra 95463230cb
feat: sign webhooks for API channel and agentbots (#13892)
Account webhooks sign outgoing payloads with HMAC-SHA256, but agent bot
and API inbox webhooks were delivered unsigned. This PR adds the same
signing to both.

Each model gets a dedicated `secret` column rather than reusing the
agent bot's `access_token` (for API auth back into Chatwoot) or the API
inbox's `hmac_token` (for inbound contact identity verification). These
serve different trust boundaries and shouldn't be coupled — rotating a
signing secret shouldn't invalidate API access or contact verification.

The existing `Webhooks::Trigger` already signs when a secret is present,
so the backend change is just passing `secret:` through to the jobs.
Shared token logic is extracted into a `WebhookSecretable` concern
included by `Webhook`, `AgentBot`, and `Channel::Api`. The frontend
reuses the existing `AccessToken` component for secret display. Secrets
are admin-only and excluded from enterprise audit logs.

### How to test

Point an agent bot or API inbox webhook URL at a request inspector. Send
a message and verify `X-Chatwoot-Signature` and `X-Chatwoot-Timestamp`
headers are present. Reset the secret from settings and confirm
subsequent deliveries use the new value.

---------

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2026-04-06 15:28:25 +05:30
..
api feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
assets fix(ui): resolve unreadable select options in dark mode (#13207) 2026-03-30 13:05:28 +05:30
components fix: align message trimming with configured maxLength (#13947) 2026-03-31 10:39:54 +05:30
components-next feat: allow zero conversation limit capacity policy (#13964) 2026-04-06 11:39:14 +05:30
composables fix: Add fix to only allow confirmed agents to used in Agent Assingments at Macros/Automations (#13225) 2026-03-11 02:01:53 -07:00
constants feat: Add a priority + created at sort for conversations (#13658) 2026-02-25 18:22:41 -08:00
helper fix(i18n): add zh_TW snooze parser locale (#13822) 2026-03-25 16:54:18 +05:30
i18n feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
mixins feat: allow configuring attachment upload limit (#12835) 2025-11-17 14:03:08 -08:00
modules feat: compose form improvements (#13668) 2026-03-02 18:27:51 +05:30
routes feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
store feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
stores feat: Voice Channel (#11602) 2025-12-19 12:41:33 -08:00
App.vue fix(sentry): syntaxError: No error message (#13954) 2026-03-31 21:09:02 +05:30
featureFlags.js feat: captain custom tools v1 (#13890) 2026-04-02 12:40:11 +05:30