Re: [jose] thoughts on header criticality from recent polls

"Manger, James H" <James.H.Manger@team.telstra.com> Tue, 26 February 2013 06:19 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 2036621F965D for <jose@ietfa.amsl.com>; Mon, 25 Feb 2013 22:19:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.582
X-Spam-Level:
X-Spam-Status: No, score=-0.582 tagged_above=-999 required=5 tests=[AWL=-0.282, BAYES_00=-2.599, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, HTML_MESSAGE=0.001, J_CHICKENPOX_63=0.6, RELAY_IS_203=0.994]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BF0HZicisOU5 for <jose@ietfa.amsl.com>; Mon, 25 Feb 2013 22:19:40 -0800 (PST)
Received: from ipxavo.tcif.telstra.com.au (ipxavo.tcif.telstra.com.au [203.35.135.200]) by ietfa.amsl.com (Postfix) with ESMTP id 6CD8921F9463 for <jose@ietf.org>; Mon, 25 Feb 2013 22:19:37 -0800 (PST)
X-IronPort-AV: E=Sophos; i="4.84,739,1355058000"; d="scan'208,217"; a="120118606"
Received: from unknown (HELO ipccvi.tcif.telstra.com.au) ([10.97.217.208]) by ipoavi.tcif.telstra.com.au with ESMTP; 26 Feb 2013 17:19:34 +1100
X-IronPort-AV: E=McAfee;i="5400,1158,6997"; a="114912873"
Received: from wsmsg3756.srv.dir.telstra.com ([172.49.40.84]) by ipccvi.tcif.telstra.com.au with ESMTP; 26 Feb 2013 17:19:34 +1100
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by wsmsg3756.srv.dir.telstra.com ([172.49.40.84]) with mapi; Tue, 26 Feb 2013 17:19:33 +1100
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: Mike Jones <Michael.Jones@microsoft.com>, "odonoghue@isoc.org" <odonoghue@isoc.org>, "jose@ietf.org" <jose@ietf.org>
Date: Tue, 26 Feb 2013 17:19:24 +1100
Thread-Topic: [jose] thoughts on header criticality from recent polls
Thread-Index: AQHOE0rnw8y1TNuJwUiSwno8cI9vR5iKtlZAgADi/iA=
Message-ID: <255B9BB34FB7D647A506DC292726F6E1150AC3B6C6@WSMSG3153V.srv.dir.telstra.com>
References: <512B4A34.9090305@isoc.org> <4E1F6AAD24975D4BA5B1680429673943674A42FA@TK5EX14MBXC284.redmond.corp.microsoft.com>
In-Reply-To: <4E1F6AAD24975D4BA5B1680429673943674A42FA@TK5EX14MBXC284.redmond.corp.microsoft.com>
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: multipart/alternative; boundary="_000_255B9BB34FB7D647A506DC292726F6E1150AC3B6C6WSMSG3153Vsrv_"
MIME-Version: 1.0
Subject: Re: [jose] thoughts on header criticality from recent polls
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: Tue, 26 Feb 2013 06:19:41 -0000

A problem with both the FLAT and STRUCTURED syntaxes is that there are lots of non-critical fields.

From JWE (draft 8): critical fields are “alg”, “zip” – and I think that is it. “jku”, “jwk”, “x5u”, “x5t”, “x5c”, “kid”, “typ”(?), and “cty” are non-critical. Even “apu”, “apv”, “epu”, “epv”, “enc”, and “epk” can probably be marked as non-critical (you might not be able to successfully process a JOSE message that has these fields if you ignore them, but you will not *misinterpret* the JOSE message which is the only real concern).

From JWS (draft 8): the only critical field is “alg”.

I doubt anyone wants most field names duplicated in an “ign” array [FLAT syntax].

I don’t like the STRUCTURED syntax. The prospect of writing code that has to look in 2 places for every field it is interested in is fairly appalling (eg k = header.kid !== undefined ? header.kid: header.ign.kid). Not to mention the extra complexity/corner-cases/security-holes from the possibility that a field has 2 different values: one at the top-level, and another under “ign”.


Having 1 critical field that must be given a new value if a new message could otherwise be misinterpreted seems much simpler.


--
James Manger

From: jose-bounces@ietf.org [mailto:jose-bounces@ietf.org] On Behalf Of Mike Jones


FLAT SYNTAX:
    {"alg":"ES256",
     "ign":["notes"],
     "notes":"This header field can be safely ignored"
    }

STRUCTURED SYNTAX:
    {"alg":"ES256",
     "ign":{
       "notes":"This header field can be safely ignored"
      }
    }