Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Security and Comparison of Portage with other Package Managers
Date: Sun, 08 Mar 2015 05:45:06
Message-Id: 20150307214459.7e348b93.dolsen@gentoo.org
In Reply to: Re: [gentoo-portage-dev] Security and Comparison of Portage with other Package Managers by Zac Medico
1 On Sat, 07 Mar 2015 18:31:44 -0800
2 Zac Medico <zmedico@g.o> wrote:
3
4 > On 03/07/2015 05:24 PM, Brian Dolbec wrote:
5 > > On Sat, 07 Mar 2015 15:26:26 -0800
6 > > Zac Medico <zmedico@g.o> wrote:
7 > >
8 > >> On 03/06/2015 09:50 AM, Mark Kubacki wrote:
9 > >>> We're on the same side here.
10 > >>>
11 > >>> Do we have numbers showing the ratio "portage used with defaults"
12 > >>> vs. where "[webrsync-gpg] is described in many hardening guides
13 > >>> for gentoo and widely used among the security conscious" applies?
14 > >>>
15 > >>> DNS not being encrypted is just painting the whole picture. Point
16 > >>> is, the default is that "emerge --sync" results in a transfer
17 > >>> using RSYNC (or http).
18 > >>>
19 > >>> And by default you cannot compare the result with any
20 > >>> authoritative source.
21 > >>>
22 > >>
23 > >> Ideally, we can rely on security mechanisms built into git [1],
24 > >> possibly involving signed commits.
25 > >>
26 > >> [1] https://github.com/gentoo/gentoo-portage-rsync-mirror
27 > >
28 > >
29 > > Actually, git makes it nearly impossible to get the correct info
30 > > required to re-process the git commit signature. It is all embedded
31 > > into the commit itself, but not in a way for gpg to be able to
32 > > re-verify it. Git relies on the issuer's gpg verification status
33 > > which it records in it's data before the push. So, without some
34 > > major hacking on git data, it is not viable for routine
35 > > verification purposes.
36 >
37 > Maybe we can use the relatively recently added git verify-commit
38 > command [1]. If we run that command with --verbose, then we can use
39 > that to verify that that a commit was signed with a trusted key.
40 > Shouldn't verification of the HEAD commit be enough to vouch for the
41 > integrity of the entire tree?
42 >
43 > [1]
44 > https://github.com/git/git/commit/d07b00b7f31d0cb6675b4bdba269ce7f087ddd24
45
46 GREAT! So, same as for push --sign, we just need to configure a
47 replacement gpg command for git that uses gkeys instead of gpg
48 directly.
49
50 That will simplify things over the previous.
51
52 A replacement gpg command is needed because of the way gkeys stores the
53 developer keys in separate keyrings. gkeys determines which keyring to
54 use and runs gpg with the correct settings. It is also capable of
55 searching is db for the correct keyring to verify against as well.
56
57 --
58 Brian Dolbec <dolsen>