Skip to content

Sign the webhook timestamp with the body (1.13.76) - #11

Merged
bensynapse merged 1 commit into
mainfrom
fix/webhook-signature-timestamp
Oct 28, 2026
Merged

bensynapse merged 1 commit into
mainfrom
fix/webhook-signature-timestamp

Conversation

@bensynapse

Copy link
Copy Markdown
Member

Documents the new webhook signature and bumps the spec to 1.13.76. The server side is bensynapse/tennisv1#12.

X-LTAPI-Signature signs the raw body only. A captured delivery still verifies when someone re-sends it later under a fresh X-LTAPI-Timestamp. Deliveries now also carry X-LTAPI-Signature-V1: t=<unix seconds>,v1=<hex>, HMAC-SHA256 over <t>.<raw request body> with the same secret, plus a signed delivery_id in the body.

What changed, all in the webhook part of openapi.yaml plus CHANGELOG.md:

  • The POST /webhooks description documents the V1 header and delivery_id. It lists the receiver checks: a 5-minute window on t and a constant-time compare over the raw bytes. Then a dedupe on delivery_id, and no fallback to the old header.
  • The old header is marked deprecated. It is sent unchanged until 2027-02-01 and dropped from 00:00 UTC that day.
  • The X-LTAPI-Event list gains score_withdrawn, which the server already sends.
  • The events enums match what registration accepts. stoppages is gone from POST /webhooks (registration answers 400 to it), and the Webhook schema gains point and status.
  • docs/*.html, docs/openapi.json and docs/sitemap.xml are regenerated.

PR #10 also bumps the version (to 1.13.75) and touches the same generated files. This one takes 1.13.76. Whichever merges second needs python scripts/build_reference.py run again after the rebase.

Checked locally:

  • npx @redocly/cli@latest lint openapi.yaml: valid
  • python scripts/build_reference.py --check: generated docs are current
  • sh scripts/truthcheck.sh: OK
  • the contract assertions from lint.yml: OK, 48 paths, 49 operations, 66 schemas

X-LTAPI-Signature signs the raw body only, so a captured delivery
verifies again when re-sent under a fresh X-LTAPI-Timestamp. The
POST /webhooks description now documents X-LTAPI-Signature-V1
(t=<unix>,v1=<hex>, HMAC-SHA256 over "<t>.<raw body>") and the signed
delivery_id in each body. It lists the receiver checks and calls the
old header deprecated, dropped from 2027-02-01 00:00 UTC.

The events enums now match what registration accepts: stoppages is
gone from POST /webhooks, and the Webhook schema gains point and
status. Generated pages rebuilt with scripts/build_reference.py.
@bensynapse
bensynapse force-pushed the fix/webhook-signature-timestamp branch from ebda280 to 2bfe9e0 Compare October 28, 2026 04:31
@bensynapse
bensynapse merged commit 99144bb into main Oct 28, 2026
2 checks passed
@bensynapse
bensynapse deleted the fix/webhook-signature-timestamp branch October 28, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant