Hi all!
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:
https://github.com/randymized/www-authenticate/blob/master/lib/md5.js#L2 immediately creates a md5sum at require time (presumably as a functionality test)
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.