Why it matters
Different keys for webhook verify vs outbound API calls.
Practical steps
- Threat-model sec key separation: spoofed webhooks, leaked tokens, and confused-deputy admin actions.
- Implement different keys for webhook verify vs outbound API calls with constant-time compares where secrets are involved.
- Never log raw tokens, signing secrets, or full payment payloads.
- Add unit tests that prove forgeries fail closed for sec key separation.
- Document rotation and incident steps for sec key separation in the security runbook.
Watch out for
- Copy-pasting outdated snippets for sec key separation without re-reading current official docs.
- Shipping sec key separation to production without a staging rehearsal and a documented rollback.