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

Rust implementation of JWT signing/validation #8319

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

mmastrac
Copy link
Contributor

@mmastrac mmastrac commented Feb 7, 2025

Extracted from #8299

This implements JWT signing and validation in Rust.

The implementation is provided by the external crate jsonwebtoken, but we manage all key loading and storage as that crate is somewhat lacking in that department. The backend crypto for this is provided by Ring, though the external crate may offer pluggable backends in the future.

The crate provides an interface KeyRegistry that can be used to generate, load and save JWKs using one of three algorithms: HS256, RS256 or EC256.

The Python changes will come at a later date -- we can land the Rust impl first which will drastically shrink the size of the Python PR. In the other PR, I've managed to get all of the auth tests passing with this existing Python binding, but I may make some small changes to it before landing.

If any Python binding changes are suggested we can push those into #8299 as TODOs.

mmastrac added a commit that referenced this pull request Feb 10, 2025
@mmastrac mmastrac merged commit 7c3fa14 into geldata:master Feb 11, 2025
23 checks passed
deepbuzin pushed a commit that referenced this pull request Feb 18, 2025
Extracted from #8299

This implements JWT signing and validation in Rust.

The implementation is provided by the external crate `jsonwebtoken`, but
we manage all key loading and storage as that crate is somewhat lacking
in that department. The backend crypto for this is provided by Ring,
though the external crate may offer pluggable backends in the future.

The crate provides an interface `KeyRegistry` that can be used to
generate, load and save `JWK`s using one of three algorithms: `HS256`,
`RS256` or `EC256`.
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.

2 participants