All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Christian Noé Ramos López" <chris@nortesoftware.dev>,
	git@vger.kernel.org, "Phillip Wood" <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH] doc: gpg: say which date SSH key lifetimes are checked against
Date: Thu, 22 Oct 2026 08:25:12 +0200	[thread overview]
Message-ID: <atmsSIJrFhA0t1rH@pks.im> (raw)
In-Reply-To: <xmqqqzhior8t.fsf@gitster.g>

On Wed, Oct 21, 2026 at 11:14:42AM -0700, Junio C Hamano wrote:
> Christian Noé Ramos López <chris@nortesoftware.dev> writes:
> 
> > -Since OpensSSH 8.8 this file allows specifying a key lifetime using valid-after &
> > -valid-before options. Git will mark signatures as valid if the signing key was
> > -valid at the time of the signature's creation. This allows users to change a
> > -signing key without invalidating all previously made signatures.
> > +Since OpenSSH 8.8 this file allows specifying a key lifetime using valid-after &
> > +valid-before options. When verifying a commit or a tag, Git checks that lifetime
> > +against the committer or tagger date recorded in the commit or tag. This allows
> > +users to change a signing key without invalidating all previously made
> > +signatures. That date is chosen by whoever creates the commit or tag, so it is
> > +not evidence of when the signature was made; the same is true of the creation
> > +time in a GPG signature, which is set by the signer's clock. Relying on a key
> > +lifetime is therefore only safe as long as the signing key has never leaked;
> > +once it has, valid-after and valid-before guarantee nothing.
> 
> Saying what we compare against may be valuable, but everything else
> sounds more like an empty fluff to me.  Isn't it self evident that
> validity time range is a useless concept unless you cannot tell when
> the signature was made?  In other words, instead of the long
> discussion of how useless the validity checks are, something
> succinct like
> 
>     Since OpensSSH 8.8 this file allows specifying a key lifetime using
>     valid-after & valid-before options. Git validates the signature by
>     checking the committer or tagger timestamp is within the validity
>     time range.  This allows users to change a signing key without
>     invalidating all previously made signatures.
> 
> should be sufficient, I would have to say.  Or am I missing
> something?

I think explicitly pointing out that the timestamp is under control by
the signer would be useful context though. It's implicit to us, but it
may not be implicit to everyone else. So maybe something like this?

     Since OpensSSH 8.8 this file allows specifying a key lifetime using
     valid-after & valid-before options. Git validates the signature by
     checking the committer or tagger timestamp is within the validity
     time range.  This does not provide any security guarantees as the
     timestamp can be chosen arbitrarily by the signer.  But it allows
     users to change a signing key without invalidating all previously
     made signatures.

Patrick

  parent reply	other threads:[~2026-10-22  6:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08  6:56 ssh signing: valid-before is checked at the signer's own date, and a missing revocationFile fails open Christian Noé Ramos López
2026-10-08 13:42 ` Phillip Wood
2026-10-09 12:19   ` Patrick Steinhardt
2026-10-09 13:30     ` Phillip Wood
     [not found]   ` <CAHGSfba9Td+Lg=Nf+nfwZY2r1_eq2Mcejn__6X=VPQkmcJttfQ@mail.gmail.com>
2026-10-09 13:29     ` Phillip Wood
2026-10-21  3:03   ` [PATCH] doc: gpg: say which date SSH key lifetimes are checked against Christian Noé Ramos López
2026-10-21 18:14     ` Junio C Hamano
2026-10-22  5:44       ` [PATCH v2] " Christian Noé Ramos López
2026-10-22  6:25       ` Patrick Steinhardt [this message]
2026-10-21  4:17   ` [PATCH] gpg-interface: fail when the ssh revocation file is missing Christian Noé Ramos López
2026-10-21 18:40     ` Junio C Hamano
2026-10-22  5:46       ` [PATCH v2] " Christian Noé Ramos López

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=atmsSIJrFhA0t1rH@pks.im \
    --to=ps@pks.im \
    --cc=chris@nortesoftware.dev \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.