Skip to content

FIPS support #575

Open

Description

@JoshMock

A discussion I just had with @tehbooom highlighted the need many customers have for a FIPS-compliant binary build if they intend to use the CLI in their environments.

Our current experimental binary builds (see the downloadable bins on the 0.4.0 release page) are generated using Bun, because it was simpler to achieve, and the resulting binaries run a bit faster than an equivalent binary generated by Node.js (see this comment for general notes on comparative benchmarks).

Unfortunately, Bun does not yet support FIPS so for compliance we would need to switch back to Node.js for binary builds. We'll also need to identify what kind of environment is required, such as a chainguard image and Node.js built with a FIPS-approved SSL stack. More research will be needed to establish the correct way to do this.

Activity

  1. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor

    This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 2 days.

  2. github-actions commented on Oct 5, 2026

    @github-actions
    Contributor

    This issue was closed because it has been stalled for 2 days with no activity.

  3. added
    tracking
    and removed on Oct 5, 2026
  4. JoshMock commented on Nov 12, 2026

    @JoshMock
    MemberAuthor

    Research: FIPS-compliant single-binary options

    Summary: Bun can't do this today. The most practical path is a Node.js single executable application (SEA) built on a stock Node binary. That binary loads a FIPS-validated OpenSSL provider installed on the host at runtime. A fully self-contained FIPS binary isn't possible with OpenSSL-based runtimes, because the FIPS provider has to be installed and self-tested on each machine.

    Key constraint: what "FIPS compliant" means for Node

    • From the Node.js docs (crypto: FIPS mode): Node itself is not FIPS validated. Validation belongs to the OpenSSL FIPS provider (fips.so/fips.dll), and only when it's deployed according to its security policy.
    • From BUILDING.md:
      • Node can use a FIPS provider whether OpenSSL is linked statically or dynamically.
      • It's not necessary to rebuild Node: the provider and config are supplied at runtime.
      • Node doesn't build a FIPS provider. A provider built alongside Node would have no validation status.
    • The validated provider today is OpenSSL 3.1.2, FIPS 140-3, CMVP #4985. 3.5.4 was submitted but not checked as validated yet.
    • Per README-FIPS, a validated provider works with any libcrypto from 3.0 onward, "including future major release series". So a newer OpenSSL linked into Node (e.g. 3.5/4.x) should be able to load the 3.1.2 provider. I haven't tested this against a current Node release.
    • Also per README-FIPS: openssl fipsinstall (self-tests plus generating fipsmodule.cnf) must run on every machine, and for 3.1.2 the config output must not be copied between machines. This is why the FIPS piece can't be baked into a single portable file.

    So any OpenSSL-based binary ends up "FIPS-capable": the binary ships, and the customer's environment provides the validated module and config. That matches how FIPS is usually delivered on RHEL in FIPS mode, Chainguard/Wolfi *-fips images, etc.

    Options

    # Option FIPS story Single file? Effort / risk
    1 Node SEA (node --build-sea, Node ≥ 25.5; older: --experimental-sea-config + postject) on stock Node Loads host FIPS provider via OPENSSL_CONF / --openssl-config / --openssl-shared-config; enforce with --force-fips Yes (provider on host) Low–medium. SEA is "Stability 1.1 – Active development". Needs a bundler step (esbuild/rolldown) to produce one entry script; mainFormat: "module" is supported for ESM.
    2 Node SEA on a custom Node built with --shared-openssl --openssl-is-fips against the distro's OpenSSL Uses the distro's validated libcrypto + provider directly No (dynamically linked); per-distro builds High: build matrix per OS/libc; mainly useful inside a known base image
    3 FIPS container image (e.g. Chainguard/Wolfi node-fips or chainguard-base-fips + the npm package or SEA) Provider pre-installed and configured in the image N/A (image) Low, and it ties into the Docker release work. Likely the fastest compliant artifact for CI/Kubernetes users.
    4 pkg-style packagers (e.g. @yao-pkg/pkg) Same as #1: they embed a Node binary, so FIPS still comes from the host provider Yes Medium; third-party tool, no advantage over native SEA now that --build-sea exists
    5 Bun Not possible today: oven-sh/bun#4869 is still open with no maintainer movement (last activity: user bumps, Oct 2026). Bun uses BoringSSL, and its FIPS variant isn't wired in. — Blocked upstream
    6 Rewrite the binary layer in Go Go 1.24+ has a native FIPS 140-3 module (CMVP #5247), enabled with GOFIPS140. It's truly self-contained, with no host provider needed. Yes, fully Very high: full rewrite. Listed only for completeness.

    Not evaluated: Deno compile (TLS via rustls; FIPS status unknown).

    Platform caveats

    • Linux: the realistic FIPS target. RHEL/Ubuntu Pro FIPS hosts and FIPS container images already provide a validated provider and config.
    • macOS / Windows: the OS-validated crypto (CoreCrypto / CNG) is not what Node uses. A FIPS Node binary there would need a separately installed, validated OpenSSL provider plus fipsinstall on the host. It's worth checking whether any customer actually needs FIPS on these platforms before investing.
    • The OpenSSL FIPS provider can't be shared by multiple libcrypto copies in one process. This applies to the native addons in our dependencies; we don't have any today, as far as I can tell from package.json.
    • Using a statically linked Node's own libcrypto with a distro's provider (e.g. RHEL's) may fall outside that distro module's security policy. Confirm with InfoSec which deployment models we're allowed to call "FIPS compliant".

    Suggested path

    1. Replace Bun with Node SEA for the existing release binaries, independent of FIPS, so there's only one runtime to make compliant. Check the startup-time and size regressions noted in ci: corrections to generation of binary executable artifact #546.
    2. Ship a FIPS mode for the SEA: execArgv with --force-fips, or an ELASTIC_CLI_FIPS=1 switch that enables it. It should fail fast if no FIPS provider is loaded, using crypto.getFips() plus a FIPS-only algorithm probe, because getFips() === 1 alone doesn't prove a provider is loaded. Document the OPENSSL_CONF setup.
    3. Publish a FIPS container image variant alongside the Docker work. This is the turnkey compliant artifact.
    4. Open questions for InfoSec: which deployment models count as compliant for us (host-provided provider vs. image-provided), and whether macOS/Windows FIPS is in scope.

    Not verified yet: an end-to-end SEA build of this repo, and loading the 3.1.2 provider into current Node LTS. Those are the first spike tasks.


    authored by Pi Coding Agent (claude-opus-5-5)

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

    tracking

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions