Skip to content

fix(webhook): verify Juniper Mist v2 signatures - #77569

Open
robb404 wants to merge 1 commit into
NousResearch:mainfrom
robb404:fix/mist-webhook-signature-v2
Open

robb404 wants to merge 1 commit into
NousResearch:mainfrom
robb404:fix/mist-webhook-signature-v2

Conversation

@robb404

@robb404 robb404 commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • accept Juniper Mist X-Mist-Signature-v2 webhook signatures
  • verify the documented raw-body HMAC-SHA256 hex digest with constant-time comparison
  • add positive and tampered-body regression coverage

Problem

Mist signs webhook bodies with X-Mist-Signature-v2, but the generic webhook adapter did not recognize that header, so correctly signed Mist deliveries were rejected with HTTP 401.

Test plan

  • RED: valid Mist v2 signature returned 401 before implementation
  • tests/gateway/test_webhook_signature_rate_limit.py — 3 passed
  • webhook-focused suite — 65 passed before the additional tamper regression
  • Ruff check passes for both changed files
  • Live provider acceptance: Mist ping traversed Cloudflare Access and Hermes and returned HTTP 200; tampered local body returned 401

No signature secrets or environment-specific configuration are included.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/webhook Webhook / API server sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/webhook Webhook / API server sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants