Re: [jose] #27: member names MUST be unique needs additional text

"Manger, James H" <James.H.Manger@team.telstra.com> Thu, 27 June 2013 08:09 UTC

Return-Path: <James.H.Manger@team.telstra.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CCDF421F9BB4 for <jose@ietfa.amsl.com>; Thu, 27 Jun 2013 01:09:07 -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=[AWL=1.000, BAYES_00=-2.599, GB_I_LETTER=-2, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, RELAY_IS_203=0.994]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UqXvtPsCei8e for <jose@ietfa.amsl.com>; Thu, 27 Jun 2013 01:09:03 -0700 (PDT)
Received: from ipxavo.tcif.telstra.com.au (ipxavo.tcif.telstra.com.au [203.35.135.200]) by ietfa.amsl.com (Postfix) with ESMTP id C916121F9BB7 for <jose@ietf.org>; Thu, 27 Jun 2013 01:09:02 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.87,950,1363093200"; d="scan'208";a="143463213"
Received: from unknown (HELO ipcbvi.tcif.telstra.com.au) ([10.97.217.204]) by ipoavi.tcif.telstra.com.au with ESMTP; 27 Jun 2013 18:08:57 +1000
X-IronPort-AV: E=McAfee;i="5400,1158,7118"; a="141235152"
Received: from wsmsg3753.srv.dir.telstra.com ([172.49.40.174]) by ipcbvi.tcif.telstra.com.au with ESMTP; 27 Jun 2013 18:08:57 +1000
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by WSMSG3753.srv.dir.telstra.com ([172.49.40.174]) with mapi; Thu, 27 Jun 2013 18:08:57 +1000
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: Carsten Bormann <cabo@tzi.org>
Date: Thu, 27 Jun 2013 18:08:55 +1000
Thread-Topic: [jose] #27: member names MUST be unique needs additional text
Thread-Index: Ac5zBkoe9YPcCT6+Q/uqZxl6igm5pwAAGOQA
Message-ID: <255B9BB34FB7D647A506DC292726F6E1151BEDDEB6@WSMSG3153V.srv.dir.telstra.com>
References: <061.bb7bbe0b618ec6b74904f48bdb9bb312@trac.tools.ietf.org> <076.a597050ecb4fb25084cec65f7174dc7e@trac.tools.ietf.org> <033b01ce729b$26ff5c90$74fe15b0$@augustcellars.com> <4E1F6AAD24975D4BA5B16804296739436789B4CC@TK5EX14MBXC283.redmond.corp.microsoft.com> <03b401ce72e5$002c65f0$008531d0$@augustcellars.com> <255B9BB34FB7D647A506DC292726F6E1151BE456D2@WSMSG3153V.srv.dir.telstra.com> <EE290511-7365-4815-A99A-481F8699CC37@tzi.org>
In-Reply-To: <EE290511-7365-4815-A99A-481F8699CC37@tzi.org>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: Jim Schaad <ietf@augustcellars.com>, 'Mike Jones' <Michael.Jones@microsoft.com>, "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] #27: member names MUST be unique needs additional text
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.12
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, 27 Jun 2013 08:09:07 -0000

> > each recipient MUST either reject messages with duplicate names or
> accept only the last name.
> 
> Maybe only gatekeeper functions need validating parsers?

Doubt it. How can a JOSE library tell if it will ever be used by a gateway... better treat all libraries as potential gateways.

> gatekeeper function: A processing step that derives (makes/validates)
> an assertion from a JOSE object and then moves forward that JOSE object
> unchanged to the next processing step (e.g., to preserve a
> signature)
> 
> validating parser: A JSON parser that rejects JSON that might be
> interpreted differently by another JSON parser

But now a validating parser MUST reject dupes, as others might interpret them differently, so the validating parser cannot be built from many standard JSON libraries.

> Are we sure that the duplicate key issue is the only one that needs to
> be checked by a validating parser?  A number of candidate issues:
> 
> http://www.ietf.org/mail-archive/web/json/current/msg01068.html
> 
> E.g., what about issue 3.8?  If a gatekeeper function derives an
> asssertion about a JOSE object mentioning twitter ID
> 10765432100123456789, but the next step thinks it is about
> 10765432100123458000?
>
> https://dev.twitter.com/docs/twitter-ids-json-and-snowflake

That would be a problem, but one for the app using JOSE to fix, not JOSE itself. I don't think any JOSE fields use JSON numbers as integers; and if they did the JOSE spec should add a "MUST be under 2^53" rule. At least in this case it is clearer what is at fault.

> The list in msg01068 also is not complete for our purposes, e.g., it
> mentions normalization issues only in passing.  A validating parser
> sure wants to reject anything that isn't already normalized Unicode.

Not sure if that is a problem. JOSE might avoid those issues (almost by accident) by only defining field names that use ASCII letters. If it turns out that a bunch of JSON parsers "legitimately" accept {"alg":"ABC","\u24D0\u24DB\u24D6":"XYZ"} as having an "alg" value of XYZ (due to some normalization) we would need to amend JOSE to explicitly forbid it. I doubt that isn't necessary.

["\u24D0\u24DB\u24D6" = "ⓐⓛⓖ"]

> Maybe gatekeeper functions are not such a bright idea?

They are everywhere. Firewalls, proxies, WAFs, gateways; any tiered architecture... 
Gateways are fine. Potentially ambiguous messages are the idea that is not so bright. 

It is not just "inline" gateways. You don't want your audit tool, or support tool, that might look at messages after they have been processed to see a different interpretation. You don't want a court disagreeing about a message years later.

--
James Manger