git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] verify-commit: scriptable commit signature verification

From
Jeff King <peff@peff.net>
Date
Jun 28, 2014, 00:32 UTC
Message-ID
<20140628003246.GA13228@sigill.intra.peff.net>
In-Reply-To
<xmqqwqc219og.fsf@gitster.dls.corp.google.com>
On Fri, Jun 27, 2014 at 11:36:47AM -0700, Junio C Hamano wrote:
Show 19 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
> > A merge commit with embedded signed tag it is, then.
> >
> > The commit could carry it's own commit signature, couldn't it?
> 
> Yes, an integrator can choose to sign a merge he creates, merging
> the work by a contributor who gave him a pull-request for a tag
> signed by the contributor.  The resulting commit will embed the
> contributor's signature to let historians verify the second parent,
> as well as the integrator's signature to allow verification of the
> merge result.  The integrator does not need to keep the signed tag
> used as an implementation detail of transferring the signature of
> the contributor, and in general such a signed tag used only to
> request pulls is not available to the general public and historians
> after such a merge is created.
> 
> As these signatures are part of a commit object, "git verify-commit"
> would be the logical place to validate them, if we were to do so.

We already disagreed on this earlier in the discussion, but I have given it some more thought, and somehow using "verify-commit" for mergetags still feels wrong to me. Let me see if I can put it into words.

First off, I agree that "verify-tag" is probably not the right place. There _is_ no tag object to verify anymore (the only reason it is a tag at all is that the signature came out of what once was a tag).

Let us imagine that we have a "verify-commit" that verifies commit signatures made by "commit -S". If I run "verify-commit foo", that implies to me two things:

  1. I am verifying the signature over the contents of "foo".
     But the mergetag is _not_ a statement about "foo"; the person who
     signed it never saw "foo". It is a statement about foo^2 at best,
     or possibly about the whole history of foo^1..foo^2.
  2. I am verifying _only_ the contents of foo. That is, I expect people
     to use "commit -S" to cryptographically claim authorship of a
     commit. Whereas with tags, I think we have typically taken them to
     mean "I have signed the tip of a segment of history, and I am
     taking responsibility for the final state" (e.g., signing release
     tags).
     I realize that this claim is somewhat tenuous. It's not something
     inherent in the crypto, but rather in the social convention of what
     it means to sign a commit. One could easily say "signing a commit
     is about signing the whole tree state". But I would ask, then: what
     is the point of signing a commit versus signing a tag?  I think
     that people who wanted commit signatures wanted them to give a
     stronger guarantee of authorship of individual commits.
     Git has largely stayed agnostic about what such signatures mean.
     But if we accept that some projects _are_ going to make that
     distinction, I think conflating verification of the two within the
     same command leads to a potential for confusion.

So for that reason, I think I'd be in favor of simply treating mergetag signatures as a separate, third entity. Give them their own %G-specifiers, and give them a separate plumbing command. Let projects work out how they want to use them, but do not create any particular affiliation between mergetags and commit signatures (nor between tag signatures and mergetag signatures).

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 26 of 75 in “verify-commit: verify commit signatures”
  1. 0/3 verify-commit: verify commit signaturesMichael J Gruber, Jun 6, 2014
  2. 1/3 pretty: free the gpg status bufMichael J Gruber, Jun 6, 2014
  3. 2/3 gpg-interface: provide access to the payloadMichael J Gruber, Jun 6, 2014
  4. Jeff KingJun 13, 2014
  5. Michael J GruberJun 13, 2014
  6. Jeff KingJun 13, 2014
  7. 3/3 verify-commit: scriptable commit signature verificationMichael J Gruber, Jun 6, 2014
  8. Michael J GruberJun 11, 2014
  9. Jeff KingJun 13, 2014
  10. Michael J GruberJun 13, 2014
  11. Jeff KingJun 13, 2014
  12. Junio C HamanoJun 13, 2014
  13. Michael J GruberJun 16, 2014
  14. Jeff KingJun 16, 2014
  15. Junio C HamanoJun 16, 2014
  16. Jeff KingJun 16, 2014
  17. Michael J GruberJun 27, 2014
  18. Michael J GruberJun 27, 2014
  19. Michael J GruberJun 27, 2014
  20. log: correctly identify mergetag signature verification statusMichael J Gruber, Jun 27, 2014
  21. Jeff KingJun 28, 2014
  22. Junio C HamanoJul 10, 2014
  23. Michael J GruberJun 27, 2014
  24. Junio C HamanoJun 27, 2014
  25. Junio C HamanoJun 27, 2014
  26. Jeff KingJun 28, 2014
  27. Junio C HamanoJun 30, 2014
  28. 0/6 verify-commit: verify commit signaturesMichael J Gruber, Jun 13, 2014
  29. 0/5 verify-commit: verify commit signaturesMichael J Gruber, Jun 23, 2014
  30. Jeff KingJun 23, 2014
  31. Junio C HamanoJun 23, 2014
  32. Jeff KingJun 23, 2014
  33. Junio C HamanoJun 23, 2014
  34. 0/4 verify-commit: verify commit signaturesMichael J Gruber, Jun 27, 2014
  35. Junio C HamanoJun 27, 2014
  36. Jeff KingJun 28, 2014
  37. Jeff KingJun 28, 2014
  38. 1/4 gpg-interface: provide clear helper for struct signature_checkMichael J Gruber, Jun 27, 2014
  39. 2/4 gpg-interface: provide access to the payloadMichael J Gruber, Jun 27, 2014
  40. 3/4 verify-commit: scriptable commit signature verificationMichael J Gruber, Jun 27, 2014
  41. 4/4 t7510: test verify-commitMichael J Gruber, Jun 27, 2014
  42. Junio C HamanoJun 27, 2014
  43. Michael J GruberJun 27, 2014
  44. 1/5 gpg-interface: provide clear helper for struct signature_checkMichael J Gruber, Jun 23, 2014
  45. 2/5 gpg-interface: provide access to the payloadMichael J Gruber, Jun 23, 2014
  46. 3/5 verify-commit: scriptable commit signature verificationMichael J Gruber, Jun 23, 2014
  47. 4/5 t7510: exit for loop with test resultMichael J Gruber, Jun 23, 2014
  48. 5/5 t7510: test verify-commitMichael J Gruber, Jun 23, 2014
  49. Junio C HamanoJun 23, 2014
  50. 1/6 pretty: free the gpg status bufMichael J Gruber, Jun 13, 2014
  51. Jeff KingJun 13, 2014
  52. 2/6 gpg-interface: provide access to the payloadMichael J Gruber, Jun 13, 2014
  53. 3/6 verify-commit: scriptable commit signature verificationMichael J Gruber, Jun 13, 2014
  54. Jeff KingJun 13, 2014
  55. Michael J GruberJun 13, 2014
  56. Jeff KingJun 13, 2014
  57. Michael J GruberJun 13, 2014
  58. 4/6 t7510: exit for loop with test resultMichael J Gruber, Jun 13, 2014
  59. Jeff KingJun 13, 2014
  60. Michael J GruberJun 13, 2014
  61. Michael J GruberJun 13, 2014
  62. Michael J GruberJun 13, 2014
  63. Jeff KingJun 13, 2014
  64. Johannes SixtJun 13, 2014
  65. Michael J GruberJun 13, 2014
  66. Johannes SixtJun 13, 2014
  67. Jeff KingJun 13, 2014
  68. Michael J GruberJun 13, 2014
  69. Johannes SixtJun 13, 2014
  70. Junio C HamanoJun 13, 2014
  71. 5/6 t7510: test verify-commitMichael J Gruber, Jun 13, 2014
  72. Jeff KingJun 13, 2014
  73. Michael J GruberJun 13, 2014
  74. Junio C HamanoJun 13, 2014
  75. 6/6 gpg-interface: provide clear helper for struct signature_checkMichael J Gruber, Jun 13, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.