Re: [websec] Strict-Transport-Security syntax redux

Adam Barth <ietf@adambarth.com> Sat, 29 October 2011 08:11 UTC

Return-Path: <ietf@adambarth.com>
X-Original-To: websec@ietfa.amsl.com
Delivered-To: websec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2728521F86C1 for <websec@ietfa.amsl.com>; Sat, 29 Oct 2011 01:11:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.398
X-Spam-Level:
X-Spam-Status: No, score=-2.398 tagged_above=-999 required=5 tests=[AWL=0.579, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 kt2s3Sw+QbBT for <websec@ietfa.amsl.com>; Sat, 29 Oct 2011 01:11:02 -0700 (PDT)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by ietfa.amsl.com (Postfix) with ESMTP id 6D5B121F85A4 for <websec@ietf.org>; Sat, 29 Oct 2011 01:11:02 -0700 (PDT)
Received: by iabn5 with SMTP id n5so6210405iab.31 for <websec@ietf.org>; Sat, 29 Oct 2011 01:11:02 -0700 (PDT)
Received: by 10.231.68.136 with SMTP id v8mr2064976ibi.51.1319875862020; Sat, 29 Oct 2011 01:11:02 -0700 (PDT)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id n30sm16091522ibl.4.2011.10.29.01.11.00 (version=SSLv3 cipher=OTHER); Sat, 29 Oct 2011 01:11:00 -0700 (PDT)
Received: by iabn5 with SMTP id n5so6210354iab.31 for <websec@ietf.org>; Sat, 29 Oct 2011 01:11:00 -0700 (PDT)
Received: by 10.231.6.129 with SMTP id 1mr2064771ibz.31.1319875860144; Sat, 29 Oct 2011 01:11:00 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.231.205.195 with HTTP; Sat, 29 Oct 2011 01:10:30 -0700 (PDT)
In-Reply-To: <4EABB440.1030906@gmx.de>
References: <4EAB66B3.4090404@KingsMountain.com> <CAJE5ia8SkXpwymXVgbjE7YejeNwoMsieUMMgHyBUbi5w2508iQ@mail.gmail.com> <4EABB440.1030906@gmx.de>
From: Adam Barth <ietf@adambarth.com>
Date: Sat, 29 Oct 2011 01:10:30 -0700
Message-ID: <CAJE5ia8rDCDVsK1WjGZO6tBfvFnpmeLDRzhg-F_xBipSHa9tYg@mail.gmail.com>
To: Julian Reschke <julian.reschke@gmx.de>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: IETF WebSec WG <websec@ietf.org>
Subject: Re: [websec] Strict-Transport-Security syntax redux
X-BeenThere: websec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Web Application Security Minus Authentication and Transport <websec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/websec>, <mailto:websec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/websec>
List-Post: <mailto:websec@ietf.org>
List-Help: <mailto:websec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/websec>, <mailto:websec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Oct 2011 08:11:03 -0000

On Sat, Oct 29, 2011 at 1:07 AM, Julian Reschke <julian.reschke@gmx.de> wrote:
> On 2011-10-29 05:08, Adam Barth wrote:
>>
>> ...
>>>
>>> Except for RFC6265, which in the algorithm for parsing "Max-Age=", it
>>> algorithmically provides for ignoring a value that doesn't match the
>>> effective value ABNF of..
>>>
>>>  ["-"]*DIGIT
>>>
>>> ..which would catch the max-age="1" case, but doesn't seem to explicitly
>>> address..
>>>
>>>  max-age=
>>
>> That's handled by some more general processing rules in the spec.  The
>> net result is that it's ignored.
>>
>>> But in any case, perhaps (additional) browser implementor folk could
>>> chime
>>> in here -- do we really need to address such detail-level issues (both of
>>> the examples above and below) in the syntax/grammar we specify in specs
>>> such
>>> as these? Or is the new ABNF proposed in the original message in this
>>> thread
>>> sufficient?
>>
>> Generally, we prefer to be instructed exactly how to behave for every
>> possible input (even illegal ones).  There's a long history of
>> quoted-string not being implemented correctly by browsers.  I spec
>> this as just splitting the string on ; and then processing each
>> substring separately, ignoring bogus/future ones.  I know Julian has a
>> dream that all HTTP headers will be parsed the same, but quoted-string
>> is sufficiently ill-defined w.r.t. error handling that I prefer to
>> avoid it.
>> ...
>
> - when discussing generic parsing, we need to distinguish between legacy
> cases like cookies, and new headers, where we can do better
>
> - standardizing handling of broken headers is one thing (and in general I
> prefer not to), but that doesn't mean that when defining a new header field
> we shouldn't minimize the things a sender can get wrong; if we know that
> some recipients will accept both token and quoted-string anyway, then it
> seems like a good thing to simply allow them both, reducing the number of
> special-cases in parsing
>
> - not sure what you mean by "ill-defined w.r.t. error handling"; it's
> defined just like most other syntax elements in HTTP -- is there something
> *specific* to quoted-string you have in mind?

Most of HTTP is ill-defined w.r.t. error handling.  We muddle through
with reverse engineering.

Adam