From: "Jason Pyeron" <jpyeron@pdinc.us>
To: "'GIT'" <git@vger.kernel.org>
Subject: Signinig a commit with multiple signatures
Date: Sun, 17 Aug 2014 09:30:47 -0400 [thread overview]
Message-ID: <DED50992A39F4A07ACD997A65602991E@black> (raw)
In-Reply-To: <20140817075250.GH23808@peff.net>
[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]
I am working on an open source project right now where we are looking to enforce a N of M audit approval process. It turns out that git supports verifying multiple signatures because gpg supports signature merging.
My question is how can this workflow best be added into git and if not added atleast supported.
Here are the manual procedures (scripts are in the bundle too):
> Procedures:
>
> 1. Identify a normal commit.
> 2. create a new commit file as:
> parent commit-id-of-step-1
> tree tree-id-from-git-cat-file-commit-commit-id-of-step-1
> author CipherShed Security Team <security@ciphershed.org>
> timestamp timezone
> committer Actual Person <username@ciphershed.org> timestamp timezone
> gpgsig output-from-merge-sig-tool [1]
> more-output
> more-output
>
> Comments for this commit
> ...
> ...
>
> 3. run ruby script [2] to add commit to git db
> 4. git update-ref refs/heads/BRANCH-NAME new-commit-id
To do this most properly I feel like there needs to be a way to "share" the repository state and intterrupt the commit process.
Comments?
1:
$ cat merge-multisigs.sh
#!/bin/bash
(
for i in "$@"
do
gpg --dearmor < "$i"
done
) | gpg --enarmor
2:
$ cat write-commit.ruby
#!/usr/bin/irb
require 'fileutils'
file = File.open(ARGV[0], "rb")
content = file.read
header = "commit #{content.length}\0"
store = header + content
require 'digest/sha1'
sha1 = Digest::SHA1.hexdigest(store)
require 'zlib'
zlib_content = Zlib::Deflate.deflate(store)
path = '.git/objects/' + sha1[0,2] + '/' + sha1[2,38]
FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'w') { |f| f.write zlib_content }
P.S. This was inspired by actual events and the parent thread.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
[-- Attachment #2: multisign.bundle --]
[-- Type: application/octet-stream, Size: 2949 bytes --]
next prev parent reply other threads:[~2014-08-17 13:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 4:59 Sharing merge conflict resolution between multiple developers Chris Packham
2014-08-11 18:44 ` Junio C Hamano
2014-08-11 23:29 ` Chris Packham
2014-08-12 1:57 ` Junio C Hamano
[not found] ` <CAP8UFD0_zfB_D-9EVZ4K=Zdq_G+9C-QhX7WED53zExV+Nv8Arg@mail.gmail.com>
2014-08-11 18:57 ` Christian Couder
2014-08-11 19:33 ` Nico Williams
2014-08-17 7:52 ` Jeff King
2014-08-17 13:30 ` Jason Pyeron [this message]
2014-08-19 8:05 ` Signinig a commit with multiple signatures Jeff King
2014-08-19 13:09 ` Jason Pyeron
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DED50992A39F4A07ACD997A65602991E@black \
--to=jpyeron@pdinc.us \
--cc=git@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox