feat: support "verify" with FIPS crypto backend - #233
Conversation
|
Thanks for the PR (& self-review), I will try to review it soon but I'm supportive of the general direction.
FWIW you can ignore this failing CI job, it's being addressed in #223 |
|
Awesome! No rush. Thanks for the link - I see you're keeping support for a MSRV of 1.67.1 in the linked PR, but
Should I gate the CI checks agains the FIPS backend with |
I think this will ultimately come down to @chifflier's preference. IMHO I think an MSRV of 1.67 is too stale and many crates in the ecosystem with larger use have more aggressive MSRVs (e.g. Tokio at 1.71, aws-lc-rs at 1.70, rustls at 1.83). I would personally be in favour of taking an MSRV increase that was more in-line with those projects. 1.71 seems like an OK target and was a rust version released ~2 years ago. |
|
It's a shame there's no way of getting hold of rust version metadata for downloads from crates.io in order to make an informed decision - I agree it's quite a low MSRV and I doubt there's a meaningful fraction of users on <1.71 these days. I will leave it as-is for now, and make any changes after review / when there's a MSRV plan 👍 |
cpu
left a comment
There was a problem hiding this comment.
Thanks! Putting aside the question on how to handle MSRV this looks good to me otherwise.
Another point in favour: in would allow taking a dev dep on |
|
Hey all! Interested in seeing this deployed in the next release. Where does this stand? |
This branch is targeting main, so unless backported to the |
|
I'd be happy to backport to 0.18 if that helps? Would we have the same MSRV problem? |
It seems reasonable from my perspective, but I can't publish the crate so I think we're still blocked on chifflier (even setting aside the MSRV issue).
Yes, I believe so. |
So fun fact, crates.io has a public Datadog dashboard that tracks requests by cargo version: https://p.datadoghq.com/sb/3a172e20-e9e1-11ed-80e3-da7ad0900002-973f4c1011257befa8598303217bfe3a?fromUser=false&refresh_mode=sliding&from_ts=1771511854139&to_ts=1772116654139&live=true A quick check of this week of data shows that the highest ranking <1.71 version is 1.70 at 0.36%, and then after that, 1.65 at 0.07% of requests. |
|
The MSRV has been upgraded to 1.85, so this part is now solved. |
|
Hi, Any idea on how to fix this? Note: the C compiler used seems to be gcc 16, according to the logs This also brings more problems:
Thanks |
This comment was marked as outdated.
This comment was marked as outdated.
|
Hi, I pushed some revisions to this branch. It seemed easier than blocking on more back/forth given it has sat for a while. Sorry about that. Let me know if you'd prefer I don't push to your branch in the future.
That failure is upstream, see aws/aws-lc-rs#569 The FIPS module source is frozen for certification, so new-compiler fixes lag behind the non-FIPS
This is also inherent to the
I'd recommend against. For Enabling
I tried to address this a bit on the branch based on other projects:
I also rebased on master and adjusted for the P-521 support that landed in the meantime (and fixed a typo in the CI config). PTAL! |
Allow verifying cryptographic signatures using the AWS-LC's FIPS crypto backend. This change allows this library to be used in FedRAMP / US Gov deployments, which have a hard requirement on using FIPS-approved crypto modules only. The "verify-aws-fips" feature flag is functionally identical to using "verify-aws", but it selects the FIPS backend in aws-lc-rs.
Clarify what is checked and why.
The docs.rs hosts don't meet the build reqs for the aws-lc-rs FIPS feature, and FIPS is a niche configuration.
This lets us keep comprehensive feature coverage along with an understanding of some flags being mutually exclusive in their intended use (e.g. fips and non-fips aws-lc-rs) and so don't make much sense to test together.
Try to avoid re-testing the same combination of things multiple times in CI.
domodwyer
left a comment
There was a problem hiding this comment.
Looks great to me.
Hi, I pushed some revisions to this branch. It seemed easier than blocking on more back/forth given it has sat for a while. Sorry about that. Let me know if you'd prefer I don't push to your branch in the future.
Absolutely fine by me - thank you for taking the time to get this into shape.
Hi there! First off, thanks for this library and the careful thought put into the security aspects.
I'm working on a system that is deployed in FedRAMP environments, which requires FIPS certified crypto backends, and fortunately the
aws-lc-rscrate used byx509-parseris already supported! However it's configured to use the non-FIPS backend when enabling theverify-awsfeature today.This PR adds a new feature flag
verify-aws-fipsto go alongside the existingverify-awsfeature flag, enabling the FIPS-approved aws-lc-rs backend.There's no code changes, just feature flag toggling 👍
feat: support "verify" with FIPS crypto backend (8f355a0)