25 points · by LaurentGoderre · 10mo ago · 32 comments
Everything looked correct. OpenSSL 3 with the FIPS provider enabled. Ruby built against it. A simple pg connection worked.
The app failed once ActiveRecord was involved. The error came from libpq. It turned out the pg gem had pulled in a prebuilt native dependency that was linked against different crypto. That path was always there. It just was not exercised until ActiveRecord hit it.
Forcing a source build fixed the issue because the extension then linked against the OpenSSL in the image.
The takeaway is that a FIPS base image does not mean your dependency graph respects the same boundary once native code is involved.
Curious how others have seen this play out in Ruby, Python wheels, Go with CGO, or Node native addons.
Yes, gotta implement that Dual_EC_DRBG compatibility.
FIPS compliance is not a great idea, the benefits are questionable and possibly nonexistent. It's also significantly worse advice than simple "implement decent modern crypto", you can do all kinds of really bizarre stuff and still be FIPS compliant.
I counter about the benefits of FIPS. If you don't do it, you don't get paid by the government for whatever contract you have. Many people find getting paid to be beneficial.
Now, it's not the vast majority of applications, but I'm sure there are a significant number of developers on HN that are working on applications that need to meet FedRamp requirements and posts like this point out potential pitfalls on what needs enabled.
Not much different when dealing with stuff like STIGs. A large number of them are highly questionable and may only apply to very specific applications, yet you see barely trained button pushers saying you need to follow them. If you're aware of them when writing your application it will save a bunch of implementation headaches when it ends up in the field.
I absolutely agree, but the OP does speak about making "the entire software supply chain safer" which is far from true.
Not the entire RHEL STIG mind you but parts of it
I think the problem with FIPS can be summed up very well as "it doesn't require you to implement good crypto", which makes it pointless and almost certainly harmful.
In my opinion, FIPS compliance is bad security practice and I suspect if a government agency called you on not meeting it, the justification of patching to address known vulnerabilities should hold up to scrutiny.
This is the same as certifying an aircraft as airworthy. You can’t build another aircraft and say it is airworthy because the one you just built is airworthy too
If a customer demands FIPS compliance charge them out the ass for it. Its not inherently secure, it requires in some cases massive re-engineering of product and toolchains, and mostly seems to be an ask from clueless deep pocketed Fortune 500 companies looking to minimize liability claims after a breach by being able to point at their FIPS compliance.
I was part of a team that had multiple level 1 and 2 certificates for software-only CMs in the 1990s, both 140 and the second edition, 140-1.