Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 4y ago · link · parent

Remember when the police rioted in 2020, shooting or beating lawyers and press in the streets? First amendment doesn't mean shit to cops.

comment 4y ago · link · parent

> I get that cops want to maintain some distance from crowds so they’re not swarmed.

Fuck what they want.

comment 4y ago · link · parent

That's not going to work.

a) The police don't give a shit about the law, nor are they required to know it

b) They'll just walk towards you, say you're breaking the law for filming, break your phone, beat the shit out of you and/or shoot you

c) It was always legal to do so. Now it isn't.

comment 4y ago · link · parent

Yes, Putin is a piece of shit, unfortunately.

comment 4y ago · link · parent

I think you'll find that in the course of making an actual formal proposal there are more caveats than you might imagine, and not necessarily as many upsides.

For example, just off the top of my head;

2FA as a general solution allows for U2F, which is significantly safer than your solution, even if it also allows for TOTP, which is "only" as safe as your solution.

It's also a change in user experience. Migrating users with existing passwords over to these new passwords may be more difficult for any number of reasons.

That's just a few seconds of thought. A real proposal might explicitly address these concerns. Like I said, feel free to make that proposal. A post on HN is not going to cut it, and it isn't going to help anyone. If you want to be more involved in how PyPI is maintained I suggest you do so.

comment 4y ago · link · parent

One obvious difference is that 2FA prevents the attacker from taking ownership of the package and distributing a malicious version, vet theoretically prevents installation of the malicious version. The vet approach comes into play much later.

Also, as I mentioned before, there's no evidence whatsoever that the 'vet' approach even works, let alone scales.

comment 4y ago · link · parent

> which started out as the butt of every supply chain joke

Mostly because 99% of developers knows nothing about supply chain attacks and leftpad blew up.

Both npm and rust should force 2FA. Thankfully, crates.io forces github SSO, and github will eventually force 2FA.

comment 4y ago · link · parent

PyPI is so easy to self host it's almost a joke. You can run a single python simple http server (one command) and use specific file system layout and you have a compatible pypi.

If there is such a significant mismatch in what pypi is going for vs contributors, people will migrate to another solution.

comment 4y ago · link · parent

So make a proposal for them to do that.

comment 4y ago · link · parent

I suppose so. To me, 2FA is solving the "who manages the package" whereas vet is a solution for distributed auditing of what the package does. Ultimately their goals align in that they're both trying to prevent an attacker from manipulating the code and having that successfully deploy to users' systems.

I think they're just so wildly different in every way that it's hard to say they're solving the same problem unless you zoom way out.

The reality is, however, that the `vet` approach has never been shown to work at scale, and 2FA has. 2FA has decades of implementation work, threat modeling, etc. `vet` is a one off tool for Rust and no integration into the wider ecosystem.

I would love to see a `vet`-like tool for PyPI, I would love that, but saying "we could have used vet" is really glossing over a lot of practical issues.

> . On the other hand, they are the de-facto standard and are, in my opinion (perhaps a bit far fetched and certainly not as malicious as Google) the Play Store of the python world.

Yeah, sure. At the same time, why is it that open source maintainers get to say "I have literally 0 ethical responsibility to do anything ever"? That's the status quo - maintainers who distribute their code through these repositories owe you nothing. We accept that. But we don't hold the same thing true for the package repository? They suddenly owe the maintainers something?

More directly, maintainers have their goals, repos have their goals, users have their goals. They'll align where they can, but no one is beholden to anyone else, and we can't really change that.

comment 4y ago · link · parent

That's not the symmetrical position. PyPI demands nothing of anyone. It provides a free service with terms of use.

comment 4y ago · link · parent

The difference between a password manager and TOTP is that TOTP is something PyPI can enforce and a password manager is not.

Yes, TOTP adds very little advantage when you have an already safe password. But there is no way for PyPI to know if you're doing that or not, and they can know if you're using 2FA.

> 99% of people affected by this mandate (and 99.9% of 2FA users in general) are going to use an implementation with these weaknesses

Time will tell. PyPI is giving away free keys, presumably to encourage adoption of the safer option.

I'm actually very happy to see maintainers go. If they weren't willing to enable 2FA I worry about what other issues their software poses.

comment 4y ago · link · parent

Please keep up the excellent work, I'm very encouraged by what I'm seeing from PyPI.

comment 4y ago · link · parent

You don't have to do anything?

comment 4y ago · link · parent

> Maybe there is none, maybe there is. The consequence however undoubtedly is that if you do not accept the terms you lose access to your package on PyPI.

Right but I just don't get why this is notable or why anyone would ever be surprised by this, or why this would ever be controversial. I just can not wrap my head around this being framed as a complex issue when it seems so very straightforward.

comment 4y ago · link · parent

You can't say that's more correct. That's a prediction about the future that's based on nothing, as far as I can tell. Does PyPI have a history of increasing, unwelcome restrictions?

I mean, of course you have to continuously accept terms of use changes as you publish to them. That is the same as anything else. To tack on a bit of additional conversation,

"Hi, I previously published v 0.1, I would now like to publish v 0.2"

"OK, cool, we have a new EULA if you want to publish 0.2"

"Great, no problem, signed and now I'll publish" / "Ah, I don't like those new terms, I'll publish elsewhere or not publish at all"

I don't get the complication here.

comment 4y ago · link · parent

I don't really see the problem. You put the code online and someone published it to PyPI. That you got what effectively amounts to spam emails because of that doesn't seem pertinent. Just block the emails. Unfortunately, putting out public communication addresses like emails does indeed invite all kinds of unwanted, unsolicited messaging.

Why not just ignore that like any other spam?

comment 4y ago · link · parent

> They could collect the source and vet the updates all kinds of other ways than demanding the author jump through hoops for them, for free.

At minimum it's completely unproven that that would be practical, whereas 2FA is trivial and has been widely deployed for decades.

But if you feel strongly about this feel free to make a formal proposal. There are some nascent projects exploring this area that you could draw inspiration from and I'd certainly welcome tooling in that area.

comment 4y ago · link · parent

> Disappointed to see you folks get caught up on the question of 2FA and not a single mention of @mitsuhiko's discussion of solutions, such as vetting as a service.

Comparing 2FA and vet is done at the end of the article and isn't, in my opinion, overly relevant. It's more of an example of "we could have solved this at a lower burden", which I don't believe is actually true (and I'd happily discuss that), but more importantly doesn't change the actual important bit of the article, which is about the relationship between users, maintainers, and distributors.

comment 4y ago · link · parent

> they just ask that package authors should not be burdened with even more work the more their creation becomes popular, and that the burden should be on users who care about it...

Yes, the "having the cake" would be the ability to publish code to pypi and the "eating it too" would be the abdication of responsibility to abide pypi policy.

comment 4y ago · link · parent

OK, I'll skip the obvious analogy. PyPI is a free, open source service. It hosts packages for distribution. When you go to PyPI you say "Hi, I would like to distribute software, can you do this?" and they say "Yes, you can do this for free. There's some terms of use, and we require 2FA."

You can say "Great, I accept all of that, thanks for providing distribution of my code for no monetary cost to me" or you can say "Ah, ok, thanks anyways but I would prefer not to accept that".

Is that clearer?

comment 4y ago · link · parent

If you walk into my house and I ask you to take off your shoes, you can turn around and walk away. I am well within reason to make that demand - it's my house.

comment 4y ago · link · parent

So what? Users can do that if the maintainer chooses to move hosting.

comment 4y ago · link · parent

To tack on, they're actually giving away those tokens for free for those who request one.

https://pypi.org/security-key-giveaway

They're being beyond reasonable. This is outright kind.

comment 4y ago · link · parent

They solve different problems. Given a signed package I can say "this is signed by that key". I can't say how that key was registered, or who registered it, etc. 2FA would be where that key registration actually happens.

comment 4y ago · link · parent

Feel free to just... not publish to pypi.org. You can run your own pypi if you'd like, it's pretty trivial. Or you can just put your code on github. Or pastebin. Or nowhere.

As for cargo-vet vs 2fa, as the article mentions (but I think bears emphasis), they solve different problems.

Sorry but I just do not care at all about this "burden" that you may feel because you've been asked to enable 2FA for a site that hosts your code for free.

A lot of this article also seems to boil down to some sort of slippery slope. 2FA today, package signing tomorrow, the end of the world next week? I'm unconvinced.

Ultimately,

> I think as an Open Source developer who is using the index for free, I can't demand much from it.

I feel like the article could have been this one line, and then there could have been a separate post discussing the merits of 2fa vs vet.

comment 4y ago · link · parent

OK? So more people use TOTP and there's a marginal security win. And maybe a few use a token, and there's a significant win.

comment 4y ago · link · parent

They've been offering people hardware keys for free.

https://pypi.org/security-key-giveaway/

comment 4y ago · link · parent

If there's an extreme AWS outage, you're pretty much stuck to in-person or POTS.
1
373839
164