Repository navigation
fix(security): drop rsa by using the aws-lc-rs backend for jsonwebtoken - #131
Merged
Merged
Conversation
jsonwebtoken's rust_crypto backend pulls in the rsa crate, which has an advisory without a fix (RUSTSEC-2023-0071). The aws_lc_rs backend does RS256 and HS256 without it, and aws-lc-rs is already in the build through rustls. Bump version to 1.2.7. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
rsa is no longer a dependency, so the ignore entry is not needed. Keeping it would hide the advisory if rsa comes back through another crate. 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
aws_lc_rsbackend instead ofrust_crypto. Thersacrate and the other RustCrypto crates it pulled in are no longer inCargo.lock.Cargo.audit.ignore. Its only entry was RUSTSEC-2023-0071; a stale ignore would hide the advisory ifrsacomes back through another crate.Reason
cargo auditreported RUSTSEC-2023-0071 (Marvin Attack) forrsa, which has no fixed version. It came in only through jsonwebtoken'srust_cryptobackend. Theaws_lc_rsbackend supports both algorithms the backend uses: RS256 to verify Keycloak tokens and HS256 for its own session tokens.aws-lc-rsis already in the build through rustls and reqwest, so no new crypto library is added. The Keycloak tests sign and verify RS256 tokens with the new backend.After this change
cargo auditreports no vulnerability; only thebincodeandproc-macro-error"unmaintained" warnings from crux remain.