How to verify RFC 9421 signatures on incoming freight webhooks
Verify the partner’s documented signing profile before processing a notification. A signature only covers the components selected by that profile. It does not replace TLS or establish that a shipment event belongs to the right account.
Apply both signature and business checks.
RFC 9421 defines how to sign selected HTTP message components. Agree on the trusted signer keys, required coverage and freshness policy. Where the profile uses a signed content digest, verify that it matches the received body. Then validate account scope and the event contract before updating any business record.
The same valid event arrives twice.
In a synthetic callback, both deliveries arrive with valid signatures. Signature verification establishes only that the required cryptographic checks passed for those messages. The receiver still reconciles the event identity and applies its deduplication policy so one arrival does not update the shipment twice.
Fail closed before changing shipment status.
- Check a valid signature, a changed signed field and missing required coverage with authorised test fixtures.
- Test an expired or untrusted signature and preserve safe diagnostic metadata only.
- Keep cryptographic verification, authorisation and business acceptance as independent outcomes.