Re: [Acme] Specify which JWS serialization is used

Logan Widick <logan.widick@gmail.com> Thu, 04 January 2018 01:51 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 E396312D834 for <acme@ietfa.amsl.com>; Wed, 3 Jan 2018 17:51:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 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] 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 mIPX5cTKG3Ki for <acme@ietfa.amsl.com>; Wed, 3 Jan 2018 17:51:55 -0800 (PST)
Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (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 46F3512D80E for <acme@ietf.org>; Wed, 3 Jan 2018 17:51:55 -0800 (PST)
Received: by mail-io0-x236.google.com with SMTP id k18so603675ioc.11 for <acme@ietf.org>; Wed, 03 Jan 2018 17:51:55 -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=3Eg9GV6FFRJ7A80H2r66ddzI9bFhvnO2wtXCodf3F6o=; b=KD0nXYzFOTPwLEOny1qdvBqJE/1LsT171GxtMELNjrnT8fv5FNZFfL4RYJ/C4OT+sh /msTa1oFbbVTJjnoIHtMiInuF+LfR9hZx1aAZKtgY9fKKQ6tG1OWQqYR/O2hQhM+UGi4 Ewf9U0RH/U73O5Mq1wUv2fZjGsPgTjYWV6rYUXEmWImYEt5QmfcSQeTOdJP7r5odAczN BGWv5SAi1/hIyk73oRMuduxPqp3yw9Q5sFOoA3JhuNxs1nRQA4qZtjLAm5YIvTWoQMf8 UhNUAy6qC2CZXaG/s3JVk9h9tIe/+gpHDp7hOmH/whhmsZzSX+W2fzbOG6zFuApmP9DT X1pw==
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=3Eg9GV6FFRJ7A80H2r66ddzI9bFhvnO2wtXCodf3F6o=; b=E/mGmLNaJH1rI3ZwePEcEm9sz3kHnhVBaY2zQw3Ebr2Y+tF8+ijGHvigf358G/jJyy 4sMHHeypUwN8DvdLCsniqF7yN4t+Cnpr2rNG5fnEotLrhYx9ST3Hz4HxNW5YjK8fRFcj GjBoJIwroqqM1Tx0dE7AcMNPNzf2XO7X6vXSFbIRNCys7BajnBlLgWQhVCQG8QSvZ4bt qW9jX3u6XVlu3OJzjZYxEhK3HO8OokInok5zhGEPP6+DUlmEqPK8GZE+urMqC1oYN/XX 8q7VAuZ/qiA18hSrPGY6s2K0BAyw53SB5aPkd/tux5xAMm6237aY+B3k2MyCFeJvxCRo x71A==
X-Gm-Message-State: AKGB3mIajCdytc++HVth2IdBifRGB/Os7zSUzxh9Rohl6MIMd5K7NV4b SZZCemriHp1T4ocLF+Eb+BfSQaEjLJTMae8WQAFLkA==
X-Google-Smtp-Source: ACJfBovzRZL0EZ//c0AKQDIP27KCB1XQc9HhkNpfifMnA8mz720X51CcF0MOw32xh+YIMehODW6dQcsNXnX7JmRL2Zw=
X-Received: by 10.107.136.217 with SMTP id s86mr3810279ioi.294.1515030714379; Wed, 03 Jan 2018 17:51:54 -0800 (PST)
MIME-Version: 1.0
Received: by 10.2.152.59 with HTTP; Wed, 3 Jan 2018 17:51:53 -0800 (PST)
In-Reply-To: <CAMmAzEKj33xOVhUK+i2UrHpvTBj=hz89DRyaFvTqAig4f66K-Q@mail.gmail.com>
References: <20180103230734.GM21695@carrot.tutnicht.de> <20180103234718.GA1340@bacardi.hollandpark.frase.id.au> <CAMmAzEKj33xOVhUK+i2UrHpvTBj=hz89DRyaFvTqAig4f66K-Q@mail.gmail.com>
From: Logan Widick <logan.widick@gmail.com>
Date: Wed, 03 Jan 2018 19:51:53 -0600
Message-ID: <CAMmAzEKSv1pbKC80JLpRQxTrGApc7KVu6A7cqDp-Tmrcq4vvLg@mail.gmail.com>
To: Fraser Tweedale <frase@frase.id.au>
Cc: ACME WG <acme@ietf.org>, Jörn Heissler <acme-specs@joern.heissler.de>
Content-Type: multipart/alternative; boundary="001a113ec1c08df25c0561e993d9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/lySPWpRn-xOeQhWi2RZj8gp3FeE>
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 01:51:58 -0000

Here is a pull request: https://github.com/ietf-wg-acme/acme/pull/382

Let me know what you think.

Sincerely,

Logan Widick

On Wed, Jan 3, 2018 at 6:21 PM, Logan Widick <logan.widick@gmail.com> wrote:

> This looks good to me.
>
> 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.
>
> Logan
>
> On Wed, Jan 3, 2018 at 5:47 PM, Fraser Tweedale <frase@frase.id.au> wrote:
>
>> On Thu, Jan 04, 2018 at 12:07:34AM +0100, Jörn Heissler wrote:
>> > Hello and happy new Year!
>> >
>> > I've found an inaccuracy in the ACME specs.
>> >
>> > https://tools.ietf.org/html/rfc7515#section-7 states:
>> >
>> >     Applications using this specification need to specify what
>> serialization
>> >     and serialization features are used for that application.
>> >
>> > Although this is neither a "SHOULD" nor a "MUST", I think ACME should
>> specify
>> > which serialization formats need to be supported by server
>> implementations.
>> >
>> > RFC7515 defines four serialization formats:
>> >
>> > * JWS Compact Serialization
>> > * General JWS JSON Serialization Syntax
>> >   * One signature only
>> >   * Multiple signatures
>> > * Flattened JWS JSON Serialization Syntax
>> >
>> > https://ietf-wg-acme.github.io/acme/draft-ietf-acme-acme.htm
>> l#rfc.section.6.2
>> > states:
>> >
>> >     In the examples below, JWS objects are shown in the JSON or
>> >     flattened JSON serialization
>> >
>> > All examples in the ACME specification use only the flattened
>> serialization.
>> > Depending on the clarification above, this might need to be amended too.
>> >
>> > Best regards
>> > Jörn Heissler
>>
>> 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.
>>
>> Cheers,
>> Fraser
>>
>> _______________________________________________
>> Acme mailing list
>> Acme@ietf.org
>> https://www.ietf.org/mailman/listinfo/acme
>>
>>
>