Re: [jose] Gen-Art LC review: draft-ietf-jose-jws-signing-input-options-06

Mike Jones <Michael.Jones@microsoft.com> Wed, 23 December 2015 16:15 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 7C14E1A1B4B; Wed, 23 Dec 2015 08:15:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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 Q-_pcehPQUEF; Wed, 23 Dec 2015 08:15:11 -0800 (PST)
Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0106.outbound.protection.outlook.com [65.55.169.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E07DF1A1B3F; Wed, 23 Dec 2015 08:15:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FroQNJEKrbiY+Z99rL0IujAxkoElbA9iUPFBA02dMvM=; b=fYog+xNIFqVa3A1RMCGv+uXfmgxftk4z/6ZeKP73taNKJ7RzDa5YFO2NSLzqE0N5TOz9as9lmLjaUl8j/UTPuZvDWZjBs/R5xZwlnAn08edhq900cK8VplS0QqM2zKxNWjwpTbQxy+/WHXjHqq0uADAs9GqvOBijchH78a395fY=
Received: from BY2PR03MB442.namprd03.prod.outlook.com (10.141.141.145) by BY2PR03MB443.namprd03.prod.outlook.com (10.141.141.152) with Microsoft SMTP Server (TLS) id 15.1.361.13; Wed, 23 Dec 2015 16:15:07 +0000
Received: from BY2PR03MB442.namprd03.prod.outlook.com ([10.141.141.145]) by BY2PR03MB442.namprd03.prod.outlook.com ([10.141.141.145]) with mapi id 15.01.0361.006; Wed, 23 Dec 2015 16:15:07 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Robert Sparks <rjsparks@nostrum.com>, General Area Review Team <gen-art@ietf.org>, "ietf@ietf.org" <ietf@ietf.org>, "jose@ietf.org" <jose@ietf.org>, "draft-ietf-jose-jws-signing-input-options@ietf.org" <draft-ietf-jose-jws-signing-input-options@ietf.org>
Thread-Topic: Gen-Art LC review: draft-ietf-jose-jws-signing-input-options-06
Thread-Index: AQHRLscgygv2Fq2BG0WOTjCzBNezWJ7IOL9AgAE/XYCAAG/XcIAAzrwAgAOmocCACn8i0A==
Date: Wed, 23 Dec 2015 16:15:07 +0000
Message-ID: <BY2PR03MB442229E22E18C0A02958104F5E60@BY2PR03MB442.namprd03.prod.outlook.com>
References: <5661E491.9050007@nostrum.com> <BY2PR03MB442B4D7B1E70A9957D43590F5EC0@BY2PR03MB442.namprd03.prod.outlook.com> <566DDF01.1020806@nostrum.com> <BY2PR03MB442BCE6CA07CC6EA7A86684F5ED0@BY2PR03MB442.namprd03.prod.outlook.com> <566EEA3E.8070302@nostrum.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michael.Jones@microsoft.com;
x-originating-ip: [50.47.85.157]
x-microsoft-exchange-diagnostics: 1; BY2PR03MB443; 5:FJwW2/Pxg8Z1Ma7VFjwT3D4VrZb/bJwZTNMOH4OeZMT8IRkNgrnDDRtKDOynfMAlxjNihHv28DP4IGfL5NAODorfJUCG5A+sXjqzrLUlx/P/Gvac8v5dbdZpKV87IrjmUiiyyXNatADIRpOvTMh0Qg==; 24:qrU7yCM5Cgkm4gWf1h9xz0FZjBzKDnRPddijT0T8WZobgLJaXT30OPH/7moHMu8eU6MeCDcRQjIeuPBr6OMoB9Xpx1KwqnBKdiASncejGn0=
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB443;
x-microsoft-antispam-prvs: <BY2PR03MB443B537B3FA25E138891A55F5E60@BY2PR03MB443.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001)(61426038)(61427038); SRVR:BY2PR03MB443; BCL:0; PCL:0; RULEID:; SRVR:BY2PR03MB443;
x-forefront-prvs: 0799B1B2D7
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(69234005)(189002)(43784003)(51444003)(199003)(479174004)(13464003)(51914003)(24454002)(377454003)(40100003)(122556002)(5002640100001)(2501003)(86362001)(86612001)(2201001)(6116002)(102836003)(189998001)(97736004)(3846002)(76576001)(1220700001)(107886002)(5008740100001)(5001960100002)(586003)(81156007)(5003600100002)(1096002)(5001770100001)(11100500001)(106356001)(10400500002)(99286002)(5005710100001)(10090500001)(8990500004)(10290500002)(92566002)(66066001)(5004730100002)(106116001)(105586002)(50986999)(87936001)(230783001)(74316001)(2900100001)(77096005)(33656002)(101416001)(54356999)(19580405001)(76176999)(19580395003)(93886004); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB443; H:BY2PR03MB442.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2015 16:15:07.4391 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB443
Archived-At: <http://mailarchive.ietf.org/arch/msg/jose/vVDrNs2JZkAhWg4k6bvEBLLVA1U>
Subject: Re: [jose] Gen-Art LC review: draft-ietf-jose-jws-signing-input-options-06
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: <https://mailarchive.ietf.org/arch/browse/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, 23 Dec 2015 16:15:13 -0000

FYI, Robert, "crit" is now required with "b64", as you'd requested.

-----Original Message-----
From: Mike Jones 
Sent: Wednesday, December 16, 2015 4:58 PM
To: 'Robert Sparks' <rjsparks@nostrum.com>; General Area Review Team <gen-art@ietf.org>; ietf@ietf.org; jose@ietf.org; draft-ietf-jose-jws-signing-input-options@ietf.org
Subject: RE: Gen-Art LC review: draft-ietf-jose-jws-signing-input-options-06

Thanks for your thoughtful comments, Robert.  Replies are inline below...

> -----Original Message-----
> From: Robert Sparks [mailto:rjsparks@nostrum.com]
> Sent: Monday, December 14, 2015 5:12 PM
> To: Mike Jones <Michael.Jones@microsoft.com>; General Area Review Team 
> <gen-art@ietf.org>; ietf@ietf.org; jose@ietf.org; 
> draft-ietf-jose-jws-signing- input-options@ietf.org
> Subject: Re: Gen-Art LC review: 
> draft-ietf-jose-jws-signing-input-options-06
> 
> Mike -
> 
> No, this still doesn't explain why crit is not sufficient.

I'll plan on adding something along these lines to the draft to explain this:

"Implementations receiving JWSs using "b64" with a value of "false" will not be able to successful use those JWSs unless they support this extension, since they will be unable to obtain the payload value.  If the JWS includes the "crit" Header Parameter with "b64" in the set of values, this will ensure that implementations not supporting this extension will reject the JWS, but including "crit" is insufficient to enable the receiving implementation to use the JWS; that requires supporting this extension."

> You are making a bare assertion that using crit doesn't achieve a). I 
> think it does. Please explain (in the draft) why it doesn't.
> 
> You are making me guess, but I think you are only trying to avoid 
> having to include the few extra bits in the message. If you've _done_ 
> the work of ensuring all the applications understand using b64 through 
> some out-of- band magic, then including crit will just work. Are you 
> pushing back on anything _but_ the packet-bloat in this case?
> 
> If you _haven't_ done this out-of-band work, and you send to a 
> receiver that understands the extension, then a) is achieved. If you 
> send to a receiver that doesn't understand, things _should_ fail - 
> arguably this also achieving a), though I suspect you are wincing at 
> perhaps not having a clear path to recovery in this case?
> 
> I really think this boils down to you not wanting to pay the extra few 
> bits in the packet to say "crit".
> if that's not the case, please explain (and again, this needs to be in 
> the draft, not just an email thread).

Yes, size matters, but that's not the primary thing that's in play here.  For the extension to be useful, all parties using the JWS must implement the extension, as explained in the new proposed text above.  And once the JWT with the extension is understood, "crit" adds nothing, because it's redundant.  That's why the draft doesn't require it.

But based on your comments and those of other reviewers, since there seems to be demand for it, I plan to add the following text, which I think gets at the heart of the issue you're discussing:

"Using "crit" with "b64"

If a JWS using "b64" with a value of "false" might be processed by implementations not implementing this extension, then the "crit" Header Parameter MUST be included with "b64" in its set of values to cause such implementations to reject the JWS.  Conversely, if used in environments in which all participants implement this extension, then "crit" need not be included, since its inclusion would have no effect, other than increasing the JWS size and processing costs."

> RjS

				Thanks again, Robert,
				-- Mike

> On 12/13/15 10:04 PM, Mike Jones wrote:
> > Hi Robert,
> >
> > You asked "_WHY_ is crit not sufficient? I think that's the thing 
> > that's
> missing as motivation."
> >
> > There are two goals we're discussing, which are related:
> > (a) Having an application that uses "b64":false work.
> > (b) Having an application that receives a JWT with "b64":false not
> misinterpret the payload content.
> >
> > Including "crit":["b64"] would be sufficient to achieve (b), as it 
> > would cause
> the JWS to be rejected by implementations not supporting "b64".  But 
> it does not achieve (a), since the JWS would be rejected.
> >
> > In contrast, using an implementation that understands "b64" achieves 
> > both
> (a) and (b) without needing to include "crit".  That's why it's not required.
> >
> > Does that make sense now?
> >
> > 				Best wishes,
> > 				-- Mike
> >
> > -----Original Message-----
> > From: Robert Sparks [mailto:rjsparks@nostrum.com]
> > Sent: Sunday, December 13, 2015 1:11 PM
> > To: Mike Jones <Michael.Jones@microsoft.com>; General Area Review
> Team
> > <gen-art@ietf.org>; ietf@ietf.org; jose@ietf.org; 
> > draft-ietf-jose-jws-signing-input-options@ietf.org
> > Subject: Re: Gen-Art LC review:
> > draft-ietf-jose-jws-signing-input-options-06
> >
> > Cutting away a bit to focus on the question:
> >
> > On 12/12/15 8:32 PM, Mike Jones wrote:
> >> Hi Robert.  Thanks for the useful review.  Replies are inline below...
> >>
> >>> -----Original Message-----
> > <snip/>
> >>>
> >>> I would have been much more comfortable with a consensus to 
> >>> require
> 'crit'.
> >>> (Count me in the rough if this proceeds with crit being optional).
> >>>
> >>> I assume there is a strong reason to allow for option 1. Please 
> >>> add the motivation for it to the draft, and consider adding a SHOULD use 'crit'
> >>> requirement if option 1 remains.
> >> It's a reasonable request to have the draft say why "crit" isn't required.
> My working draft adds the following new paragraph at the end of the 
> security considerations section to do this.  Unless I hear objections, 
> I'll plan on publishing an updated draft with the paragraph shortly.
> >>
> >> "Note that methods 2 and 3 are sufficient to cause JWSs using this
> extension to be rejected by implementations not supporting this 
> extension but they are not sufficient to enable JWSs using this 
> extension to be successfully used by applications.
> > The conclusion you draw here is not at all obvious.
> > _WHY_ is crit not sufficient? I think that's the thing that's 
> > missing as
> motivation.
> >
> >>    Thus, method 1 - requiring support for this extension - is the 
> >> preferred
> approach and the only means for this extension to be practically 
> useful to applications. Method 2 - requiring the use of <spanx 
> style="verb">crit</spanx> - while theoretically useful to ensure that 
> confusion between encoded and unencoded payloads cannot occur, is not 
> particularly useful in practice, since method 1 is still required for 
> the extension to be usable. When method 1 is employed, method 2 
> doesn't add any value and since it increases the size of the JWS, its 
> use is not required by this specification."
> >>
> >>> Nits/editorial comments:
> >>>
> >>> In the security considerations, the last sentence of the first 
> >>> paragraph needs to be simplified. I suggest replacing it with:
> >>>
> >>> "It then becomes the responsibility of the application to ensure 
> >>> that payloads only contain characters that will not cause parsing 
> >>> problems for the serialization used, as described in Section 5. 
> >>> The application also incurs the responsibility to ensure that the 
> >>> payload will not be modified during retransmission.
> >> I have simplified this in the manner that you suggested.
> >>
> >> 				Thanks again,
> >> 				-- Mike