-
Notifications
You must be signed in to change notification settings - Fork 276
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
Feature request: Support arbitrary crypto backends #409
Comments
There's #402 which is the start of the same idea minus traits. The idea was to support aws-lc-rs and rust-crypto. I didn't consider traits but i guess it would work fine. |
Aah ok I see how #402 is being done. If one were to extend that to use traits, and expose the trait API in addition to the current Should I write up a PR incorporating I don't want to step on anyone's toes or mess with PRs currently in progress. So if you feel the traits route isn't the correct direction, I'm fine with maintaining a fork for my use-case. |
I just came across a similar issue -> +1 for the Feature, especially with the ability/freedom to use other backends. |
@Keats / @sidrubs I have some bandwidth to spare and in light of #399 I can help maintenance given this is the JWT lib with the most future benefit. Want me to take over your draft PR. is that still the way to go, and what with the aws-ls-rs PR? Once this big ticket is fixed I can also start digging through the other open tickets. |
#410 is definitely the way to go. It's missing some stuff but the base is there and it should be possible to finish it. |
@GlenDC sure, that would be great! Let me know if you have any questions. |
Hi,
I see there has already been a bit of activity surrounding crypto backend support. We have a use-case where we would like to provide an arbitrary "signer" and "verifier" (e.g. a call out to an HSM). I would, personally, prefer to get this into the
jsonwebtoken
crate, rather than maintaining a fork, as I don't like unnecessary fragmentation of the ecosystem.I am more than happy to make the PR (making sure that we don't break backwards compatibility). Is this something that the
jsonwebtoken
crate would consider including?I did a very rough POC making use of RustCrypto's
signature::Signer
andsignature::Verifier
traits.Setting up signing and verifying traits:
Performing the encoding:
One could implement default signing and verifying modules using
ring
(or RustCrypto, oraws-lc-rs
) and could put all the "complexity" of the creating the signing and verifying modules behind the current public facingencode
anddecode
functions so that this does not introduce breaking changes.Is there anything else I would need to consider?
The text was updated successfully, but these errors were encountered: