Skip to content

angluar-cli is not FIPS Compatible #23011

@shawnweeks

Description

@shawnweeks

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

Description

Much like angular/angular#42577 the angular-cli also uses md5 hashes and fails to run a build on a Red Hat(Rocky) 8 system with FIPs enabled.

🔬 Minimal Reproduction

On a Red Hat(Rocky) 8


# Enable FIPS Mode and Reboot
sudo fips-mode-setup --enable
sudo reboot now
# Install Red Hat 8 Node JS 16
sudo dnf module install nodejs:16


ng new my-app
cd my-app
# Fix FIPS issue in babel-loader
sed -i'' 's~md4\|md5~sha256~g' node_modules/babel-loader/lib/cache.js
ng build

🔥 Exception or Error


./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: error:060800C8:digital envelope routines:EVP_DigestInit_ex:disabled for FIPS
    at /home/sweeks/Projects/my-app/node_modules/@ngtools/webpack/src/ivy/loader.js:81:18
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: error:060800C8:digital envelope routines:EVP_DigestInit_ex:disabled for FIPS
    at /home/sweeks/Projects/my-app/node_modules/@ngtools/webpack/src/ivy/loader.js:81:18
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

🌍 Your Environment


Angular CLI: 13.3.3
Node: 16.13.1
Package Manager: npm 8.7.0
OS: linux x64

Angular: 13.3.3
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1303.3
@angular-devkit/build-angular   13.3.3
@angular-devkit/core            13.3.3
@angular-devkit/schematics      13.3.3
@schematics/angular             13.3.3
rxjs                            7.5.5
typescript                      4.6.3

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions