-
Notifications
You must be signed in to change notification settings - Fork 894
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
Re-add rustls support (enabled by setting RUSTUP_USE_RUSTLS) #2517
Conversation
I haven't added ability to use the native TLS stack via an env var, because reqwest lacks support for that (it will just always prefer the native TLS stack over rustls), and because users wanting to use openssl already have an option with the RUSTUP_USE_CURL env var. |
If you want env var configurability, please leave a comment, because it'll require reqwest changes. |
Mhh seems that env var configurability was easier than thought. |
Anyone know what the cause of this can be? It only occurs on mac OS:
|
2b84c6b
to
a3b4b9e
Compare
Apparently doing |
Alright as the other PR has a proper fix for the issue I've removed the local hack and leave the fix for @ehuss 's PR. |
Thank you for this work - have you confirmed that |
Currently the rustls mode of reqwest uses the mozilla provided certificate store through the Note there are cons of using native certificates as well. rustup's entire security model depends on https only (cc #2028). But I guess that's a separate issue from rustls adoption. If rustup used curl previously, it can now use rustls. |
How does |
@kinnison yes, an update would be needed to get newer root certificates. I think there is no way around a mode for using the OS certificate store. |
Hmm, I think I need to spend more time thinking on this than I have right now. Thank you for that link though. @rbtcollins what do you feel about this PR? |
Ok this should be the reqwest change: seanmonstar/reqwest#1058 Ignore the rustls-native-roots PR. It won't be required to switch rustup to rustls. I've updated this PR to use my reqwest fork so that users can test this PR. @kinnison do you know the users with a proxy setup that relies on OS native certificates? Could you maybe ask them to try this PR whether there is any regression for them? Should rustls maybe not be enabled by default for now to enable a testing phase? |
I think this is a feature whose behaviour is hard to verify in direct
testing; as such I'm very much in favour of having it working but not
default in at least one release cycle, and encouraging testing of it before
we switch over.
Re: native certs - yes, we explicitly should use the native trust store:
- rustup releases rarely, because:
- rustup releases are expensive and tricky to do
- making it a security driven issue to do more will put stress on systems
that are not yet ready to be driven fast
…-Rob
|
7ed5cdf
to
6d0fc25
Compare
This branch is currently in conflict with |
@kinnison I've rebased it but the FIXME's are still unfixed, so CI will fail, and it will still use a forked version of upstream reqwest :). |
@est31 Thanks, it's okay I just wanted to be sure the diffs were clean so I can think about things. Obviously I agree it's not mergeable yet :D |
f5f95d8
to
66ecdc3
Compare
All the blockers are resolved. Ready for review now @kinnison ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is okay, and default to "not rustls" @rbtcollins How do you feel about this? It's easily backed out if it proves out as bad, but it shouldn't be harmful to include this as optional support. I'm not interested in documenting this publically yet though.
Default off with no new dyn depends is fine with me
…On Sat, 21 Nov 2020, 22:42 Daniel Silverstone, ***@***.***> wrote:
***@***.**** commented on this pull request.
I believe this is okay, and default to "not rustls" @rbtcollins
<https://github.com/rbtcollins> How do you feel about this? It's easily
backed out if it proves out as bad, but it shouldn't be harmful to include
this as optional support. I'm not interested in documenting this publically
yet though.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2517 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADZ7XQTQYN6YQFYNOWUNQDSRAX3TANCNFSM4SKDUCSA>
.
|
@kinnison why do you not want to document it publicly? I think it should be so that users can be asked to try it out as the intention is to make it default some point in the future. |
@est31 Sorry, I was perhaps not clear. My intent would be that after 1.23 we merge this. Then we can seek targetted feedback by asking for people to build master and try it. When we're confident there's no reason to exclude it from a release we can release with it in, but disabled. At that point we seek further engagement with the feature, and document it in our book. Given we're still not comfortable disabling CURL support I'm really going to be dealing with this cautiously. |
Oh so that's your plan. Note that it's entirely opt-in. I'm not sure what could go wrong if you don't enable it (the PR makes it opt-in at runtime), so I'm not sure something is gained by that proposal. But shrug. Better it gets in later than never :). |
Oh hmmmm .... the new release is in staging already. Yeah then it's better to wait for the one after that. https://internals.rust-lang.org/t/new-rustup-release-staged-and-needing-testers/13446 |
rustls is seen as mature enough for curl to depend on it optionally, and it recently has had an audit. This commit adds back rustls support removed by 86bb185 and enables it by default. You can opt out of rustls use by setting the RUSTUP_AVOID_RUSTLS env variable.
Defaulting to native-tls so that users can try out the rustls mode before it's turned on by default.
Rebased onto the 1.23.0 release |
I think it's time to take this on and see how we do. @est31 it would be good if you would switch your local use of rustup to use this feature so we can check it more thoroughly. I shall endeavour to do so as well. |
Good idea! I assume you install rustup locally by doing |
You can do |
rustls is seen as mature enough for curl to depend on it optionally,
and it recently has had an audit.
This commit adds back rustls support removed by 86bb185
You can opt into using rustls by setting the RUSTUP_USE_RUSTLS env variable.
Blockers:
TODO:
RUSTUP_USE_RUSTLS
Fixes #568