-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Linux's webpki-roots optional and opt-in at runtime #12
Comments
Is it not practical to pass this configuration in when constructing a verifier, rather than using hidden global state? |
If posed in terms of "also trust these extra roots" in the verifier config, this could avoid a direct dep on webpki-roots and be useful for other cases as well. |
Yes, that would be better 👍. The verifier isn't currently exposed in the public API (see #7) but we probably should do that to make the crate more usable.
That could work too. We would already have an API asymmetry between UNIX and everything else with the The last thing that comes to mind is that for a good percentage of users, make using this crate more annoying in a workspace since they'd need to write a shim crate that depends on |
On further consideration, use cases which need to trust arbitrary certs could straightforwardly wrap the rustls-platform-verifier |
I think the common pattern for this would be to have a Cargo feature that then enables an explicit opt-in API. |
Other idea I recently came up with is to have the verifier pull the Mozilla roots straight from the CCADB and refresh the in-memory set of roots on an interval (on a separate thread). |
CCADB is super slow and unreliable (it's based on a Salesforce report), so it's not suitable for direct fetch by applications. Also any setup where we fetch fresh roots over a TLS connection puts a lot of trust in that connection and the server on the other side of it. |
I put up a draft for this in #24. Input welcome. |
Currently, the use of
webpki-roots
in the Linux verifier is not configurable and they are always loaded to supplement what might come from on-disk CA bundles. This, and the previous behavior of falling back towebpki-roots
, was implemented at 1Password because we foundopenssl-probe
to be way too unreliable and had multiple users write in that they were unable to use the app as a result.However, this is likely not what everyone wants and makes it harder to control exactly what trust roots a consumer of
rustls-platform-verifier
might allow in addition to some other concerns:But there we're also some solutions presented as well:
Out of these, the last idea to enable it with an explicit API seems to be the best balance between convenience, a simple crate API, and control/security. So I believe that is the way we should go.
There are then two things needed to resolve this:
webpki-roots
dependencies optional via an opt-in feature calledwebpki-roots
orwebpki-roots-augment
.others.rs
to use it on Linux:The text was updated successfully, but these errors were encountered: