Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook signatures #340

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

petekeen-cf
Copy link

Implement signatures modeled on Stripe's signature algorithm.

  • New header Security-Signature
  • Header value is a comma-separated list of tag-value pairs
  • Timestamp is tag t
  • Signature version 1 is tag v1
  • Signature algorithm: HMAC256(shared_secret, timestamp + "." + payload)

One signature will be added to the header for every active shared secret.

To validate a given signature, calculate a signature according to the algorithm and use a constant-time comparison against the given signature. Check the timestamp and reject signatures that are too old.

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