Repository navigation
Description
Part of the FIPS 140-3 umbrella (#6224).
Context
The supervisor performs its cryptographic operations through openshell-crypto, but the workspace root declares that dependency with features = ["aws-lc"], so every workspace member — the supervisor included — inherits the AWS-LC backend unconditionally. Around it, the supervisor's tree selects further crypto outside any validated module:
openshell-supervisor-processbuildsrusshwith default features, selecting russh's own crypto backend independently ofopenshell-crypto;- the workspace-wide
opentelemetry-otlpfeature pullstonic/tls-aws-lcinto every consumer, and the workspace-wideaxumwsfeature pulls tokio-tungstenite/tungstenite and their SHA-1 into crates that use WebSocket only in tests; - the spiffe
jwt-verify-*features enablejsonwebtoken/aws_lc_rsin crates that never verify tokens; - first-party call sites hash with direct RustCrypto
sha1/sha2dependencies (policy identity, endpoint status, route labels, evidence digests, the WebSocket accept-key, debug token fingerprints).
Problem
There is no way to build the supervisor against the system OpenSSL. Enabling openshell-crypto/openssl is additive: it makes the OpenSSL implementations available but removes none of the paths above from the production graph, because the workspace forcing and the dependency-owned selections remain. The binary also installs no crypto context at startup, so process-default providers (rustls's lazy AWS-LC default, jsonwebtoken's configured provider) win before any explicit selection happens.
Proposed approach
The supervisor delta on top of the shared backend-neutral groundwork (the consumer-selection pattern already prototyped for the gateway):
- make the workspace
openshell-cryptodependency backend-neutral (default-features = false), with each executable selecting its backend explicitly; - give the supervisor
crypto-aws-lc(default) andcrypto-opensslselectors that fan out intoopenshell-crypto,russh(via supervisor-process, builtdefault-features = falsewith non-crypto defaults such as compression preserved) andaws-sigv4(via supervisor-network), with compile-time guards rejecting both-backend and no-backend executable builds; - scope the workspace features that leak crypto into the supervisor graph:
axum/wsto the crates that serve WebSocket in production, the spiffejwt-verify-*features to the crates that actually verify (server, spire), andopentelemetry-otlpto the provider-agnostic TLS feature; - route the first-party hash call sites through the
openshell-cryptofacade (SHA-1 and SHA-256), propagating errors where a failure is security-relevant (accept-key validation) and failing closed where the hash is process-critical; - install the selected context, JWT provider and rustls process default at the very start of
main(), once per process, failing closed on a conflicting provider instead of falling back.
Default behavior and the default dependency graph stay unchanged; the OpenSSL lane is selected explicitly at build time.
Current state
Implemented and validated as part of the supervisor FIPS proof of feasibility: with --no-default-features --features defaults-without-telemetry,crypto-openssl, the supervisor's production graph (normal+build edges, linux target) contains none of aws-lc-rs, ring, sha1, sha2, sha3, hmac, md-5, aes, aes-gcm, cbc, ctr, curve25519-dalek, ecdsa, ed25519-dalek, p256, p384 or rsa. Both lanes pass the supervisor, supervisor-network, supervisor-process and crypto suites; startup installation and foreign-provider conflict are covered by integration tests running in isolated processes. Integration into this repository remains to be done.
Activity