Re: [Acme] Increase the idempotency of the protocol

Niklas Keller <> Wed, 30 December 2015 11:12 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id CFABE1ABD3D for <>; Wed, 30 Dec 2015 03:12:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: 1.673
X-Spam-Level: *
X-Spam-Status: No, score=1.673 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HELO_EQ_DE=0.35, HTML_MESSAGE=0.001] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 6l2MdEx6JJVL for <>; Wed, 30 Dec 2015 03:11:58 -0800 (PST)
Received: from ( [IPv6:2a01:238:20a:202:5300::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 249821AC40A for <>; Wed, 30 Dec 2015 03:11:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1451473915; l=7298; s=domk;; h=Content-Type:Cc:To:From:Subject:Date:References:In-Reply-To: MIME-Version; bh=Y1WtWWQ5NKdBf/iO7sFqWwtCXauSNSLbBNlvmhAKflM=; b=MWVFpw28bwndSvfn6PfVdZSm/3mggr/KfdadXqwsza0si6Fh3M9CYIXJRAcxPOgI/Qu 23Bs9Wt0QOs36J+wYITs6Xf6GldQXpeAkZEDvkKWfL+YcwvqpZgH9qSi+p6QS2t3PH12Q kI46rwfgW5a5t5ygtCfbyJ7E3sx9Fm1M64o=
X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLGvomb4bl9EfHtO3Y6
Received: from ([]) by (RZmta 37.15 AUTH) with ESMTPSA id K07ca0rBUBBtoo5 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for <>; Wed, 30 Dec 2015 12:11:55 +0100 (CET)
Received: by with SMTP id u188so36177394wmu.1 for <>; Wed, 30 Dec 2015 03:11:55 -0800 (PST)
MIME-Version: 1.0
X-Received: by with SMTP id at1mr69527794wjc.39.1451473915693; Wed, 30 Dec 2015 03:11:55 -0800 (PST)
Received: by with HTTP; Wed, 30 Dec 2015 03:11:55 -0800 (PST)
In-Reply-To: <20151229213656.GA29580@andover>
References: <20151229213656.GA29580@andover>
Date: Wed, 30 Dec 2015 12:11:55 +0100
X-Gmail-Original-Message-ID: <>
Message-ID: <>
From: Niklas Keller <>
To: Hugo Landau <>
Content-Type: multipart/alternative; boundary=089e013c61502555d505281b9b7e
Archived-At: <>
Subject: Re: [Acme] Increase the idempotency of the protocol
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Automated Certificate Management Environment <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 30 Dec 2015 11:12:01 -0000

2015-12-29 22:36 GMT+01:00 Hugo Landau <>et>:

> While developing a client, one minor consideration was remembering for
> which hostnames authorizations have been obtained. My client remembers
> the expiry date of authorizations so that it can avoid unnecessarily
> requesting authorizations which have already been obtained.
> A general princple of my client is to keep as little state as possible,
> on the grounds that where state isn't kept, state can't get messed up.
> Where state is kept, there is an implicit hierarchy of normativity, so
> that derived state is subsidiary to normative state, and is wherever
> possible inferred at runtime rather than being stored.
> The 'new account' flow is idempotent in the sense that it can be done
> safely if an account has already been registered. It would be highly
> desirable for this idempotency to be extended to authorization creation.
> Possibly even some thought could be put into idempotency for certificate
> and revocation requests.
> Essentially, I propose that a client be able to include an expiry time
> in a new authorization request. If a valid authorization for the given
> hostname exists and which expires on or after the given time, a redirect
> should be returned for that authorization in much the same way that an
> attempt to register an existing account does. (This expiry time never
> influences the validity period of an authorization.)
> Requests which do not include an expiry time can be considered
> equivalent to requests with a default expiry time. That default expiry
> time could be NOW+5m (a choice made under the assumption that no client
> will take more than 5 minutes to request a certificate), or +INFINITY
> (i.e., an unsatisfiable value resulting in a new authorization always
> being created; this preserves compatibility with existing clients).
> Certificate requests could be made idempotent by recommending or
> requiring servers to redirect to existing certificates when a CSR is
> submitted to the server which it has already seen. Servers could
> implement this by storing CSRs or hashes of them.
> To summarise, the protocol could be rendered significantly more
> idempotent with only minor, non-breaking changes. This is a win for
> robustess and reduces the chances of repeated requests and corresponding
> unnecessary loads on a CA. This would be especially desirable for
> certificate requests which exert the most significant cryptographic load
> on a CA (HSMs, OCSP signing, etc.).
> _______________________________________________
> Acme mailing list

There's already another way to do something like this, I proposed to make
those two mandatory instead of optional:
(authorizations and certificates keys).

I think having a redirect there is another good addition and also protects
against multi-issuance and resource waste.

Regards, Niklas