fix(security): replace jwt-simple to resolve RSA vulnerability#97
Merged
JanZachmann merged 3 commits intoomnect:mainfrom Feb 12, 2026
Merged
Conversation
crux_core TypeGen requires pnpm on PATH but never actually uses it. Provide a no-op stub when pnpm is not installed, matching the existing Dockerfile workaround. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
- Replace jwt-simple with jsonwebtoken in src/backend - Update TokenManager and KeycloakProvider to use jsonwebtoken - Clear Cargo.audit.ignore and bump version to 1.1.1 - Update unit tests to use new JWT implementation Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
…ple-rsa-vulnerability
JanZachmann
added a commit
that referenced
this pull request
Feb 18, 2026
## Summary - Fix `InvalidSignature` error in Keycloak portal token validation caused by the `jwt-simple` → `jsonwebtoken` migration - `DecodingKey::from_rsa_der()` does not handle the SPKI format Keycloak returns; replaced with `from_rsa_pem()` and PEM header wrapping - Extract key conversion into `decoding_key_from_keycloak()` pure function and add unit tests with a real RSA keypair ## Reason The `jwt-simple` → `jsonwebtoken` migration (#97) broke Keycloak token verification. All existing tests mocked `SingleSignOnProvider::verify_token()` at the trait level, so the actual RSA key parsing and signature verification had zero test coverage. ## Verification - `cargo test --features mock` — 3 new tests exercise real RSA key format conversion and JWT signature verification - Deployed to device and confirmed portal auth flow succeeds --------- Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces the 'jwt-simple' library with 'jsonwebtoken' to resolve a security vulnerability in the 'rsa' crate (RUSTSEC-2023-0071) which was a transitive dependency.
Key Changes