Signature Scheme Identification
Determine how the sender signs a delivery and which header carries the result, because every later test depends on knowing exactly what the verifier is supposed to check
Use when: an inbound endpoint receives deliveries and the signing scheme or signature header has not been confirmed from a real delivery
Avoid when: the provider documents the scheme and a captured delivery confirms the header and format match
Procedure
- Capture one delivery from the provider's own testing facility and record the complete header set verbatim, without altering the body.
- Identify the header carrying the signature and its format: bare hex, base64, a prefixed value, or a list of attributes.
- Read the provider documentation for what bytes are signed: body only, timestamp plus body, method and path plus body, or a subset of fields.
- Determine whether the scheme is symmetric (shared secret) or asymmetric (provider key pair), since the failure modes differ completely.
- Note whether the signature is versioned or carries an algorithm field, because versioned schemes change what the canonical string contains.
- Write a one-paragraph scheme statement naming header, format, signed bytes and key type, and keep it beside the evidence.
Signals
- The signature header name is not mentioned anywhere in the receiver code
- A captured delivery carries several candidate headers and only one is checked
- The signed byte set described in documentation differs from what the handler computes
- The signature value carries a version or algorithm segment the handler ignores
Patterns
1. Scheme statement
header: stripe-signature
format: t=<timestamp>,v1=<hex hmac>
signed bytes: <timestamp>.<raw body>
key: shared secret (symmetric)
2. Header candidates
common names: stripe-signature, x-hub-signature-256, x-signature, x-webhook-signature, authorization bearer when no dedicated header exists
3. Signed-byte question
ask three things: does it include the timestamp, does it include method and path, does it cover the raw bytes or a re-encoded form of them
Pitfalls
- Reading a scheme from a blog post instead of from a delivery your own environment received
- Assuming the body alone is signed when the timestamp is part of the signed string
- Ignoring an algorithm or version field, which is exactly where scheme confusion lives
Done when
- A scheme statement names the header, value format, signed bytes and key type
- The statement is backed by a captured delivery from the provider's own testing facility
References
1---2name: signature-scheme-identification3description: "Determine how the sender signs a delivery and which header carries the result, because every later test depends on knowing exactly what the verifier is supposed to check. Use when an inbound endpoint receives deliveries and the signing scheme or signature header has not been confirmed from a real delivery"4pack: hookproof5version: 1.0.06category: webhook-tooling7tags: [identify, signature, scheme]8metadata:9 source: https://skillmd.com/skills/wsh7ash/signature-scheme-identification10---1112# Signature Scheme Identification1314> Determine how the sender signs a delivery and which header carries the result, because every later test depends on knowing exactly what the verifier is supposed to check1516**Use when:** an inbound endpoint receives deliveries and the signing scheme or signature header has not been confirmed from a real delivery1718**Avoid when:** the provider documents the scheme and a captured delivery confirms the header and format match1920## Procedure21221. Capture one delivery from the provider's own testing facility and record the complete header set verbatim, without altering the body.232. Identify the header carrying the signature and its format: bare hex, base64, a prefixed value, or a list of attributes.243. Read the provider documentation for what bytes are signed: body only, timestamp plus body, method and path plus body, or a subset of fields.254. Determine whether the scheme is symmetric (shared secret) or asymmetric (provider key pair), since the failure modes differ completely.265. Note whether the signature is versioned or carries an algorithm field, because versioned schemes change what the canonical string contains.276. Write a one-paragraph scheme statement naming header, format, signed bytes and key type, and keep it beside the evidence.2829## Signals3031- The signature header name is not mentioned anywhere in the receiver code32- A captured delivery carries several candidate headers and only one is checked33- The signed byte set described in documentation differs from what the handler computes34- The signature value carries a version or algorithm segment the handler ignores3536## Patterns3738**1. Scheme statement**3940```text41header: stripe-signature42format: t=<timestamp>,v1=<hex hmac>43signed bytes: <timestamp>.<raw body>44key: shared secret (symmetric)45```4647**2. Header candidates**4849```text50common names: stripe-signature, x-hub-signature-256, x-signature, x-webhook-signature, authorization bearer when no dedicated header exists51```5253**3. Signed-byte question**5455```text56ask three things: does it include the timestamp, does it include method and path, does it cover the raw bytes or a re-encoded form of them57```5859## Pitfalls6061- Reading a scheme from a blog post instead of from a delivery your own environment received62- Assuming the body alone is signed when the timestamp is part of the signed string63- Ignoring an algorithm or version field, which is exactly where scheme confusion lives6465## Done when6667- A scheme statement names the header, value format, signed bytes and key type68- The statement is backed by a captured delivery from the provider's own testing facility6970## References7172- [Stripe - Signature verification](https://docs.stripe.com/webhooks/signature)73- [GitHub - Validating webhook deliveries](https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries)