developmentseed / jekyll-hook

No Longer Maintained | A server that listens for GitHub webhook posts and renders a Jekyll site
BSD 3-Clause "New" or "Revised" License
508 stars 83 forks source link

Add the ability to validate the X-Hub-Signature header #12

Closed Phillipmartin closed 10 years ago

Phillipmartin commented 10 years ago

Github sends an X-Hub-Signature header that is a SHA1 HMAC in it's webhooks when you configure a shared secret. This adds the ability configure a shared secret in config.json and validate incoming requests using that secret.

Because rawBody is gone, this depends on a the verify button in connect which was added in ~7 months ago (https://github.com/senchalabs/connect/pull/934/files) and so should be fairly available at this point.