unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org, Alex Kost <alezost@gmail.com>
Subject: Re: Checking signatures on source tarballs
Date: Wed, 07 Oct 2015 14:06:04 +0200	[thread overview]
Message-ID: <87k2qy7uj7.fsf@gnu.org> (raw)
In-Reply-To: <8737xntorr.fsf_-_@netris.org> (Mark H. Weaver's message of "Tue, 06 Oct 2015 22:07:20 -0400")

Mark H Weaver <mhw@netris.org> skribis:

> IMO, we should rather be going in the other direction, to formalize and
> automate the checking of signatures.  IMO, our 'origin' objects should
> include a set of fingerprints of acceptable GPG signing keys for that
> package, as well as information on how to find the signature (in cases
> where it cannot be guessed).

I thought about it (it used to be in TODO), but this design has several
problems.  One of them is that a keyring is needed if we are to verify
signatures; where do we get it?

Another one is that, inherently, the daemon already handles integrity
checks for fixed-output derivations, and authentication should really be
made beforehand by the packager.

Most of the time the authentication model is trust-on-first-download:
The packager fetches upstream’s public key when they first download a
tarball (so this particular phase is subject to MiTM), and subsequent
downloads are checked against the key that’s already in the packager’s
keyring.

> This would have several beneficial effects:
>
> * If the packager downloaded a key belonging to a man-in-the-middle
>   (quite possible given that we rarely have a validated chain of trust
>   to the developer), then that bad key will be stored in our git repo
>   for all to see, allowing someone to notice that it's the wrong key.

So you’re suggesting to put the keyring under version control in a way,
right?

It sounds like a good idea, provided we at least the Git commits that
add/modify the keyring are signed.  There’s a couple of issues: unless
it can be stored in a plain-text format, it’ll be hard to audit changes
that are made; it would quickly end up containing hundreds of public
keys, so there’s a scalability issue: how do we keep it up-to-date? how
do we decide who’s authorized to update it, etc.?

First step would be to be able to do something meaningful with the GNU
keyring.  It’s at ftp.gnu.org/gnu/gnu-keyring.gpg, but it’s currently
unsigned; previous attempts to do something about it haven’t gone
anywhere, but we could try again.

> * When the package is later updated, it will not be possible for a new
>   man-in-the-middle attack to be made on us.  If a new signing key is
>   used, we cannot fail to notice it.  It will raise a red flag and we
>   can investigate.
>
> * It would strongly encourage packagers to do these checks, and make it
>   obvious to reviewers or users when the packager failed to do so.  It
>   would also make it easy to find unsigned packages, so that we can
>   encourage upstream to start signing the packages, at least for the
>   most important ones.

As Andreas notes, outside of gnu.org, savannah.gnu.org, kernel.org, and
a few others, it’s very frequent for packages to not be signed at all.

> Also, our linter should download and check the signature, so that it's
> easy for others to independently check the verification done by the
> original packager.

‘guix import gnu’ and ‘guix refresh’ already do that, but only for GNU
packages.

I have been thinking that ‘guix download’ could also automatically look
for .sig, .sign, and .asc files.  That’s easily done, and already an
improvement.

Thoughts?

Ludo’.

  parent reply	other threads:[~2015-10-07 12:06 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 13:04 emacs: devel: Add lint/download commands Alex Kost
2015-10-02 13:04 ` [PATCH 1/4] emacs: Add 'guix-devel-with-definition' Alex Kost
2015-10-03 20:31   ` Ludovic Courtès
2015-10-02 13:04 ` [PATCH 2/4] emacs: Add 'guix-devel-download-package-source' Alex Kost
2015-10-03 20:35   ` Ludovic Courtès
2015-10-04 13:39     ` Alex Kost
2015-10-04 16:57       ` Ludovic Courtès
2015-10-04 18:28         ` Alex Kost
2015-10-05 15:55           ` Ludovic Courtès
2015-10-06 15:11             ` Alex Kost
2015-10-07  2:07               ` Checking signatures on source tarballs Mark H Weaver
2015-10-07  3:18                 ` Christopher Allan Webber
2015-10-07  8:29                 ` Andreas Enge
2015-10-07 12:06                 ` Ludovic Courtès [this message]
2015-10-07 14:09                   ` Mark H Weaver
2015-10-07 18:05                     ` Leo Famulari
2015-10-07 20:59                     ` Ludovic Courtès
2015-10-08 11:44                       ` Ludovic Courtès
2015-10-12  8:37                         ` Brandon Invergo
2015-10-12  9:18                           ` [bug-gsrc] " Brandon Invergo
2015-10-12 16:38                             ` Ludovic Courtès
2015-10-12 21:26                               ` Brandon Invergo
2015-10-12 21:34                                 ` Ludovic Courtès
2015-10-12 22:06                                   ` Brandon Invergo
2015-10-13  9:47                                     ` Ludovic Courtès
2015-10-12 16:39                           ` Ludovic Courtès
2016-02-22  4:20                             ` Christopher Allan Webber
2015-10-10  7:22                       ` Alex Vong
2015-10-10 17:03                       ` Mark H Weaver
2015-10-11 17:44                         ` Ludovic Courtès
2015-10-14  5:33                       ` Rastus Vernon
2015-10-15 13:33                         ` Mark H Weaver
2015-10-07 17:45                 ` Alex Kost
2015-10-07 12:23               ` [PATCH 2/4] emacs: Add 'guix-devel-download-package-source' Ludovic Courtès
2015-10-07 17:25                 ` Alex Kost
2015-10-07 19:15                   ` Ian Denhardt
2015-10-09 12:14                     ` Alex Kost
2015-10-07 22:10                   ` Ludovic Courtès
2015-10-08 11:27                     ` Alex Kost
2015-10-08 11:46                       ` Ludovic Courtès
2015-10-09 12:08                         ` Alex Kost
2015-10-09 12:17                           ` Ludovic Courtès
2015-10-09 14:00                         ` [PATCH] emacs: Add 'guix-devel-build-package-source' Alex Kost
2015-10-11 18:33                           ` Ludovic Courtès
2015-10-08 14:43                       ` [PATCH 2/4] emacs: Add 'guix-devel-download-package-source' Christopher Allan Webber
2015-10-08 15:03                         ` Ludovic Courtès
2015-10-02 13:04 ` [PATCH 3/4] lint: Export 'run-checkers' Alex Kost
2015-10-03 20:36   ` Ludovic Courtès
2015-10-02 13:04 ` [PATCH 4/4] emacs: Add 'guix-devel-lint-package' Alex Kost
2015-10-03 20:44   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2qy7uj7.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).