Skip to content

feat(fips): system-OpenSSL backend selection for the supervisor #6233

Backlog

Description

@Ygnas

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-process builds russh with default features, selecting russh's own crypto backend independently of openshell-crypto;
  • the workspace-wide opentelemetry-otlp feature pulls tonic/tls-aws-lc into every consumer, and the workspace-wide axum ws feature pulls tokio-tungstenite/tungstenite and their SHA-1 into crates that use WebSocket only in tests;
  • the spiffe jwt-verify-* features enable jsonwebtoken/aws_lc_rs in crates that never verify tokens;
  • first-party call sites hash with direct RustCrypto sha1/sha2 dependencies (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-crypto dependency backend-neutral (default-features = false), with each executable selecting its backend explicitly;
  • give the supervisor crypto-aws-lc (default) and crypto-openssl selectors that fan out into openshell-crypto, russh (via supervisor-process, built default-features = false with non-crypto defaults such as compression preserved) and aws-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/ws to the crates that serve WebSocket in production, the spiffe jwt-verify-* features to the crates that actually verify (server, spire), and opentelemetry-otlp to the provider-agnostic TLS feature;
  • route the first-party hash call sites through the openshell-crypto facade (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

  1. added
    state:triage-needed
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions