3 ms·
I am a mild proponent of namespaces. But adding them means you are now managing an identity layer, which is not something that a volunteer organization wants to
by kibwen 5y ago
I am a mild proponent of namespaces. But adding them means you are now managing an identity layer, which is not something that a volunteer organization wants to deal with. In a flat namespace, users don't expect that a google-foo library is actually from Google. But with namespaces, people expect that everything under the google/ namespace actually is officially supported by Google. So when the initial rush to register names happens, who verifies that Google owns the google/ namespace? And not just for Google, but for every litigous trademark-defending organization under the sun? And since the package repository is supposed to be immutable, you don't want to wantonly delete crates from namespaces that they originally registered. Likewise, you can't go transferring ownership of a namespace from one entity to another, because that violates the security assumptions of your users who originally trusted the original owner of the namespace and not the new owner.
Identity layers are hard. It's a problem worth solving, but it's not going to happen on a volunteer basis. It needs full-time paid employees to deal with this. Perhaps the Rust Foundation will make such a thing a priority.
- brabel 5y agoThese problems you raise have been solved problems for a long time. Maven Central uses verified reversed domain names, so to own `com.google` you need to prove you own the domain `google.com`. It's not hard to do it. Dart's pub does the same thing with verified publishers. crates.io already requires user accounts from publishers, so it already manages identity. The only reason they don't require namespaces is to make crate names look cooler and the barrier to entry non-existen, so they can amass large numbers of packages in a short time (then deal with the fallout only when it becomes an emergency), I can't see any other reason anywhere, including from the ones you've raised.
- teddyh 5y agoWhen (not if) a domain name expires or changes ownership, how is this detected and the connection re-verified?
- brabel 5y agoIt's interesting people like to bring this up because this is also a non-issue as a publisher needs to provide PGP keys... if the domain expires and someone else takes it over, their PGP keys will be different and it's up to users to decide whether to trust those... When a domain changes hands, it's also up to users to decide whether to trust the new owner's TLS certificate... I am saying this because this is forms the basics of Internet security, when people bring this argument up, they show a certain ignorance of how things work on the Internet in general.
- teddyh 5y agoSaying it’s “up to users to decide whether to trust those” is simply saying that the problem is currently not solved. I mean, either the package is tethered to a domain name or a PGP key. Pick one. You can, of course, have both, if you use DNSSEC and DNS “PGP” records; the PGP key is then validated by the DNS.
- brabel 5y ago> Saying it’s “up to users to decide whether to trust those” is simply saying that the problem is currently not solved. Again, Internet security is mostly based on trust and there's no way around that: when you enter a URL on a browser, you need to trust that the domain belongs to who you think it belongs, and the only way you have to do that is to trust its TLS certificate... which you do by explicitly trusting your browser to only recognize reliable TLS certificates signed by a legit root certificate authority... unless you decide to whitelist TLS certificates yourself by obtaining the domain's root certificates out-of-band, something nobody seems to think necessary to do, even the most security-conscious government agencies probably go to that kidn of trouble. Basing package ownership on the same kind of mechanism is the best you can ever do... if you consider that as not being a good enough solution, then you should never use the internet with consumer-grade browsers at all, let alone use package managers in any form.
- teddyh 5y ago
- kibwen 5y ago> crates.io already requires user accounts from publishers, so it already manages identity. It currently requires a Github account, but the registry is not tightly coupled to Github. But once you introduce Github identities as something that code is explicitly depending on, now you're at the mercy of Github for the rest of time. Furthermore, immutability is a desirable property of package registries, and Github identities are not immutable; Github allows people to change their usernames and then allows any random person to snap up the old username. > The only reason they don't require namespaces is to make crate names look cooler and the barrier to entry non-existen, so they can amass large numbers of packages in a short time No, this is needlessly conspiratorial. Please exercise some perspective. crates.io is run by volunteers, and managing an immutable identity layer is not something that the current crop of volunteers wants to commit to.