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

Use JWT gem for Webhook signature validation #71

Merged

Conversation

RemcodM
Copy link
Contributor

@RemcodM RemcodM commented Aug 10, 2023

Fixes #70

At this moment, the ibanity gem uses the jose gem for JWT signature validation of incoming webhooks.

The jose gem is not compatible with Ruby installations compiled against OpenSSL 3, e.g. potatosalad/ruby-jose#19, which means that the ibanity gem cannot validate webhooks for Ruby installations using OpenSSL 3.

This PR removes the dependency on the jose gem and uses the better maintained jwt gem that is in fact OpenSSL 3 compatible. A spec was added to verify that the behaviour mostly stays the same, returning Ibanity::Errors for signature validation failures.

@RemcodM RemcodM marked this pull request as ready for review August 10, 2023 14:02
@damienbr damienbr changed the base branch from master to jwt-validation August 17, 2023 14:04
@damienbr damienbr merged commit 574e479 into ibanity:jwt-validation Aug 17, 2023
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.

Webhook validation is incompatible with OpenSSL 3
2 participants