-
Notifications
You must be signed in to change notification settings - Fork 38
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
ParseSignedEventsWebhook is not supported on Linux/Ubuntu #377
Comments
Thanks for letting me know. I'll need to investigate whether we can switch to the alternate cryptographic algorithm you suggest and still be able to validate SendGrid signature. |
Excellent.
I hope it helps, |
Do you use If so, I learned that built-in ECDsa cryptography classes have added support for importing public keys in recent version of .net and I could utilize that to provide Linux/Ubuntu support. |
I don't use .Net 5. I'm quite happy with my current implementation of signature verification, it really is simple (see example above). |
I mentioned it in my previous comment but want to repeat it in case I wasn't 100% clear: the My reluctance to rely on the StarBank library is based on the fact that it was neglected for a long time (maybe still is, I don't know). For instance, they didn't support .NET core until last summer. I know their library is licensed under MIT and I could copy their code but, as an OSS library author myself, I wouldn't feel comfortable doing that to another OSS library author. SendGrid did that with some of my code and it infuriated me because they didn't even bother attributing the code they took. I had to ask them multiple times to attribute the code before they did so and they were pretty cavalier about the whole thing. They didn't think it was a big deal to take someone else's work. That's why, out of respect, I'm not inclined to copy/paste Starbank's code and therefore I would prefer to work with the .NET built-in cryptography classes. I'll continue my investigation for a solution that does not require a specific .NET version. |
Yes, you were perfectly clear about the .Net requirement being relevant for ParseSignedEventsWebhook on Linux/Ubuntu only. My only (very small) concern is that if SendGrid decides someday to enforce signed webhooks then it might become a little more demanding for some developers. But that is a big 'if' :) And I totally understand, agree and respect your opinion about OSS and attribution practices. Unfortunately , it's too easy to "forget" proper attribution.. Thanks again for your efforts, they are much appreciated. |
Out of curiosity: which version(s) of .NET do you use? |
According to this article, .NET Core 2.0 used to be supported on Ubuntu but it's no longer supported and therefore you must run .NET Core 2.1 or a more recent version on Ubuntu. Therefore, the solution I am looking for must work on .NET Core 2.1 and I don't need to worry about older frameworks. |
thank you for the quick fix! |
I'll publish new version hopefully later today. I'm trying to setup a Ubuntu image on AppVeyor to automate unit testing but facing a few problems (you can see my progress here). |
I was finally able to successfully run the unit tests on Ubuntu (see here). So will be publishing 0.77.0 momentarily. |
🎉 This issue has been resolved in version 0.77.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
Thank you so much! |
Hi,
When using StrongGrid on Ubuntu I encountered an issue with signature validation.
It seems that converting the header signature uses ECDsaCng which is Windows-specific, and raises a System.PlatformNotSupportedException on Linux machines.
the offending line:
StrongGrid/Source/StrongGrid/WebhookParser.cs
Line 110 in 297c44e
According to the members at Azure/.Net core, this can be easily fixed using ECDsa instead of ECDsaCng.
(see dotnet/core#1918 (comment))
Is it possible to address this issue so that parsing events will support non-Windows platforms?
thanks and keep up the excellent work :)
The text was updated successfully, but these errors were encountered: