Re: [Acme] Specify which JWS serialization is used

Logan Widick <logan.widick@gmail.com> Thu, 04 January 2018 14:04 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 17E65126579 for <acme@ietfa.amsl.com>; Thu, 4 Jan 2018 06:04:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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_NONE=-0.0001, SPF_PASS=-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 pzP_3sZfKtbk for <acme@ietfa.amsl.com>; Thu, 4 Jan 2018 06:03:57 -0800 (PST)
Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (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 156A6124C27 for <acme@ietf.org>; Thu, 4 Jan 2018 06:03:57 -0800 (PST)
Received: by mail-io0-x230.google.com with SMTP id q188so2320544iod.1 for <acme@ietf.org>; Thu, 04 Jan 2018 06:03:57 -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=aEc2BMOXYxEdVK1nbWOqxCs4VYcNYoE2o2X2Z765asA=; b=WkfZeOET1P+YgEbT+qzIHTRVqHwyuLOeyKZL2F/zXUKMrdcMm1HKw2ZS0Jiq1EGL1T MIKHsr6PLePgCU1Mf7SO0hs9OR3+CB/bvSXrEDF4J/EOrXkMm7EoyV01FHF7YIaoHqMQ ZWZ8nzVvycGWdcoZXQIFZwAZjPFkCFkJuGP4SnJw4CckWYVhU0TNQohSXdJduYtxQMr/ TSUMoXmYw8oxdEIvwPedla6bdBga7QpEwDAYlromunAikgE0+O0lR0tUn94OFKvetNk0 5kYG0Vmgb+BUrOI2iwjr42WXMnS9v2QJDVvmN8+x4KgkWPVmZFHdJX2V7lckelIEVdP9 L7gQ==
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=aEc2BMOXYxEdVK1nbWOqxCs4VYcNYoE2o2X2Z765asA=; b=UAtwtLKcXA6n1oO5MnnZCZTW5vD+3W+zsrkrQ7TCxT6wkBOTev1dLXu23kdurEX6JN OOKVKVNviIva9u2ucU2CPFzyBUjRsZ7OPMWSwICv1jyVq66MBra4nw/Df6En2eY8WSzf fTYXq9RgnobWPOIIbwjdpe4RDbVc6wU0BsvEQ9RW/vGnaMfwKqxbNGrSC/QPIDIz5jL7 7VAT9eGON5XNFeWrMfM0ZRm7Iw92G55Jtczdg9EbTFa8di21s3URNFuINgIxPCHa35VU Xolw4HcizKxIFl4zcyfBPnqvTg4/P6igVgMjDkf+ePMiMwCMfN/dD9P31BTzA6DcWRj2 Ia+w==
X-Gm-Message-State: AKGB3mK0psSgvUfw6cZo3CqAy/thCx3gJ6yBm+1WyXdHCFKd479YYooQ 7+w90hSutTN7AJMoxVlEBClrVhJmYQ85bDswNNI=
X-Google-Smtp-Source: ACJfBouxhxcdBjZexuWR0db1OATkUWd1+h+QCEYCKWQajJuruSuibtPNTE6fQNoaYgqpAiDtROoWh/cqvzltzdMDXkc=
X-Received: by 10.107.135.90 with SMTP id j87mr5253792iod.170.1515074636176; Thu, 04 Jan 2018 06:03:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.2.152.59 with HTTP; Thu, 4 Jan 2018 06:03:55 -0800 (PST)
Received: by 10.2.152.59 with HTTP; Thu, 4 Jan 2018 06:03:55 -0800 (PST)
In-Reply-To: <20180104110204.GP21695@carrot.tutnicht.de>
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>
From: Logan Widick <logan.widick@gmail.com>
Date: Thu, 04 Jan 2018 08:03:55 -0600
Message-ID: <CAMmAzEKJhMaUBtCWSNZyGv-f+-edZ-WTq3=WFD_b1bXfvua89A@mail.gmail.com>
To: Jörn Heissler <acme-specs@joern.heissler.de>
Cc: Fraser Tweedale <frase@frase.id.au>, ACME WG <acme@ietf.org>
Content-Type: multipart/alternative; boundary="001a113f33947f643c0561f3cd65"
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/DNtQ6Gx_JHDES-_aH9E8eeZ0GX4>
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: Thu, 04 Jan 2018 14:04:00 -0000

What do you think of the following:

Content type application/jose+json: MUST be supported. If used, the JWS
will need to be in the Flattened or General serialization. Flattened MUST
be supported; General MAY be supported.

Content type application/jose: MAY be supported. If used, the JWS MUST use
the Compact serialization. Or should this content type not be allowed?

JWS Unprotected Header: Not currently used in ACME. Should this be banned
in ACME?

Multiple signatures: MAY be supported. Should messages signed by both MAC
keys and private keys be allowed? What about Key IDs not issued by the CA?
Or are multiple signatures more trouble than they're worth to the point of
banning them entirely?

Multiple signatures on messages that need to be signed by account key: At
least one signature MUST be from the account key

Multiple signatures on revokeCert: Should this be allowed?

Multiple signatures on externalAccountBinding field of newAccount: Should
it be possible to bind to multiple pre-existing accounts? Or should this
not be allowed?

Multiple signatures on newAccount: Not allowed?

Multiple signatures on keyChange: Not allowed for outer or inner JWS?

JWS Unencoded Payload Option (RFC 7797): Not allowed?

Conversion guide between the different JWS serialization formats: Is it
completely safe to assume that any and all programmers given the JWS RFC,
pre-existing JWS implementations with sufficient documentation, and
pre-existing JSON libraries with sufficient documentation could figure out
how to convert the serialization formats as needed? Or is the conversion
guide necessary? If the guide is necessary, then include a reference to a
separate new or pre-existing conversion guide. If the guide is necessary,
and there is no pre-existing conversion guide, how should the new
conversion guide be published? Should the new conversion guide be
ACME-specific, or more general (possibly with coverage of JWE as well as
JWS features not utilized in ACME)?

Sincerely,
Logan Widick

On Jan 4, 2018 5:02 AM, "Jörn Heissler" <acme-specs@joern.heissler.de>
wrote:

> On Thu, Jan 04, 2018 at 09:47:19 +1000, Fraser Tweedale wrote:
> > I am the author of a JOSE library, and have had to deal with
> > interoperability issues arising from the multiple serialisations and
> > underspecified applications/protocols.  Please heed my advice.
> >
> > Where there is a choice of JSON serialisation (i.e. exactly one
> > signature), JOSE does not require or recommend a particular
> > serialisation be used.  Not does the specification require or
> > recommend that there be a mechanism for telling a library what JSON
> > serialisation to use.  The outcome of this is that there are:
> >
> > - implementations that unconditionally produce the General JSON
> >   serialisation
> >
> > - implementations that unconditionally produce the Flattened JSON
> >   serialisation (and do not support multiple signatures at all)
> >
> > - implementations that produce the Flattened serialisation when
> >   there is a single signature, and the General JSON serialisation
> >   otherwise
> >
> > Therefore for interoperability and to avoid situations where a
> > conforming JOSE library cannot be used for ACME, I suggest that ACME
> > adopt the following regime:
> >
> > - Conforming ACME implementations MUST process JWS objects using the
> >   Flattened JWS JSON Serialization and SHOULD process JWS objects
> >   using the General JWS JSON Serialization.
> >
> > - Conforming ACME implementations MAY refuse to process JWS objects
> >   with multiple signatures.  If an implementation accepts
> >   multiple-signature JWS objects, it MUST validate at least one
> >   signature using the account's public key.
>
> This would work for me. I'm currently writing a new client (We need more
> ACME clients!) and I'd prefer to stick to a single hard coded
> serialization format which works with every conforming CA. Adding
> flexibility (Use "flat" for this CA, use "general" for that CA, etc.)
> would be troublesome.
>
> But I'm worried about client implementations that use the next best JOSE
> library which "unconditionally produces the General JSON serialisation".
> Most CAs would support it ("SHOULD"). But some might decide not to:
> "Yeah, we SHOULD support this. But our JOSE library only understands
> the flat format and everyone but YOU does use the flat format".
> Then who's to blame, the client or the CA?
>
> Should this be changed to "MUST" or to "MAY"?
> I.e. "flat" MUST be supported, "general" MUST/MAY be supported,
> "compact" MAY be supported but needs a "application/jose" content type.
>
>
> On Wed, Jan 03, 2018 at 19:51:53 -0600, Logan Widick wrote:
> >    Here is a pull
> >    request: [1]https://github.com/ietf-wg-acme/acme/pull/382
> >    Let me know what you think.
>
> > +Conforming ACME implementations MUST NOT process JWS objects using
> > +the Compact JWS Serialization.
>
> I think "compact" should be acceptable ("MAY process") iff the client sends
> a "Content-Type: application/jose" header.
>
> >    As for using JOSE implementations that lack support for the JSON
> >    serialization formats (and only support the compact one), is there an
> >    RFC, Internet-Draft, or similar document with an explanation of the
> >    conversion process already prepared (that can simply be thrown into
> the
> >    ACME draft's references section)? Or would it be necessary to include
> >    an appendix in the ACME draft with an outline of the conversion
> >    process? The conversion process looks fairly straightforward. However,
> >    it would be nice if there was a document or part of a document that
> >    could be easily referenced.
>
> Your conversion guide sounds good. But personally I'd move this to a
> separate document (like you were looking for) because it would be useful
> in non-ACME related applications too.
>
> Cheers,
> Jörn
>