chatwoot/app/javascript/dashboard/api
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
..
captain feat: captain custom tools v1 (#13890) 2026-04-02 12:40:11 +05:30
channel
enterprise
helpCenter feat(help-center): enable drag-and-drop category reordering (#13706) 2026-03-05 12:53:38 +05:30
inbox
integrations feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
specs feat(help-center): enable drag-and-drop category reordering (#13706) 2026-03-05 12:53:38 +05:30
account.js
accountActions.js
agentBots.js feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
agentCapacityPolicies.js
agents.js
ApiClient.js
assignableAgents.js
assignmentPolicies.js
attributes.js
auditLogs.js
auth.js
automation.js
bulkActions.js
CacheEnabledApiClient.js
campaigns.js
cannedResponse.js
changelog.js
channels.js
companies.js
contactNotes.js
contacts.js feat: compose form improvements (#13668) 2026-03-02 18:27:51 +05:30
conversations.js
csatReports.js
customRole.js
customViews.js
dashboardApps.js
endPoints.js
inboxes.js feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
inboxHealth.js feat(whatsapp): add webhook registration and status endpoints (#13551) 2026-03-16 12:48:16 +05:30
inboxMembers.js
integrations.js
labels.js
liveReports.js
macros.js
mfa.js
notifications.js
notificationSubscription.js
notion_auth.js
reports.js feat: Add conversations summary CSV export (#13110) 2026-01-13 12:30:26 +04:00
samlSettings.js
search.js feat: Advanced Search Backend (#12917) 2026-01-07 15:30:49 +05:30
sla.js
slaReports.js
summaryReports.js
teams.js
userNotificationSettings.js
webhooks.js
yearInReview.js