Re: [Acme] Specify which JWS serialization is used

Logan Widick <logan.widick@gmail.com> Sat, 03 March 2018 01:46 UTC

Return-Path: <logan.widick@gmail.com>
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 2617B126E64 for <acme@ietfa.amsl.com>; Fri, 2 Mar 2018 17:46:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Level:
X-Spam-Status: No, score=-2.698 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 4ZqBJnrCu5eh for <acme@ietfa.amsl.com>; Fri, 2 Mar 2018 17:46:33 -0800 (PST)
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 E2246127078 for <acme@ietf.org>; Fri, 2 Mar 2018 17:46:32 -0800 (PST)
Received: by mail-it0-x22a.google.com with SMTP id e64so4004082ita.5 for <acme@ietf.org>; Fri, 02 Mar 2018 17:46:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=x0hu3Hk48Hq3yXnuY1Sw/c2tv6tqmKt4wMIoEWdFeV8=; b=MdjXcedGa29x8BCL+oqdgXr9DeDoxUxyTIY8FqHFmjplutF20ef1QXBFjOhsCA49/i xn8Tu64tigrsigxhVggRcdYfM/lElLpzqxrgHwgdxJwclAEz0TuW6/Highf62nXNAUHU x93j32cJyYUmMIlKhq+RkwpJmzk1diEgOjj0s2CQEnGqPwNccq8rgfPTD1vK06LhQkyR KMLYz2TesRbW4CpaA32jEWDLkakZ+X1rZbH43JKJYd7ohhZ/EAVzjWkWsC39d/Tdrnu2 wHpRuNNd3opUvh75JnAhh3MMJzE+lISoJi7UP/vbybTNUYzvysClqgdZJpmd4NA64bZ6 j52w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=x0hu3Hk48Hq3yXnuY1Sw/c2tv6tqmKt4wMIoEWdFeV8=; b=OutCF6MApfcADD0+M4OnQXQxlrJReV3I0IgXIX4nLLZMJjkzNbptGwjOZVyc/v8P29 5mMA29twLscfvZ3ipLbxIqixRstlHSHRv7brEspE3Wm+zWtuoRjG8A+tCheK+pvUtgyE 9trEHsZC11WSKPE3DBsg84GH9G+pQf0qgSHeh3KWCIGhTXYcLW1C2XjEecOBCY+5LSfb 4Qp3aGw5wyoJ2loapNO2o75SuYHQliKmhvRmkuDvz+fkIOlQdiWs2PzQXrrYQxG7pNc/ BWEGcet6u+m6vWObmB6zN5sDgXOt3pAa2/Tbg3QtEpD2eYp84WW8VsCDr+asWbXTYUkK Bu6Q==
X-Gm-Message-State: AElRT7GScnYbUjxJsQmI8cVrVyoMjSjA8FgOOk9o3pIkIT7Ongt/xmIR MHTssxCB44d7MVjHVnrJmuQQbDkvYi4Sf+RJDq0=
X-Google-Smtp-Source: AG47ELsOt01rPCQBPFN7TX/GvAe3YeT1fKtjsoCRaRMruMAPH6WEmlsyB/9jEZBmOcmWUjnWuTYn0KB3KvRWfiXm7NU=
X-Received: by 10.36.123.65 with SMTP id q62mr5045215itc.120.1520041592100; Fri, 02 Mar 2018 17:46:32 -0800 (PST)
MIME-Version: 1.0
Received: by 10.2.27.77 with HTTP; Fri, 2 Mar 2018 17:46:31 -0800 (PST)
In-Reply-To: <61c98e41-74e4-11ff-1c1b-faf64b75bcf4@eff.org>
References: <20180103230734.GM21695@carrot.tutnicht.de> <20180103234718.GA1340@bacardi.hollandpark.frase.id.au> <CAMmAzEKj33xOVhUK+i2UrHpvTBj=hz89DRyaFvTqAig4f66K-Q@mail.gmail.com> <CAMmAzEKSv1pbKC80JLpRQxTrGApc7KVu6A7cqDp-Tmrcq4vvLg@mail.gmail.com> <20180104110204.GP21695@carrot.tutnicht.de> <CAMmAzEKJhMaUBtCWSNZyGv-f+-edZ-WTq3=WFD_b1bXfvua89A@mail.gmail.com> <20180106001126.GB3076@carrot.tutnicht.de> <CAMmAzELgjpAmVCX6YB0VMvNQV3NH3NDdM_pdcz6d+h=ZO2rJww@mail.gmail.com> <CAMmAzEKMffffrxAihotVWPpqy=LaRkpSJuW9CpSVoQfLQ-nBwQ@mail.gmail.com> <CAL02cgRLXkkQECF5ssGh39uFL0xJp-3EODxGSQVzfPuEnE7FgA@mail.gmail.com> <63F4F466-8398-41E6-BD25-5414ADA9D1B3@felipegasper.com> <CAMmAzEKksnuBi0LPHsAsd2qs1brbMqrJBdtsbArTr6HhGrkN+A@mail.gmail.com> <CAL02cgRrH9fG-E9_oc4naSNvE4igaUcs9wXDfTtCTUCx+c4wbg@mail.gmail.com> <61c98e41-74e4-11ff-1c1b-faf64b75bcf4@eff.org>
From: Logan Widick <logan.widick@gmail.com>
Date: Fri, 02 Mar 2018 19:46:31 -0600
Message-ID: <CAMmAzEKOwYnEAFTAE2ykgmqZ67n-uSpkbto4e8TX9OkMQjYkDA@mail.gmail.com>
To: Jacob Hoffman-Andrews <jsha@eff.org>
Cc: Richard Barnes <rlb@ipv.sx>, ACME WG <acme@ietf.org>, Felipe Gasper <felipe@felipegasper.com>, Jörn Heissler <acme-specs@joern.heissler.de>, Fraser Tweedale <frase@frase.id.au>
Content-Type: multipart/alternative; boundary="001a114749d2241c5805667843e3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/c2mr2U2GXAN9hV2FiHmHlTgscqw>
Subject: Re: [Acme] Specify which JWS serialization is used
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 03 Mar 2018 01:46:38 -0000

I don't really have a preference for which serializations are used, as long
as all ACME implementations (regardless of the programming language used)
can support the chosen serializations, and new serializations can be added
later if necessary.

When I searched the listings on GitHub and jwt.io a month or two ago, I
found some JOSE libraries that didn't support reading all serialization
formats, and/or didn't provide programmers with control over the format
produced. Thus, serialization may still be an issue unless one can convert
between serializations before and/or after using such libraries.

Here is a PR for one possible way to resolve the "root JWS" and "nested
JWS" issue: https://github.com/ietf-wg-acme/acme/pull/403 . This PR
includes the following:

   - Initial definitions of "root JWS" and "nested JWS"
   - Updated requirement for "root JWS" and "nested JWS" under the two
   currently defined content types (application/jose and application/jose+json)
   - Revisions to the registries already defined in the spec (to label
   nested JWS things as such and indicate that the actual types may change
   depending on the serialization formats used)
   - A new serializations registry (so that serializations can be added as
   needed)
      - I put it as a new registry under the "New Registries" section
      because it includes ACME-specific constraints on existing content types
      instead of new content types.
      - I have no experience adding new material to an IANA Considerations
      section. I'm not sure if I put the new material in the right place,
      formatted it correctly, included all required information (like what
      guidance, if any, should be provided), etc.

If it is decided to change course and stick with one serialization format
for now, I can make the following changes to this PR:

   - Clean up the "JWS Serialization Formats" section:
      - In PR #403 as it is today:
         -  "One of the following Content-Type header values MUST be used
         to indicate the JWS serialization format"
         - This section includes a list describing the requirements for
         both JSON (Flattened and General) and Compact Serializations
      - To change course:
         - "The following Content-Type header value MUST be used to
         indicate the JWS serialization format"
         - Delete the unused serialization format from the list
      - Delete the unnecessary format from the new serializations registry

Let me know what you think of this PR.

Logan



On Fri, Mar 2, 2018 at 4:51 PM, Jacob Hoffman-Andrews <jsha@eff.org> wrote:

>
> If you have suggestions here, a PR would be welcome.  TBH, this issue kind
> of makes me want to reverse course and say "all flattened JSON", but I get
> the sense that other folks disagree?
>
> I'd be very much in favor of "all flattened JSON." When we started ACME, I
> think there was some concern that libraries might support only Compact
> Serialization (https://tools.ietf.org/html/rfc7515#section-7.1). But
> experience has shown that Flattened JSON Serialization (
> https://tools.ietf.org/html/rfc7515#section-7.2.2) is pretty well
> supported across languages.
>
> FWIW, Let's Encrypt's ACMEv2 endpoint only supports Flattened JSON
> Serialization.
>