Inbound Token Intercept
Every cron and webhook endpoint under /api/public/hooks/* enforces a server-side gate before any database row mutates. Cron callers must present a CRON_SECRET via x-cron-secret; webhook callers must present a HMAC signature verified with timing-safe compare. The browser-bundled anon / publishable key is never used as an authorization gate.
- • Kandji webhook: HMAC-SHA256 verified, UNIQUE(org, event_id) dedupe, ±5-minute occurred_at skew window.
- • Jira webhook: HMAC-signed Forge widget → /api/public/hooks/jira-impact.
- • Replay protection: unique index on (provider, external_id) in idp_webhook_events.
