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

Tim Bray <tbray@textuality.com> Mon, 25 February 2013 22:17 UTC

Return-Path: <tbray@textuality.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 82F8C21F85ED for <jose@ietfa.amsl.com>; Mon, 25 Feb 2013 14:17:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level:
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 raoF9dl2UH3Y for <jose@ietfa.amsl.com>; Mon, 25 Feb 2013 14:17:43 -0800 (PST)
Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by ietfa.amsl.com (Postfix) with ESMTP id 07B0A21E80FA for <jose@ietf.org>; Mon, 25 Feb 2013 14:17:42 -0800 (PST)
Received: by mail-vc0-f175.google.com with SMTP id fw7so2034874vcb.20 for <jose@ietf.org>; Mon, 25 Feb 2013 14:17:42 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=rF2h4j7jSXjrxO+3ORUpPfn8hHaZiCLysbsM9lzPRFU=; b=FC7060AVTranv5wpY5GrCd3ZZ2CeFAazbUbJmO1rNBrPdb4C0FKFFcrZG1L+S1c+8N vt/ZCP9QPu+PRSfgEn7povyuaDJPVATpZLdQWt85+iPh6BLh4yO+RMjSP8DQKMUHp88I 5IHXUiG8NxpXtKVq6wtglynCXisPER+Fh1MdYMET2wuhNBkpJmbLYAWj0Mf2ndqB9513 r723c7IvsVYZyQqbfJQcWofu6ydzsQFVABo8fOQcSjcxEo/rgXnPScN6pjlTCpUw/E5C 1zp3JWZn78h6uVZloYgMLd3k942qeAJfymi9Ib13gZemmKH8WUp9WQ1IX1JlhnVNF2x0 z7DQ==
MIME-Version: 1.0
X-Received: by 10.52.28.101 with SMTP id a5mr9196584vdh.92.1361830662333; Mon, 25 Feb 2013 14:17:42 -0800 (PST)
Received: by 10.220.167.10 with HTTP; Mon, 25 Feb 2013 14:17:42 -0800 (PST)
X-Originating-IP: [172.19.244.51]
In-Reply-To: <4E1F6AAD24975D4BA5B1680429673943674A42FA@TK5EX14MBXC284.redmond.corp.microsoft.com>
References: <512B4A34.9090305@isoc.org> <4E1F6AAD24975D4BA5B1680429673943674A42FA@TK5EX14MBXC284.redmond.corp.microsoft.com>
Date: Mon, 25 Feb 2013 14:17:42 -0800
Message-ID: <CAHBU6iupD-1B2w6HO4ttxwBk3Tr-Pp2PHkZqqgj0HoMv00LHAw@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: Mike Jones <Michael.Jones@microsoft.com>
Content-Type: multipart/alternative; boundary="20cf307d064edf835504d693e806"
X-Gm-Message-State: ALoCoQkTn8dCp8htA2XlA1lG4gZx/1sCeQl0wrwaT5TfVCAcDzBfSA5tlTKi/ll/GSi1Z1gAPu84
Cc: "jose@ietf.org" <jose@ietf.org>, "odonoghue@isoc.org" <odonoghue@isoc.org>
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: Mon, 25 Feb 2013 22:17:45 -0000

One addition to Mike’s notes.  If you are going to have ignorable fields,
it’d be nice to avoid one of the (many, many) design botches that increased
the difficulty of doing SOAP; it had a thing where you could specify, in
among the SOAP headers, a MUST-UNDERSTAND rule. The effect was that you
didn’t know whether you could act on any header until you’d seen them all,
because there might be a MUST-UNDERSTAND lurking somewhere.

The "ign" : [ "notes" ] idiom has, to my eye, that drawback.  The
structured one lets you know, as soon as you see a field, whether it’s OK
to not understand it.  -T


On Mon, Feb 25, 2013 at 7:41 AM, Mike Jones <Michael.Jones@microsoft.com>wrote:

>  Thanks for sending this, Karen.  Hopefully your analysis will help the
> working group reach a resolution on this issue soon.  I’m writing this note
> primarily as an editor to help inform the working group’s discussions,
> rather than as an individual contributor.****
>
> ** **
>
> First, I want to point out that while we’ve been discussing criticality of
> header parameters, the specs actually currently have the “MUST be
> understood” language in the JWK specification as well, as that’s another
> potential extension point.  The JWK description says “Additional members
> MAY be present in the JWK.  If present, they MUST be understood by
> implementations using them.”  The same language is present for the JWK Set.
>  For our resolution of the issue to be complete, it should address those
> uses too.  Given that a number of additional JWK fields are being
> discussed, I expect that extensions will occur there.****
>
> ** **
>
> Second, if we do decide to go with your approach (1), I’ll summarize for
> the list what I believe the two syntax proposals on the table are for doing
> this.  One proposal is 2A in
> http://www.ietf.org/mail-archive/web/jose/current/msg01353.html (which
> I’ll call the FLAT SYNTAX) and the other is the syntax that Dick Hardt
> proposed in
> http://www.ietf.org/mail-archive/web/jose/current/msg01457.html (which
> I’ll call the STRUCTURED SYNTAX).  I believe that it would be useful for
> the working group to discuss which of those they would prefer in parallel
> to discussing the questions that you asked, so that if we do go with
> approach (1) or something like it, we’ll know which to use.****
>
> ** **
>
> 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"****
>
>       }****
>
>     }****
>
> ** **
>
> As I see it, the advantage of the flat syntax is all header fields are in
> the same place.  This makes processing header fields easier and is more
> regular.  The disadvantage is that the list of fields that may be safely
> ignored repeats those field names.****
>
> ** **
>
> As I see it, the advantage of the structured syntax is that nothing is
> repeated, resulting in cleaner JSON syntax.  The disadvantage is that then
> some header fields are in one place and some are in another, making the
> processing rules for header fields more complicated.****
>
> ** **
>
> Between these two, it seems to come down to a choice between cleaner
> syntax or cleaner semantics.  (I’d personally lean towards the simpler
> processing rules resulting from the flat syntax, but I would be fine with
> this coming out either way.)****
>
> ** **
>
> Finally, I’ll point out that I don’t believe that your approaches (1) and
> (2) are mutually exclusive.  We could conceivably leave it up to
> application specifications using the JOSE specs whether they require header
> fields to be understood by default AND provide a syntax for declaring which
> fields may be safely ignored for use in those application contexts where
> the application spec does require that header fields be normally
> understood.  In fact, one might consider this to fall under the “(possibly
> providing guidance directed to those applications in the JOSE specs)”
> that you suggested below.****
>
> ** **
>
> I hope the points above help further a productive discussion of this topic.
> ****
>
> ** **
>
>                                                             -- Mike****
>
> ** **
>
> *From:* jose-bounces@ietf.org [mailto:jose-bounces@ietf.org] *On Behalf
> Of *Karen O'Donoghue
> *Sent:* Monday, February 25, 2013 3:26 AM
> *To:* jose@ietf.org
> *Subject:* [jose] thoughts on header criticality from recent polls****
>
> ** **
>
> Folks,
>
> Thank you for your patience with me regarding the recent polls on header
> criticality. I realize I have taken too long to respond from a chairs
> perspective with some results and direction. I had hoped to provide either
> a decision or a clear set of choices, but after analyzing the poll results,
> rereading all the email traffic (multiple times), and talking to a few
> working group members, I find I am not quite able to do so. So, what
> next...
>
> First, what I do believe...
>
> I think it is clear that the working group remains divided on this issue
> with a significant number of members feeling that an approach must be
> defined that safely allows for some header fields to be considered
> non-critical. I think there is general consensus that there must be
> reasonable mechanisms for extensibility, and that the approach must be
> generic. Based on that, I would like to ask the working group to move
> forward with the strategy that all headers cannot be considered critical
> and move on to the discussion of how to approach non-critical headers.
>
> In my review of the mailing list traffic (and my apologies if I missed
> something), I have seen a number of basic approaches proposed (summarized
> by Jim Schaad on 9 Oct 2012 with the response by James Manager on 10 Oct
> 2012). In particular, I found James' list of requirements to be very
> helpful, and I have repeated it here...
>
> A. Want to be able to define messages with new semantics in future,
> without any risk that old implementations will misinterpret them with old
> semantics.
>
> B. Want to be able to *redefine* (or constrain) the semantics of
> *existing* fields in future, without any risk that old implementations will
> misinterpret them with old semantics (or without the constraints).
>
> C. Want to prevent large blobs of ignored data appearing in messages, as
> similar blobs have been used to create hash collisions between legitimate &
> malicious certificates that use weak algorithms (eg MD5).
>
> D. Want to strongly discourage future extensions (feature-creep), under
> the philosophy that even well-intentioned extensions tend to do more harm
> (by adding complexity that is only deployed sporadically) than the good of
> any new functionality they bring.
>
> E. Loosely coupling clients and servers is generally considered a good
> thing; but strongly coupling them is more appropriate for a secure message
> format for [insert a reason here]. A possible reason is that people are too
> likely to choose to make an extension non-critical for short-term ease of
> interoperability, instead of making it critical for better long-term
> security.
>
> From this list, I believe A is definitely a requirement. I am unclear
> regarding working group consensus on B, C, and E, and I believe D is not a
> requirement.
>
> QUESTION: Is there working group consensus on the requirements we are
> trying to address? Perhaps a short discussion clarifying these would help
> drive consensus on the overall approach.
>
> As for possible solutions, we appear to have evolved to the point where we
> are of two minds:
>
> 1) Define a header field that explicitly lists the fields that may be
> safely ignored if not understood. (Here I am assuming that we aren't
> going to define a separate header for non-critical elements.)
>
> 2) Remain silent on header criticality in the JOSE specifications and
> leave it up to the various application specifications (possibly providing
> guidance directed to those applications in the JOSE specs).
>
> I sense that there is more support for the first approach, but I am
> concerned that there is a significant minority that favor the second
> approach.
>
> QUESTION: Can the working group agree on whether to work on approach 1 or
> approach 2?
>
> In conclusion, I am asking three things in this missive:
> 1. I am asking the working group to move forward based on a non-critical
> headers approach.
> 2. I am asking the working group to clarify the requirements driving the
> non-critical header discussion (A, B, C, D, E, or ?).
> 3. I am asking the working group to decide whether the right approach is
> to develop a specific syntax (if so, what?) or to defer to the applications
> with appropriate guidance (if so, what level of guidance)? To address this
> item, I welcome concise proposals of text.
>
> I realize this message is long and not as specific or prescriptive as some
> would like, and I apologize in advance for any mistakes and
> misunderstandings on my part.
>
> Regards,
> Karen O'Donoghue****
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>
>