Repository navigation
fix(crypto): use the maintained RustCrypto providers - #159
Conversation
The rust_crypto backend kept rustls-rustcrypto 0.0.2-alpha and jsonwebtoken's own backend, which hold crypto-bigint 0.5 and rustls-webpki 0.102, carrying RUSTSEC-2026-0387 and -0382. Both give way to the TLS and JWT providers of sid-crypto, over current RustCrypto primitives; rustls keeps TLS and path validation, jsonwebtoken keeps parsing and claims. The advisory exceptions those crates needed are removed. RSA stays public-key only: a listener on this backend presents a P-256, P-384 or Ed25519 key, and an RSA key is refused at startup. Closes #154
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Shared provider dependency and advisory setup Cargo.toml, .cargo/audit.toml, deny.toml |
Cargo features and test dependencies now select sid-crypto. The audit configurations retain only RUSTSEC-2023-0071. |
JWT provider selection src/auth/crypto.rs, src/auth/crypto/tests.rs, README.md |
JWT provider selection and related tests use sid-crypto’s RustCrypto provider. The README states that this provider refuses RSA private keys. |
TLS provider integration src/tls.rs, src/tls/tests.rs, src/serve/tests.rs, src/shield/resolve/tests.rs, tests/shutdown.rs, tests/tls.rs, README.md |
TLS provider setup and tests use sid-crypto or ring. The README describes supported listener keys and provider alternatives. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Merge Risk: 
Minimal · previous review 7c586
-
The provider change has no identified merge-blocking risk and is ready to merge after normal checks.
Pre-merge checks: 
3 · 
1 · 
1
-
Failed checks: 1 warning · 1 inconclusive Passed checks: 3 passed-
Full details: Out of Scope Changes check
-
Explanation
The changed files update the provider dependency, feature wiring, provider-selection tests, TLS test setup, documentation, and advisory configuration. These changes directly support
#154and its dependency and security requirements. No unrelated product behavior or unrelated files appear in the reviewed diff.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 8 files. (4 skipped: 4 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Full details: Linked Issues check
-
Explanation
The diff replaces
rustls-rustcryptoand jsonwebtoken RustCrypto selection withsid-crypto, updates the RustCrypto provider tests, and removes the obsolete advisory exceptions.src/tls.rsstill gives an installed provider precedence and builds client and mTLS server configurations with rustls. The available evidence does not establish all#154acceptance criteria. In particular, the diff does not show tests for RSA listener-key refusal before key parsing, the full JWT algorithm and malformed-key matrix, or the external-backend and no-backend embedding configurations. The RSA refusal behavior is supplied by the externalsid-cryptodependency, whose implementation was not available for inspection.Resolution
Provide reviewable evidence for the missing
#154criteria, or add focused tests and configuration checks that demonstrate RSA private-key refusal before parsing, the required TLS/mTLS and JWT cases, supported feature combinations, and external-backend/no-backend embeddings.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
[High impact] No blocking issues were identified in the changes since the previous review.
|
## 🤖 New release * `structured-proxy`: 8.1.3 -> 8.1.4 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [8.1.4](v8.1.3...v8.1.4) - 2026-10-30 ### Fixed - *(client-address)* read the peer a tonic server records ([#158](#158)) - *(crypto)* use the maintained RustCrypto providers ([#159](#159)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: sw-release-bot[bot] <255865126+sw-release-bot[bot]@users.noreply.github.com>
Summary
The
rust_cryptobackend keptrustls-rustcrypto0.0.2-alpha and jsonwebtoken's own backend, which holdcrypto-bigint0.5 andrustls-webpki0.102, carrying RUSTSEC-2026-0387 and RUSTSEC-2026-0382. Both give way to the TLS and JWT providers ofsid-crypto, over current RustCrypto primitives; rustls keeps TLS and path validation, jsonwebtoken keeps parsing and claims.The advisory exceptions those crates needed are removed; only RUSTSEC-2023-0071 remains, with its reason restated.
Behavior change: on this backend RSA is public-key only. A TLS listener presents a P-256, P-384 or Ed25519 key, and an RSA key is refused at startup. RSA servers are still verified as a client.
aws_lc_rsor an installed provider serves an RSA certificate.Testing
915 tests on the default build and 944 with all features pass, clippy with all features and
cargo fmtpass, andcargo auditreports nothing against the local advisory database. The RSA client tests talk to a test server onring, a dev-only dependency, since the provider under test cannot sign with RSA.Closes #154