You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The www-authenticate library used for DIGEST authentication causes runtime crash in FIPS mode #961
We're helping a client get MarkLogic to use certificate-based authentication under FIPS mode. We've got the authentication working without FIPS, but once enabled the www-authenticate library used by marklogic immediately crashes the runtime in FIPS mode. The www-authenticate package (https://www.npmjs.com/package/www-authenticate) is abandoned, so we should not expect a change there. The issue there is quite simple:
This will crash under FIPS even if DIGEST auth is not being used, simply due to www-authenticate package being present at all. Simply removing that line is enough to resolve the issue under FIPS.
I was not able to immediately find a quick replacement package. As a potential solution I've put together a zero-dependency DIGEST implementation here: #962. Let me know if you have alternative approaches, but this is a blocker for our client.
@brycebaril To clarify - when you "under FIPS mode", are you referring to a configuration on the Node Client, a configuration on the MarkLogic side (i.e. the "SSL FIPS Enabled" flag on the cluster page), or both? Just want to make sure we can reproduce this accurately.
@rjrudin The Node Client; enabling FIPS in the application server communicating with MarkLogic. When running Node on a system with FIPS enabled, require('marklogic') is going to immediately abort due to require('www-authenticate') causing the Abort.
@brycebaril We actually looked at replacing this library over a year ago but did not find a suitable replacement. We're considering the following approach and wondering if you may have tried it as well:
Copy the 4 files comprising the www-authenticate library into the Node Client source code.
Remove the offending line from the md5.js library.
Remove www-authenticate as a 3rd party dependency.
Our initial tests look promising with this, and it seems to minimize the number of changes.
@rjrudin that solution is also reasonable and should be the easiest way to keep feature-for-feature compatibility. Based on our tests that manually did the same removal of that line it should work.
edit: the code is MIT, so you should be able to bring it in if you bring in the license
@brycebaril Node Client 3.7.1 was released earlier today - https://www.npmjs.com/package/marklogic with fix for this issue. Request you to try and let us know. The fix is also available in the master branch.
Activity
rjrudin commentedon Sep 18, 2025
@brycebaril To clarify - when you "under FIPS mode", are you referring to a configuration on the Node Client, a configuration on the MarkLogic side (i.e. the "SSL FIPS Enabled" flag on the cluster page), or both? Just want to make sure we can reproduce this accurately.
brycebaril commentedon Sep 18, 2025
@rjrudin The Node Client; enabling FIPS in the application server communicating with MarkLogic. When running Node on a system with FIPS enabled,
require('marklogic')is going to immediately abort due torequire('www-authenticate')causing the Abort.rjrudin commentedon Sep 18, 2025
@brycebaril We actually looked at replacing this library over a year ago but did not find a suitable replacement. We're considering the following approach and wondering if you may have tried it as well:
Our initial tests look promising with this, and it seems to minimize the number of changes.
anu3990 commentedon Sep 18, 2025
@brycebaril Thank you for bringing this to our attention. Can you please confirm the OS you are using. This will help us in streamlining the solution.
brycebaril commentedon Sep 18, 2025
@rjrudin that solution is also reasonable and should be the easiest way to keep feature-for-feature compatibility. Based on our tests that manually did the same removal of that line it should work.
edit: the code is MIT, so you should be able to bring it in if you bring in the license
@anu3990 RHEL 9 with FIPS enabled
anu3990 commentedon Sep 25, 2025
@brycebaril Node Client 3.7.1 was released earlier today - https://www.npmjs.com/package/marklogic with fix for this issue. Request you to try and let us know. The fix is also available in the master branch.
brycebaril commentedon Sep 25, 2025
Awesome, thank you so much! I will have the team try it out now.
brycebaril commentedon Sep 30, 2025
Everything is working well now, thank you for your prompt responses! Fixed as of release https://github.com/marklogic/node-client-api/releases/tag/3.7.1