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

Status of dj/webhook-signatures? #24

Open
lukemelia opened this issue Dec 7, 2020 · 3 comments
Open

Status of dj/webhook-signatures? #24

lukemelia opened this issue Dec 7, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@lukemelia
Copy link

I'm working on a project with this SDK and would like to verify webhook signatures. I was considering implementing signature verification per your spec, and submitting a pull request, but I came across the branch "dj/webhook-signatures", in which it looks like this was done last year but has not been merged. What is the status of this branch and is there something we can do to help it over the finish line?

@dylanjha
Copy link
Contributor

dylanjha commented Dec 7, 2020

Thanks for bringing this up @lukemelia . Indeed the code was written, but there's one more step before we can get this changes in. This SDK, along with a few others are actually generated based on our open API spec.

There's currently no way that this kind of signature verification code can be auto-generated so we will have to revisit the code that repo that does code-generation (currently closed source) and update the toolchain there to have the capability of pulling in non-autogenerated code in order to add this functionality.

It's definitely on our roadmap and something we want to address, but I don't have an exact timeline.

@philcluff philcluff added the enhancement New feature or request label Mar 4, 2022
@Nodalailama
Copy link

Hi,

If someone need to implement this, take a look at https://s-moyashi.com/2022/02/23/mux-com-verify-webhook-signatures-case-ruby

Best regards,

@matthewlein
Copy link

For anyone that needs to implement that, you can copy that branch's code from https://github.com/muxinc/mux-ruby/blob/69a8a5fd4979851366324e19517321a8341b2aed/lib/mux_ruby/models/webhook.rb

and then in your webhook controller (assuming rails)

valid = RubyMux::Webhook.verify_header(request.raw_post, request.headers['Mux-Signature'], your_secret)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants