Re: [jose] Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)

Mike Jones <Michael.Jones@microsoft.com> Thu, 02 October 2014 21:09 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 283121ACD81; Thu, 2 Oct 2014 14:09:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, 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 TLg_WfqSvtEl; Thu, 2 Oct 2014 14:08:58 -0700 (PDT)
Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0771.outbound.protection.outlook.com [IPv6:2a01:111:f400:fc10::1:771]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 703C21ACD7F; Thu, 2 Oct 2014 14:08:57 -0700 (PDT)
Received: from BN3PR0301CA0070.namprd03.prod.outlook.com (25.160.152.166) by BY2PR03MB396.namprd03.prod.outlook.com (10.141.141.26) with Microsoft SMTP Server (TLS) id 15.0.1039.15; Thu, 2 Oct 2014 21:08:34 +0000
Received: from BN1BFFO11FD011.protection.gbl (2a01:111:f400:7c10::1:163) by BN3PR0301CA0070.outlook.office365.com (2a01:111:e400:401e::38) with Microsoft SMTP Server (TLS) id 15.0.1044.10 via Frontend Transport; Thu, 2 Oct 2014 21:08:33 +0000
Received: from mail.microsoft.com (131.107.125.37) by BN1BFFO11FD011.mail.protection.outlook.com (10.58.144.74) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Thu, 2 Oct 2014 21:08:33 +0000
Received: from TK5EX14MBXC288.redmond.corp.microsoft.com ([169.254.3.218]) by TK5EX14MLTC102.redmond.corp.microsoft.com ([157.54.79.180]) with mapi id 14.03.0195.002; Thu, 2 Oct 2014 21:07:52 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Richard Barnes <rlb@ipv.sx>, Jim Schaad <ietf@augustcellars.com>
Thread-Topic: [jose] Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)
Thread-Index: AQHP3m6p4UJVmTX2iEitvG1b2nQheZwdIy6AgAAlALA=
Date: Thu, 2 Oct 2014 21:07:51 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739439BAB594A@TK5EX14MBXC288.redmond.corp.microsoft.com>
References: <20141002042150.11117.29199.idtracker@ietfa.amsl.com> <10d801cfde6e$4b109320$e131b960$@augustcellars.com> <CAL02cgS+RSe8GgqzXr=VyzHuh0zouiNJWxqmUs9aitAHFVsk_g@mail.gmail.com>
In-Reply-To: <CAL02cgS+RSe8GgqzXr=VyzHuh0zouiNJWxqmUs9aitAHFVsk_g@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.33]
Content-Type: multipart/alternative; boundary="_000_4E1F6AAD24975D4BA5B16804296739439BAB594ATK5EX14MBXC288r_"
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)(438002)(24454002)(13464003)(52044002)(377454003)(199003)(189002)(512874002)(95666004)(77096002)(84676001)(85306004)(561944003)(84326002)(15975445006)(68736004)(21056001)(20776003)(64706001)(92726001)(76176999)(19300405004)(80022003)(54356999)(106116001)(55846006)(97736003)(46102003)(99396003)(86612001)(15202345003)(71186001)(50986999)(16297215004)(26826002)(86362001)(10300001)(87936001)(19617315012)(107046002)(120916001)(19625215002)(19580405001)(19580395003)(33656002)(104016003)(2656002)(85852003)(106466001)(6806004)(4396001)(69596002)(44976005)(66066001)(76482002)(16236675004)(230783001)(81156004)(92566001)(31966008); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB396; 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:BY2PR03MB396;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Forefront-PRVS: 03524FBD26
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/-zobncnPcjzNux7QTasjlUOkfXY
Cc: "jose-chairs@tools.ietf.org" <jose-chairs@tools.ietf.org>, The IESG <iesg@ietf.org>, "jose@ietf.org" <jose@ietf.org>, "draft-ietf-jose-json-web-signature@tools.ietf.org" <draft-ietf-jose-json-web-signature@tools.ietf.org>
Subject: Re: [jose] Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)
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: Thu, 02 Oct 2014 21:09:01 -0000

Replies inline marked “Mike>”…

From: jose [mailto:jose-bounces@ietf.org] On Behalf Of Richard Barnes
Sent: Thursday, October 02, 2014 11:38 AM
To: Jim Schaad
Cc: jose-chairs@tools.ietf.org; The IESG; jose@ietf.org; draft-ietf-jose-json-web-signature@tools.ietf.org
Subject: Re: [jose] Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)



On Thu, Oct 2, 2014 at 2:25 PM, Jim Schaad <ietf@augustcellars.com<mailto:ietf@augustcellars.com>> wrote:


-----Original Message-----
From: Richard Barnes [mailto:rlb@ipv.sx<mailto:rlb@ipv.sx>]
Sent: Wednesday, October 01, 2014 9:22 PM
To: The IESG
Cc: jose@ietf.org<mailto:jose@ietf.org>; jose-chairs@tools.ietf.org<mailto:jose-chairs@tools.ietf.org>; draft-ietf-jose-json-web-signature@tools.ietf.org<mailto:draft-ietf-jose-json-web-signature@tools.ietf.org>
Subject: Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)

Richard Barnes has entered the following ballot position for
draft-ietf-jose-json-web-signature-33: Discuss

When responding, please keep the subject line intact and reply to all email addresses included in the To and CC lines. (Feel free to cut this introductory paragraph, however.)


Please refer to http://www.ietf.org/iesg/statement/discuss-criteria.html
for more information about IESG DISCUSS and COMMENT positions.


The document, along with other ballot positions, can be found here:
http://datatracker.ietf.org/doc/draft-ietf-jose-json-web-signature/



----------------------------------------------------------------------
DISCUSS:
----------------------------------------------------------------------

Overall, this document is in much more solid shape than when it began.
Thanks to the WG for a lot of hard work.  I only have two remaining concerns, which should hopefully be easy to address.

Section 7.2.
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, so I would propose including the following text:

"""
In cases where the JWS has been signed by only a single signer, the "signatures" array will contain a single object.  In such cases, the elements of the single "signatures" object MAY be included at the top level of the JWS object.  A JSON-formatted JWS that contains a "signatures" field MUST NOT contain a "protected", "header", or "signature" field, and vice versa.
"""

This may also require some other changes where "signatures" is relied on, e.g., in Section 9 of the JWE spec.

Mike> This was previously proposed (I believe during the Denver interim meeting) and rejected by the working group because it complicates both producers and parsers by introducing an unnecessary special case.  Currently, by design, whether there are single or multiple signatures, the same syntax is used.  Your proposal would use a different syntax in the single signature case than in the multiple signature case.  This is likely to result in implementation bugs and inconsistencies.

Section 6.
"""
These Header Parameters MUST be integrity protected if the information that they convey is to be utilized in a trust decision.
"""
This smells really fishy to me.  What's your attack scenario?  I'm pretty certain that there's no way any of these fields can be altered in such a way that (1) the signature will validate, and (2) the recipient will accept a key it shouldn't.  By way of contrast, CMS doesn't sign the certificate fields, and the Certificate payload in TLS is only signed as a side effect of the protocol's verification that the remote end has been the same through the whole handshake (which doesn't apply here).
[JLS] There were a couple of attacks that were created for CMS based on using the SKI as the identifier in CMS.  There now exists a signed attribute for CMS to deal with this problem.   IMO the pointer the certificate probably should be a required signing field in CMS

Citation?

Mike> The attack scenario is trivial to describe.  If an attacker can change information used in a trust decision, the trust decision has no validity.  Unless the information is integrity-protected, the attacker could change the non-integrity-protected portions of the JWS in an undetectable way.

Mike> For what it’s worth, Sean had us add language in a number of places that basically said that information is only as trustworthy as its source and the means by which it is obtained.  If I remember correctly, this was one of those places.

----------------------------------------------------------------------
COMMENT:
----------------------------------------------------------------------

Section 2.
In the definition of "Unsecured JWS", it would be good to note that this requires "alg" == "none".

Mike> OK

Section 3.3.
Why doesn't this section have a JSON-encoded form as well?

Mike> Because it’s mean to be a simple introductory example to help people get their head around the concept – not a complete tutorial.  Other examples of JSON-encoded objects are found elsewhere in the document and in the cookbook.

Appendix A.5.
I would prefer if this example could be removed.  JWT is the only use case for Unsecured JWS right now, and there's already an example in that document.

Mike> Given that it’s important that implementers using them understand Unsecured JWSs, there is motivation to retain the example.  I’d be interested in what others in the working group think, given that there was substantial support for retaining this functionality when its removal was proposed.

Thanks for Appendix C.  FWIW, it has been implemented:
http://dxr.mozilla.org/mozilla-central/source/dom/crypto/CryptoBuffer.cpp#85

Mike> You’re welcome.

                                                            -- Mike