Skip to content
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

feat(cli): Obtain CA certificates from platform trust store; add NEXTCLADE_EXTRA_CA_CERTS / --extra-ca-certs #1536

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Oct 16, 2024

See commit messages.

Fixes issues with previously-merged #1529. Supersedes #1527.

…verifier"

This reverts commit ed94c59, reversing
changes made to 48801fa.

Related-to: <#1529 (comment)>
…L trust store

Previously, the platform's trust store was ignored in favor of a baked
in and unconfigurable trust store provided by webpki-roots.  Now the
reqwest trust store will contain both certs obtained from the platform
at run time as well as certs baked in via webpki-roots.

Obtaining certs from the platform means that Nextclade will respect
OS-level configuration to trust private CAs / self-signed certs.
Keeping webpki-roots for all platforms is a precaution that makes this
change merely additive for backwards compatibility, in case of platforms
which lack a trust store (like some Linux containers) or platforms with
out-of-date trust stores.  It means that Nextclade binaries should
continue to Just Work™.

reqwest uses rustls-native-roots to obtain trusted CA certificates from
the standard trust stores for the OS/platform.  See the crate's
documentation for details on each platform.¹  Notably, this does not use
the platform's standard certificate verification methods like
rustls-platform-verifier; it just extracts certificates.  We may in the
future want to switch to rustls-platform-verifier (ourselves or by
waiting for reqwest to do so).

Updates reqwest because an earlier (but problematic and now reverted²)
change did so and there were some public API changes I'd like to use.
Updates wasm-bindgen as necessary for the newer reqwest (≥0.2.89) and
then a little further (0.2.93) to avoid Clippy warnings.³

¹ <https://docs.rs/crate/rustls-native-certs/0.8.0>
² <#1529 (comment)>.
³ <rustwasm/wasm-bindgen#3985>

Resolves: <#726>
Related-to: <#1529>
Related-to: <#1527>
Copy link

vercel bot commented Oct 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nextclade ✅ Ready (Inspect) Visit Preview Oct 16, 2024 5:52pm

…d --extra-ca-certs option

Allows adding additional CA certificates to the trust store specifically
for Nextclade, for when modifying the system's trust store isn't
desirable/possible.  Works across all platforms.

An option may be preferred to an env var by some users or in some
invocations.  It also provides a convenient place for documentation of
default CA cert handling and point of discovery for users.

Co-authored-by: ivan-aksamentov <[email protected]>
Supersedes: <#1527>
Related-to: <#1529>
Related-to: <#726>
tsibley added a commit that referenced this pull request Oct 16, 2024
…page

Updates clap-markdown from 0.1.3 → 0.1.4 to do so.

I noticed these were missing with the addition of --extra-ca-certs¹ and
traced it down to clap-markdown's version.

¹ in <#1536>
@tsibley tsibley changed the title Obtain CA certificates from platform trust store; add NEXTCLADE_EXTRA_CA_CERTS / --extra-ca-certs feat(cli): Obtain CA certificates from platform trust store; add NEXTCLADE_EXTRA_CA_CERTS / --extra-ca-certs Oct 16, 2024
@ivan-aksamentov ivan-aksamentov merged commit e717280 into master Oct 16, 2024
20 checks passed
@ivan-aksamentov ivan-aksamentov deleted the trs/rustls-tls-native-roots branch October 16, 2024 18:52
tsibley added a commit to nextstrain/docs.nextstrain.org that referenced this pull request Oct 21, 2024
…igurability

Not having to say here, "There's nothing you can do", was the driving
reason for me adding said configurability to Nextclade in the first
place!

Related-to: <nextstrain/nextclade#1536>
tsibley added a commit to nextstrain/docs.nextstrain.org that referenced this pull request Oct 22, 2024
…igurability

Not having to say here, "There's nothing you can do", was the driving
reason for me adding said configurability to Nextclade in the first
place!

Related-to: <nextstrain/nextclade#1536>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants