Re: [websec] HSTS ABNF still broken: requires leading semi-colon

Martin Thomson <martin.thomson@gmail.com> Fri, 23 March 2012 23:16 UTC

Return-Path: <martin.thomson@gmail.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 5E45021F8550 for <websec@ietfa.amsl.com>; Fri, 23 Mar 2012 16:16:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.62
X-Spam-Level:
X-Spam-Status: No, score=-4.62 tagged_above=-999 required=5 tests=[AWL=-1.021, BAYES_00=-2.599, 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 ptpYwbniaO-5 for <websec@ietfa.amsl.com>; Fri, 23 Mar 2012 16:16:34 -0700 (PDT)
Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by ietfa.amsl.com (Postfix) with ESMTP id 379BF21F854D for <websec@ietf.org>; Fri, 23 Mar 2012 16:16:34 -0700 (PDT)
Received: by bkuw5 with SMTP id w5so3342843bku.31 for <websec@ietf.org>; Fri, 23 Mar 2012 16:16:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Oh4qOEQcz+eDnQuuNsvLQRk9K4Nj1olP1ZtYhEebUR4=; b=dkMn8fhtekh/vim/ozv7NDcOKiApl0i/l+Nu6M9JL7FCsof0foK1pAxTMSQV+NPb6V sRrN7mbTXYrqqhfWTuLwYOm8UbRMBGqR7ZyrI/62fn3cSkud4Sk8z73LZmYhz5v8fi6y abklu1RDASNvFXu2Ab21CSwTh40bhtVVzf5KavXPsSM5PUV4K6NH+nTrnznMh4acEHH1 +nwiPLKW7HJMDNv3PPG8YpD2EgsfO2yGFdSucF8XIcUoowu5dRPpCGAP09PFqhAIUmnS 4qBHtXd32VbTeAZL6N0A5yFXrkTaEKBs6ta/4fYOSILGnSSP6HVCV2bhYzzDypVxoq9U zkWA==
MIME-Version: 1.0
Received: by 10.204.154.210 with SMTP id p18mr2068241bkw.122.1332544593302; Fri, 23 Mar 2012 16:16:33 -0700 (PDT)
Received: by 10.204.121.208 with HTTP; Fri, 23 Mar 2012 16:16:33 -0700 (PDT)
In-Reply-To: <4F6D00C2.6090805@KingsMountain.com>
References: <4F6D00C2.6090805@KingsMountain.com>
Date: Fri, 23 Mar 2012 16:16:33 -0700
Message-ID: <CABkgnnXxPQCJG2uuWuz-avxea_eZJF3Q7S5jD3X60U+NxSZqPQ@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: =JeffH <Jeff.Hodges@kingsmountain.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: IETF WebSec WG <websec@ietf.org>
Subject: Re: [websec] HSTS ABNF still broken: requires leading semi-colon
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: Fri, 23 Mar 2012 23:16:35 -0000

On 23 March 2012 16:01, =JeffH <Jeff.Hodges@kingsmountain.com> wrote:
>> I suggest the following ABNF.
>>
>>   Strict-Transport-Security = "Strict-Transport-Security" ":"
>>                                  directive *( ";" directive )
>>
>>   directive                 = [ token [ "=" ( token | quoted-string ) ] ]
>
>
> Well, I've been counseled in the past (and agree with it) that having an
> ABNF production that is potentially totally null is not such a good idea.
>
> Perhaps this approach addresses this problem and is closer to what Julian
> intended..
>
>     Strict-Transport-Security = "Strict-Transport-Security" ":"
>                                 [ directive ]  *( ";" [ directive ] )
>
>     directive                 = token [ "=" ( token | quoted-string ) ]
>

That's exactly the same as what I see above, and both have two obvious
problems, one of which I think you all missed.

You want zero or more directives ?  or one or more?

for one or more:
STS = "STS" ":" directive *(";" directive)
for zero or more:
STS = "STS" ":" [ directive *(";" directive) ]
and:
directive = token ["="(token / quoted-string)]

Note the second problem: a slash should be used instead of vertical bar.

--Martin