Go to file
Dave Borowitz c5861d81cb Add basic signed push support
Add a simple pre-receive hook using JGit's new signed push support to
verify certificates. The hook checks the nonce status and validates
the signature against a stored public key.

Public keys are stored in a special notes branch refs/gpg-keys[1],
where the annotated "object" is the GPG key ID right-padded with
zeroes to SHA-1 length.This allows us to easily reuse the existing
notes fanout code for read/write; this is appropriate since key IDs
should be more or less uniformly distributed across the 64-bit space.
(A future implementation may not require right-padding of these
values, but this storage formatting change should not be hard to
introduce.)

This change does not address sitewide configuration of signed push and
nonce verification; it depends on the existing receive.certNonceSeed
configuration option in each repository. Likewise, it does not
address adding keys to All-Users or establishing trust. Adventurous
admins will have to populate that ref by hand for now.

Tests for this functionality will be difficult, since the JGit client
does not yet have client support for signed push. (And it's unclear
when it will, since upstream probably does not want a Bouncy Castle
dependency.) For now, it is only manually tested.

[1] Although the technical name in RFC 4880 is "OpenPGP", we use
"GPG" for consistency with C git, which uses the gpg tool by
default and uses "gpg" in config option names.

Change-Id: I9f75b132ca242b5cbce65e66f5e4904c92bcae8f
2015-06-24 07:22:41 -07:00
2014-12-18 11:16:03 +09:00
2015-06-23 21:11:57 +02:00
2015-05-10 20:03:16 +02:00
2015-03-03 07:12:16 +00:00
2013-11-09 07:45:00 +01:00
2015-04-08 07:50:41 +00:00
2015-06-17 21:42:42 +02:00
2008-11-14 16:59:34 -08:00
2009-03-27 20:20:10 -07:00
2015-06-11 15:20:35 +02:00
Description
RETIRED, Gerrit as used by OpenStack
120 MiB