Re: [Acme] ACME breaking change: Most GETs become POSTs

Daniel McCarney <cpu@letsencrypt.org> Fri, 31 August 2018 19:30 UTC

Return-Path: <dmccarney@letsencrypt.org>
X-Original-To: acme@ietfa.amsl.com
Delivered-To: acme@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A89D9130E7C for <acme@ietfa.amsl.com>; Fri, 31 Aug 2018 12:30:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.01
X-Spam-Level:
X-Spam-Status: No, score=-2.01 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=letsencrypt.org
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qcs7GYYioTn2 for <acme@ietfa.amsl.com>; Fri, 31 Aug 2018 12:30:55 -0700 (PDT)
Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 17CB1124C04 for <acme@ietf.org>; Fri, 31 Aug 2018 12:30:54 -0700 (PDT)
Received: by mail-it0-x22a.google.com with SMTP id h1-v6so8550610itj.4 for <acme@ietf.org>; Fri, 31 Aug 2018 12:30:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=letsencrypt.org; s=google; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=HYpbiF2J1ZZQI6u8oawOUZPdd3kW+s/2Nku2ZnBt3qU=; b=AgFzuHlrxtDR3anMeura1lJIdFF/z6hESSaUMkzaRXNAp5b//b8PVV4aLn/lAYxQe7 XDgGy2Z3CWAcBFinMbZH6G8yXBRbTGCoVt+5ZCPoGwGK+D3IOksbsvpe1OS7SrIUkVPt C/0YFqIOYJXd9TZKCI7dy5yMLC6H7e1djopl8=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=HYpbiF2J1ZZQI6u8oawOUZPdd3kW+s/2Nku2ZnBt3qU=; b=ELh4Vd7QKH6wL3hcljj87mICUmvbBfIxydwQUO4BO9JsW03sSsgfqrWId7WMHILj7X AnUtlPn8OYAAjf/Mt7O5iwxWyrXiuXi4cngkJ22zVmC85Q4Xz/2Sgtvux5fJ3WFKRFeh AQR96WL1QG+7+tjh4QtP7/s16EY2RwujFWdIqor8andoukYObPXK0XjL0d2p/ufJQi7H JG8+/Ege/HCzpa81BmtfQBopyv2J5l9yL5STUqFwhSSOTEe3xJ1x30TFeJf7xyiMkFQj pIhDsVKtU0u6UIr6OZKpqz1zeq7eME8Faw3OLfgpk1zrTRlttlEzekieHxopa/UridWm z8Mw==
X-Gm-Message-State: APzg51AevxEzyBuKYzcsChelSmxneBRp3l/clyLDFq9iDku1lAWSKxK2 J/tHhROU7qhepZqgQv/tqZQZtxA2cGCYexoIa36o6w==
X-Google-Smtp-Source: ANB0VdZLOWOw0ceJJqaI/dLRYh1AhQnPU8TzN1lp5/dho9/xnxAxlWFkdGwxsch/7jzb4JIxrBMNbZflgfKmna8ORxs=
X-Received: by 2002:a24:41e9:: with SMTP id b102-v6mr6408521itd.19.1535743854003; Fri, 31 Aug 2018 12:30:54 -0700 (PDT)
MIME-Version: 1.0
Reply-To: cpu@letsencrypt.org
Received: by 2002:a6b:20d2:0:0:0:0:0 with HTTP; Fri, 31 Aug 2018 12:30:53 -0700 (PDT)
In-Reply-To: <CAKnbcLhiGSKqmd5Hq3fn3YOwDCQfDa7XW0YuzK4FgmxAKZ+XWA@mail.gmail.com>
References: <c33184f3-4e64-b7ea-babb-d29e2307f1f3@eff.org> <CAL02cgRD=UgsaDeWN9hy2YXN=CLLQpt+zgaZKPTqDpoiMi0hqw@mail.gmail.com> <863A4A5E-718A-4C29-AE82-097C70BE75B6@akamai.com> <CAL02cgQ=FjSLYuzKMnkbVHqPaU7A1sc5xSCk6dWa67=1a3b3vw@mail.gmail.com> <CAKnbcLhiGSKqmd5Hq3fn3YOwDCQfDa7XW0YuzK4FgmxAKZ+XWA@mail.gmail.com>
From: Daniel McCarney <cpu@letsencrypt.org>
Date: Fri, 31 Aug 2018 15:30:53 -0400
Message-ID: <CAKnbcLhmOmR53_qTGand5JM_ugNsSYGw3bxV3q91WmV1uf7jSw@mail.gmail.com>
To: Richard Barnes <rlb@ipv.sx>
Cc: "Salz, Rich" <rsalz@akamai.com>, IETF ACME <acme@ietf.org>, Jacob Hoffman-Andrews <jsha@eff.org>
Content-Type: multipart/alternative; boundary="000000000000e28e950574c03a24"
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/HWXOB39xv0TqW6tbILlBnCgMFCQ>
Subject: Re: [Acme] ACME breaking change: Most GETs become POSTs
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Automated Certificate Management Environment <acme.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/acme>, <mailto:acme-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/acme/>
List-Post: <mailto:acme@ietf.org>
List-Help: <mailto:acme-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/acme>, <mailto:acme-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 31 Aug 2018 19:31:03 -0000

>
> here's a PR[0] for the Pebble ACME server that implements Richard's
> proposal[1] to establish viability. The proposal seems OK to me given the
> trade-offs/alternatives on the table.


One of the changes Richard made in his second iteration of PR #445 was to
differentiate a POST from a POST-as-GET by sending an empty body "a
zero-length octet string" in the POST JWS. Talking about the experience of
implementing this more with Jacob Hoffman-Andrews I think I've come around
to preferring an alternative design. #445 as described requires server and
client developers pay careful attention to the differences between `null`
and `""` in serialization/deserialization and might be bumping into
differences between languages/JSON parsers. Both myself and Jacob failed to
get it right on a first-go[0] and if people this close to the specification
are going to trip on this I think we can be assured others will too.

A proposed alternative: We use `{}` as the body for POST-as-GET (as
suggested by Jacob[1]) and further specify that challenges can only be
initiated with a POST and do not support POST-as-GET.

Using `{}` as the body matches the long standing method of authenticating
access to account information and avoids any null troubles. Removing
polling of challenges is required to free up POSTing `{}` as the challenge
initiation message. All of the challenge information is already accessible
by POST-as-GET polling the associated authorization and it seems sensible
to remove that redundancy as it can cause bugs when a client developer
polls a challenge for an authorization not realizing the associated
authorization has changed to status valid from a different challenge.

Thoughts?

[0] https://github.com/letsencrypt/pebble/pull/162#discussion_r214446189
[1] https://github.com/ietf-wg-acme/acme/pull/445#issuecomment-417505743

On Fri, Aug 31, 2018 at 2:56 PM, Daniel McCarney <cpu@letsencrypt.org>
wrote:

> I think its an anti-pattern to standardize protocol features that haven't
> been implemented by anyone so here's a PR[0] for the Pebble ACME server
> that implements Richard's proposal[1] to establish viability. The proposal seems
> OK to me given the trade-offs/alternatives on the table.
>
> I would encourage other ACME client/server developers to try their hand at
> implementing the changes from [1] as well. I've tested my PR with
> hand-rolled requests but not as part of an automated issuance process with
> a "real" ACME client. Speak now or forever hold your bugs.
>
> [0] - https://github.com/letsencrypt/pebble/pull/162
> [1] - https://github.com/ietf-wg-acme/acme/pull/445/files
>
> On Fri, Aug 31, 2018 at 1:21 PM, Richard Barnes <rlb@ipv.sx> wrote:
>
>> No, if a server receives a GET request for a resource other than those
>> specified, then it MUST return 405.  But please check out the PR and see if
>> it's clear there.
>>
>> On Fri, Aug 31, 2018 at 1:14 PM Salz, Rich <rsalz@akamai.com> wrote:
>>
>>>
>>>    - * Servers MUST return a 405 if they get a GET for a resource other
>>>    than directory/newNonce/certificate.
>>>
>>>
>>>
>>> They means client? Or there’s a word missing, and “they get a” is “they
>>> do not support”
>>>
>>
>> _______________________________________________
>> Acme mailing list
>> Acme@ietf.org
>> https://www.ietf.org/mailman/listinfo/acme
>>
>>
>