News for hackers. Stuff that matters.
Re:Rust's 2019 Roadmap by Tomte on Tuesday April 23, 2019 @02:00PM (#19731140)
The MITM proxy issue makes Rust a non-starter in many corporate environments.

Unfortunately, when someone tried to make a first step, he was treated very poorly and his work was sabotaged.

I don't have much hope that it will be addressed again soon: https://github.com/rust-lang/rustup.rs/pull/1624#pullrequest...

It's really sad, because Rust started with the same good idea as Golang: treat Windows users as first-class citizens.

Re:Rust's 2019 Roadmap by pcwalton on Tuesday April 23, 2019 @02:39PM (#19731482)
That is a very uncharitable way to frame the linked discussion. Expressing concern about ignoring TLS certificates is not "sabotage".

Also, this doesn't have anything to do with Windows support that I can see.

Re:Rust's 2019 Roadmap by Tomte on Tuesday April 23, 2019 @02:45PM (#19731549)
Maybe "sabotage" was a bit strong, but the work seems to have been killed. Or is there some publically viewable discussion anymore?

It went from "rebase and I'll merge" to not a single word anymore about how it might be merged.

The Windows support thing is this: rustup/curl doesn't use Windows' own certificate store. Where employers put the TLS certificate for their intercepting proxies.

curl itself has the -k option, so the user can override the check (much, much easier than preparing a certificate bundle for curl – and since the employer intercepts and decrypts the traffic anyway, there is no security issue).

rustup calls curl without that flag. The pull request was to teach rustup to call curl with -k.

(I know that it doesn't solve the whole problem, because cargo itself needs to support it, as well)

Re:Rust's 2019 Roadmap by Arnavion on Tuesday April 23, 2019 @04:52PM (#19732721)
The reqwest backend (which uses native-tls and thus schannel and thus the Windows cert store) is the default on Windows, so it shouldn't be using curl. https://github.com/rust-lang/rustup.rs/commit/6389676b6bf211...

If you must use an older rustup, set `$env:RUSTUP_USE_REQWEST` (or `$env:RUSTUP_USE_HYPER` for an even older rustup) to `1`

Re:Rust's 2019 Roadmap by windwake12 on Tuesday April 23, 2019 @03:30PM (#19732017)
According to Google/SO curl can indeed be built/configured to use the Windows cert store, seems that would be a better fix?
Re:Rust's 2019 Roadmap by moosingin3space on Tuesday April 23, 2019 @04:41PM (#19732617)
Another fix could be to use Hyper with tokio-tls. Under the hood, that package uses Windows schannel, macOS SecureTransport, and a dynamically-linked openssl on everything else.
Re:Rust's 2019 Roadmap by littlestymaar on Tuesday April 23, 2019 @10:39PM (#19735098)
It already uses `reqwest`, which uses schannel. See https://news.ycombinator.com/item?id=19732721
Re:Rust's 2019 Roadmap by kibwen on Tuesday April 23, 2019 @02:17PM (#19731319)
> when someone tried to make a first step, he was treated very poorly and his work was sabotaged.

I must say, this is a rather dramatized way to frame the discussion in the linked PR, which, indeed, hasn't been closed and is still ongoing.

Re:Rust's 2019 Roadmap by steveklabnik on Tuesday April 23, 2019 @02:02PM (#19731154)
We've made other moves toward this kind of thing; for example, you can run your own crates.io instance. This is something we care about, but it's also something we want to make sure we do right. We'll get there. (Note also that that PR is not yet closed.)
Re:Rust's 2019 Roadmap by burfog on Tuesday April 23, 2019 @02:48PM (#19731584)
Wait, what are you checking? I hope it is package signatures, not web server certificates.

For security, my normal software development environment is off the internet. I can mirror a web site, but https would be trouble.

Re:Rust's 2019 Roadmap by steveklabnik on Tuesday April 23, 2019 @02:51PM (#19731623)
So, to be clear, the linked thread is about rustup. If you don't install rust via rustup, then the above issue will never happen to you. By default, it's checking that you have an SSL connection, yes.

You can fully build and develop Rust projects offline; this is a hard requirement of things like Debian and Firefox, for example.

Re:Rust's 2019 Roadmap by burfog on Tuesday April 23, 2019 @03:04PM (#19731752)
If rustup is the normal way to install rust, then that is exactly what I'd want to use. My employer would mirror the needed web sites. For example, my employer mirrors much of github and ubuntu and various Microsoft things. I just follow the normal instructions to fetch things on the internet, and it all works from the mirrored web sites.
Re:Rust's 2019 Roadmap by steveklabnik on Tuesday April 23, 2019 @03:06PM (#19731769)
It’s the default choice, yes. However, If you’re using Ubuntu you could also install it through apt, though you’ll get an older version.
Re:Rust's 2019 Roadmap by burfog on Tuesday April 23, 2019 @03:27PM (#19731991)
Note how Ubuntu does things correctly, using signatures on the packages. I can copy those to any web site.

Doing things that way helps you too. Mirrors, including caches, are easy to set up.

Installing via apt will not work for Windows users.

Re:Rust's 2019 Roadmap by steveklabnik on Tuesday April 23, 2019 @03:36PM (#19732082)
Sure, we check signatures too. (At least, Cargo does. I think rustup may not in some circumstances? I forget) It's about defense in depth.

I am a Windows user, I know that. That's why i said "if" :)

Re:Rust's 2019 Roadmap by Tomte on Tuesday April 23, 2019 @02:06PM (#19731198)
Thanks for working on it!

But I still think someone "official" should have weighed in and reined in the "what about security?" people.

That was pure ignorance. The security angle has been discussed, and "I don't know much about it, so let's kill it" is a really bad precedent.

Re:Rust's 2019 Roadmap by steveklabnik on Tuesday April 23, 2019 @02:11PM (#19731249)
Yes, part of the issue here is that there hasn't been a ton of ownership on rustup, and even the Cargo team has not had as much time and effort as we'd like. We're currently working on growing both teams, which means better ownership, which means someone to make these calls.

> "I don't know much about it, so let's kill it" is a really bad precedent.

I would agree, but a "completely ignore security" flag is something to be cautious about.

Re:Rust's 2019 Roadmap by staticassertion on Tuesday April 23, 2019 @02:47PM (#19731569)
> and "I don't know much about it, so let's kill it" is a really bad precedent.

I feel the opposite. Where user safety is concerned, if a problem is not understood the solution should not be implemented.

In an example where it's "disable security feature X", and the developers don't know the implication, would you really want them to just say "well whatever, I don't understand the implications, but let's push forward" ?

Re:Rust's 2019 Roadmap by Tomte on Tuesday April 23, 2019 @02:49PM (#19731594)
It's fine to say "let's clear this question up" and proceed to clear it up.

It's not fine to use security as the big hammer that cannot be argued with, and then – nothing happens. At least not publically. Note that there wasn't even a word where it might be discussed.

I actually went looking for Rust development mailing lists, but found no discussion.

Re:Rust's 2019 Roadmap by Manishearth on Wednesday April 24, 2019 @01:56AM (#19735905)
It's not the big hammer that can't be argued with. There's a path forward there: bring in security experts to weigh in on this. This hasn't happened. It could, and when it does there may be progress.

Rust doesn't quite have a team for this yet (there's a security WG slowly spinning up though) which probably explains why it's kinda stalled.

Ultimately there's no obligation here for the team to do the legwork for this PR anyway. It's blocked on something, and while that's resolvable you can't blame the team for not pushing on it.

(I did just ping someone knowledgeable in security matters about this, let's see what they say)

Re:Rust's 2019 Roadmap by wyldfire on Tuesday April 23, 2019 @04:37PM (#19732580)
> I actually went looking for Rust development mailing lists, but found no discussion.

Here's a time [1] when someone mentioned rustup in context with TLS (it's release notes for 0.1.9). It's not that there's no forum to discuss these things.

If the discussion is missing, it's likely because it hasn't mattered enough for anyone to bring up yet. Rust is much more bazaar than cathedral. A GH issue like "my company's MITM proxy breaks rustup" doesn't mean that the Rust dev team drops what they're doing and rallys to solve this problem. Even if it comes with a PR, it doesn't mean that Rust should be forced to either accept the PR or shift resources to make the PR satisfactory.

> It's not fine to use security as the big hammer that cannot be argued with

People place an enormous amount of trust in their compiler and the tools ecosystem that surrounds it. It's extremely wise to be hesitant to permit an opt-out for a security feature.

Here's the real crux of the matter: if one wants a feature in your favorite open source project, they kinda have to be willing to hustle a bit. Nag some design owners about what is unsatisfactory about your proposed approach and what other design options might work instead. For all of the examples that you might find in other languages' ecosystems that already support this kind of a feature, you should be thankful that someone before you came across the problem and doggedly pursued a solution. But it's not a systemic problem that Rust doesn't have a solution yet: just another feature-in-development in the queue.

> and then – nothing happens

This is remarkably common among open source projects. Code contributions wither on the vine because it can sometimes be a lot more work than someone's interested in to push it upstream. IMO Rust is actually better than the average open source project in this regard (meaning fewer orphaned patches).

[1] https://internals.rust-lang.org/t/beta-testing-rustup-rs/331...

Re:Rust's 2019 Roadmap by staticassertion on Tuesday April 23, 2019 @06:01PM (#19733390)
> It's fine to say "let's clear this question up" and proceed to clear it up.

I think the issue is that no one had the expertise to clear it up. So how do you move forward?

Someone has to get called in and there's no process for that. Or the person pushing the feature needs to explain the security implications of the feature.

Maybe some sort of 'requires security triage' tag could get applied to issues like this, and the rust security wg or whoever is qualified ot make these calls could review.

Ultimately, my opinion is that if you're making a PR with security implications, and there are people saying "I'm uncomfortable and don't understand the security implications", it's on you to explain them.

Otherwise progress should not continue.

Re:Rust's 2019 Roadmap by wyldfire on Tuesday April 23, 2019 @03:33PM (#19732046)
> The MITM proxy issue makes Rust a non-starter in many corporate environments.

IMO those corporate environments are reaping what they sow. We shouldn't be so quick to disable TLS. Who would be to blame if those corporate environments found rustup as an attack channel for getting trojans? My guess is that rust would be a convenient scapegoat in that case.

Also, I believe that some of them may create intercept exceptions for 'legitimate' software distribution channels (like pip/npm/etc). Maybe they just need one for crates.io.

Re:Rust's 2019 Roadmap by Tomte on Tuesday April 23, 2019 @03:35PM (#19732069)
Have you tried telling Chrome, Firefox and every other browser the same? They all do "the insecure thing", showing you a green lock for intercepted content.

Because it's signed by a company certificate in the certificate store.

Re:Rust's 2019 Roadmap by wyldfire on Tuesday April 23, 2019 @04:25PM (#19732471)
Yes, if you update the certificate store then rustup won't complain. So the feature request is for a way to update the certificate store (or more easily do so)? That's way different from the GH issue "turn checking off when this env var is set".
Re:Rust's 2019 Roadmap by fxfan on Tuesday April 23, 2019 @02:43PM (#19731520)
rust 100% treats windows as first class, if anything, I vaguely recall being dosappointed about something available in Windows and not on my Linux machine.

also, there are now alternative crate registering.