rubygems-trust / rubygems.org

The Ruby community's gem hosting service.
https://rubygems.org
MIT License
16 stars 2 forks source link

Proposal 3: "SSH style" #5

Closed m-o-e closed 9 years ago

m-o-e commented 11 years ago

SSH-Style validation

("SSH-style" refers to prompting the user when he encounters a key for the first time, this scheme has nothing to do with SSH otherwise)

Advantages

This is open for discussion, it seems to be a difficult problem in this scheme.

What about convenience?

Being prompted for 400 gems of your rails project is obviously not nice. Hardly anyone is going to verify all of them thoroughly.

I would propose that trusted entities (37signals etc.) frequently publish a list of signing key fingerprints that they trust.

Users could then, in addition to manually trusting individual keys, add such lists to a configuration file, and their local rubygems instance would automatically import trust from there.

The rubygems-program must make it very easy to publish and consume such trust-lists.

Paranoid projects could still refrain from using trust-lists and validate all their gems by hand.

What could it look like in practice?

Early on users would be confronted with many validation prompts. Many users will probably turn validation off for that reason. As adoption grows, and if we add the "trust-list" convenience, people may quickly build a baseline trust-list and then only receive prompts when they install new, relatively unpopular gems.

Final words

  1. It's an imperfect scheme, but so are all others that I have seen so far.

    The main argument for this scheme would be the simplicity, as most of the code already exists and no centralized infrastructure is required.

    I'm not married to this idea, I just felt it should be written down as a counter-weight to the more complex schemes (the optimal solution is probably somewhere in the middle).

  2. The convenience mechanisms outlined above would re-invent a few wheels that already exist (PGP). Just using PGP directly might thus be preferable, but requires a higher implementation effort.
danielknell commented 11 years ago

feels like much of this is covered in https://github.com/rubygems-trust/rubygems.org/issues/4

tarcieri commented 11 years ago

According to @evanphx who is one of the principal maintainers of RubyGems, GPG is a non-starter. See #9

m-o-e commented 11 years ago

@tarcieri This proposal does not use PGP. It uses the existing x509 impl (nearly unchanged).

tarcieri commented 11 years ago

@m-o-e my bad, was trying to flag the proposals using PGP/GPG, didn't read hard enough ;)

Geal commented 11 years ago

SSH style is appropriate when you know the other party, or know someone who trusts the other party.

The two common cases:

Here, you are in the case where you have to trust a lot of parties that you do not know, so SSH-style might not be the best system. Your idea of relying on someone else to gather lists of keys might be good, though: it allows you to separate the gem handling (which could be decentralized or torrented, for what it's worth) and the key management, which could rely on multiple points of trust to provide "trust agility" (see convergence.io for mor info on the concept).