Repository navigation
Description
Context
OpenShell currently performs most of its cryptographic operations through pure-Rust implementations: RustCrypto crates for hashing, MACs and ciphers, and aws-lc-rs or ring for TLS and signatures depending on the component. For deployments that must operate under FIPS 140-3, every cryptographic operation has to go through a validated cryptographic module. On RHEL and UBI9 that module is the system OpenSSL (libcrypto) running in FIPS mode.
This issue tracks the work needed to reach a state where, in the production dependency graph of every shipped binary, all crypto is performed by the system OpenSSL module.
Problem
The non-module crypto sits in third-party dependencies with very different situations, so no single change fixes it:
| Area | Dependencies today | Strategy |
|---|---|---|
| Postgres authentication | RustCrypto md-5, sha2, hmac (via sqlx) | Additive upstream PR |
| WebSocket accept-key SHA-1 | RustCrypto sha1 (via tungstenite/headers/axum) | Additive upstream PRs + dependency upgrade |
| SSH transport | RustCrypto cipher/hash/signature crates (via russh, ssh-key, ssh-cipher, ml-kem) | Maintained forks |
| JWT-SVID verification | RustCrypto (via rust-spiffe) | Additive upstream PR |
| TLS and applicative JWT | rustls and jsonwebtoken | Already solved by existing opt-in backends (rustls-openssl, jsonwebtoken-openssl); wiring only |
Two strategies, applied per component:
- Additive upstream changes where the fix is small enough to be accepted upstream: an opt-in feature (for example
openssl) routes the operations through the system OpenSSL, while the default behavior and the default dependency graph stay unchanged. This is the plan for sqlx, headers, axum and rust-spiffe. - Maintained forks where the change is too deep for a realistic short-term upstream merge: russh, ssh-key, ssh-cipher and ml-kem carry an optional OpenSSL backend in forks, pinned through
[patch.crates-io]in the OpenShell workspace.
Beyond the dependencies themselves, a credible FIPS mode also needs a runtime that matches (UBI9 FIPS image), a CI gate that keeps denied crypto out of the graph, and a startup check that the kernel is actually in FIPS mode. Those are tracked as children too.
A proof of feasibility exists on a public branch (feat/openssl-fips-cargo-wiring): the gateway builds with a crypto-openssl feature set, links the system libcrypto, and passes an external FIPS-oriented scan of its dependency graph and binary with no real finding.
A small number of documented deviations remain and are tracked separately; they concern host key types and legacy key formats rather than the bulk of the transport crypto.
Children
- feat(fips): system-OpenSSL backend for sqlx Postgres authentication #6225
- feat(fips): WebSocket accept-key SHA-1 through system OpenSSL #6226
- feat(fips): SSH transport crypto through system OpenSSL #6227
- feat(fips): JWT-SVID verification through system OpenSSL #6228
- feat(fips): UBI9 FIPS runtime image #6229
- ci(fips): gate FIPS-denied crypto dependencies #6230
- feat(fips): verify kernel FIPS mode at startup #6231
Current state
Proof of feasibility complete for the gateway: system-OpenSSL build validated, external scan clean, forks public. The dependency work (upstream PRs and fork maintenance) and the runtime work (image, CI gate, startup check) are tracked in the children above.
Activity