Re: [websec] STS ABNF, was: new rev: draft-ietf-websec-strict-transport-sec-04

Julian Reschke <julian.reschke@gmx.de> Fri, 09 March 2012 08:16 UTC

Return-Path: <julian.reschke@gmx.de>
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 D603421F860B for <websec@ietfa.amsl.com>; Fri, 9 Mar 2012 00:16:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.404
X-Spam-Level:
X-Spam-Status: No, score=-104.404 tagged_above=-999 required=5 tests=[AWL=-1.805, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
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 URuaoojZg470 for <websec@ietfa.amsl.com>; Fri, 9 Mar 2012 00:16:16 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ietfa.amsl.com (Postfix) with SMTP id 83BCD21F85A1 for <websec@ietf.org>; Fri, 9 Mar 2012 00:16:15 -0800 (PST)
Received: (qmail invoked by alias); 09 Mar 2012 08:16:13 -0000
Received: from p3EE26BED.dip.t-dialin.net (EHLO [192.168.178.36]) [62.226.107.237] by mail.gmx.net (mp001) with SMTP; 09 Mar 2012 09:16:13 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19XqSYSUNZXGe3TJqyFmX6ZOQF5jUCyCjKdDin6hB 2W9AKMAugbobEn
Message-ID: <4F59BC49.3020308@gmx.de>
Date: Fri, 09 Mar 2012 09:16:09 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: =JeffH <Jeff.Hodges@KingsMountain.com>
References: <4F594396.1040503@KingsMountain.com>
In-Reply-To: <4F594396.1040503@KingsMountain.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: IETF WebSec WG <websec@ietf.org>
Subject: Re: [websec] STS ABNF, was: new rev: draft-ietf-websec-strict-transport-sec-04
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, 09 Mar 2012 08:16:16 -0000

On 2012-03-09 00:41, =JeffH wrote:
> Thanks for the review Julian,
>
>  > The ABNF now is:
>  >
>  > Strict-Transport-Security = "Strict-Transport-Security" ":"
>  > directive *( ";" [ directive ] )
>  >
>  >
>  > directive = token [ "=" ( token | quoted-string ) ]
>  >
>  > ...and I think this is almost right.
>  >
>  > It does allow empty directives (thus repeated or trailing semicolons),
>  > but not leading semicolons.
>  >
>  > So
>  >
>  > STS: foo ;
>  >
>  > parses, but
>  >
>  > STS: ; foo
>  >
>  > does not.
>
> well, I guess a question is whether we want "STS: ; foo " to "parse" ?
>
> I'm not sure we do, but can be convinced otherwise.
>
> Part of the intention of the above ABNF is that the STS header must have
> at least one directive (i.e. max-age - given the constraints in the
> prose following the ABNF)
>
> I suppose what you're trying to say is that all of the below ought to
> "parse" successfully...
>
> STS: max-age=nnnnnn
>
> STS: max-age=nnnnnn
>
> STS: max-age=nnnnnn ;
>
> STS: max-age=nnnnnn ; ; ;
>
> STS: ; max-age=nnnnnn
>
> STS: ; ; ; max-age=nnnnnn
>
> STS: ; ; ; max-age=nnnnnn ; ; ;
>
> ?

Well, either be permissive with respect to superfluous delimiters or 
don't; but allowing them in once place but not the other?

>  > This could be fixed by saying:
>  >
>  > Strict-Transport-Security = "Strict-Transport-Security" ":"
>  > *( ";" [ directive ] )
>  >
>
> Yes, that's allow for the constructions above, along with (at most one
> instance of) includeSubDomains being interspersed between any of the
> semicolons.
>
>
>
>  > I like the subsequent prose about the additional constraints.
>
> good :)
>
>
>
>  > For 6.1.1 and 6.1.2, we still need to decide whether a) quoted-string
>  > should be legal here (I understand that's
>  > <http://trac.tools.ietf.org/wg/websec/trac/ticket/33>)
>
> sections 6.1.1 and 6.1.2 describe the syntax particular to max-age and
> includeSubDomains directives, and neither of those directives employ
> quoted-string, and I don't think they need to or should.

I think they should, because it's likely that people will write parses 
that allow both, thus you'll have an automated (and totally unneeded) 
interoperatility problem.

> I conceded to add quoted-string syntax to the generic directive syntax of..
>
> directive = token [ "=" ( token | quoted-string ) ]
>
> ..in case someone at some time wishes to add an extension directive
> employing quoted-string syntax.
>
> Are you saying that sections 6.1.1 and 6.1.2 need to explicitly declare
> non-use of quoted-string ? Presently it's implied by the declared ABNF

The opposite.

> ...

Best regards, Julian