Re: [jose] draft-ietf-jose-json-web-signature ; flattened serialization

Mike Jones <Michael.Jones@microsoft.com> Wed, 29 October 2014 04:26 UTC

Return-Path: <Michael.Jones@microsoft.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 694B01A6F63 for <jose@ietfa.amsl.com>; Tue, 28 Oct 2014 21:26:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 I82WyrsnvCP8 for <jose@ietfa.amsl.com>; Tue, 28 Oct 2014 21:26:07 -0700 (PDT)
Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0147.outbound.protection.outlook.com [65.55.169.147]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DDB851A6F5A for <jose@ietf.org>; Tue, 28 Oct 2014 21:26:06 -0700 (PDT)
Received: from BN3PR0301CA0005.namprd03.prod.outlook.com (25.160.180.143) by BY1PR0301MB1208.namprd03.prod.outlook.com (25.161.203.16) with Microsoft SMTP Server (TLS) id 15.1.6.9; Wed, 29 Oct 2014 04:26:05 +0000
Received: from BN1AFFO11FD030.protection.gbl (2a01:111:f400:7c10::156) by BN3PR0301CA0005.outlook.office365.com (2a01:111:e400:4000::15) with Microsoft SMTP Server (TLS) id 15.1.11.14 via Frontend Transport; Wed, 29 Oct 2014 04:26:04 +0000
Received: from mail.microsoft.com (131.107.125.37) by BN1AFFO11FD030.mail.protection.outlook.com (10.58.52.168) with Microsoft SMTP Server (TLS) id 15.0.1049.20 via Frontend Transport; Wed, 29 Oct 2014 04:26:04 +0000
Received: from TK5EX14MBXC286.redmond.corp.microsoft.com ([169.254.1.93]) by TK5EX14HUBC103.redmond.corp.microsoft.com ([157.54.86.9]) with mapi id 14.03.0210.003; Wed, 29 Oct 2014 04:25:33 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Fraser Tweedale <frase@frase.id.au>, "draft-ietf-jose-json-web-signature@tools.ietf.org" <draft-ietf-jose-json-web-signature@tools.ietf.org>, "jose@ietf.org" <jose@ietf.org>
Thread-Topic: draft-ietf-jose-json-web-signature ; flattened serialization
Thread-Index: AQHP8y5fIRbO5Va9Y0STZ0rwvdUYypxGeatg
Date: Wed, 29 Oct 2014 04:25:32 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739439BB2FE2B@TK5EX14MBXC286.redmond.corp.microsoft.com>
References: <20141029041043.GC55748@bacardi.hollandpark.frase.id.au>
In-Reply-To: <20141029041043.GC55748@bacardi.hollandpark.frase.id.au>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.35]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:CAL; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(438002)(199003)(377454003)(189002)(13464003)(106116001)(66066001)(19580395003)(15975445006)(95666004)(85806002)(2201001)(97736003)(46102003)(86612001)(87936001)(15202345003)(107046002)(69596002)(44976005)(19580405001)(81156004)(84676001)(106466001)(68736004)(50466002)(120916001)(85852003)(50986999)(92726001)(6806004)(92566001)(4396001)(21056001)(33656002)(46406003)(80022003)(2656002)(99396003)(31966008)(230783001)(64706001)(76176999)(47776003)(85306004)(20776003)(76482002)(55846006)(104016003)(26826002)(97756001)(86362001)(77096002)(23726002)(54356999)(2501002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1208; H:mail.microsoft.com; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en;
X-Microsoft-Antispam: UriScan:;
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1208;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Forefront-PRVS: 03793408BA
Received-SPF: Pass (protection.outlook.com: domain of microsoft.com designates 131.107.125.37 as permitted sender) receiver=protection.outlook.com; client-ip=131.107.125.37; helo=mail.microsoft.com;
Authentication-Results: spf=pass (sender IP is 131.107.125.37) smtp.mailfrom=Michael.Jones@microsoft.com;
X-OriginatorOrg: microsoft.onmicrosoft.com
Archived-At: http://mailarchive.ietf.org/arch/msg/jose/3VATzNcbLMW-d_ypPMsngeI5Kc8
Cc: Richard Barnes <rlb@ipv.sx>
Subject: Re: [jose] draft-ietf-jose-json-web-signature ; flattened serialization
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Oct 2014 04:26:09 -0000

Thank you for your feedback, Fraser.  It would be useful to hear from others who have implemented the JSON Serializations whether they agree with Fraser or Richard.

				-- Mike

P.S.  The list you sent it to reached the editors and chairs.  The jose@ietf.org list reaches the whole JOSE working group.

-----Original Message-----
From: Fraser Tweedale [mailto:frase@frase.id.au] 
Sent: Tuesday, October 28, 2014 9:11 PM
To: draft-ietf-jose-json-web-signature@tools.ietf.org
Subject: draft-ietf-jose-json-web-signature ; flattened serialization

Hello,

(I am not familiar with IETF WG processes so I hope I am communicating in a useful way and in the right place.)

JWS draft 36 adds a "flattened JWS syntax" for the case where there is a single signature.  A similar change was made for JWE in the single recipient case.

Richard Barnes proposed these changes on the following basis:

    ``I've had several implementors trying to use JWS in the JSON
    serialization ask why it was necessary to include a "signatures"
    array in cases where there's only one signer.  It seems like this is
    going to be a major barrier to deployment and re-use.''

I am the author of a Haskell JOSE library
(http://hackage.haskell.org/package/jose) and object to these changes on the following bases:

- They add substantial complexity to the parsing of JWS and JWE
  objects (which is already complex).

- The nature of the "optimisation" for the single-signature case is
  unclear.  If the optimisation is for compactness, this is obviated
  by "7.2. JWE JSON Serialization" which states ``This
  representation is neither optimized for compactness nor
  URL-safe.''  If the optimisation is for simplicity, it is a false
  economy.

- The fact that implementors were asking about this part of the spec
  does not imply an impediment to deployment and re-use.  (Perhaps
  comments to this effect were in fact made, but as written the
  justification is speculative.)

The wish for a "simpler" serialization for a common use case is understandable, but this is a case of "be careful what you wish for".  Commentary to the effect of "the signatures array is used even when there is a single signature/recipient to keep parsing as simple as possible" would give implementors the answer to this question and relieve them of the additional complexity required to support the Flattened Serialization in addition to the General Serialization.

Please consider reverting this recent change to the specification.

Regards,

Fraser Tweedale