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

=JeffH <Jeff.Hodges@KingsMountain.com> Thu, 08 March 2012 23:41 UTC

Return-Path: <Jeff.Hodges@KingsMountain.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 4B54421E8042 for <websec@ietfa.amsl.com>; Thu, 8 Mar 2012 15:41:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -100.103
X-Spam-Level:
X-Spam-Status: No, score=-100.103 tagged_above=-999 required=5 tests=[AWL=0.392, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_COM=0.553, RDNS_NONE=0.1, 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 kvXNJdq4llEP for <websec@ietfa.amsl.com>; Thu, 8 Mar 2012 15:41:12 -0800 (PST)
Received: from oproxy7-pub.bluehost.com (oproxy7.bluehost.com [IPv6:2605:dc00:100:2::a7]) by ietfa.amsl.com (Postfix) with SMTP id 8EF0621E802D for <websec@ietf.org>; Thu, 8 Mar 2012 15:41:12 -0800 (PST)
Received: (qmail 27983 invoked by uid 0); 8 Mar 2012 23:41:12 -0000
Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy7.bluehost.com with SMTP; 8 Mar 2012 23:41:12 -0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kingsmountain.com; s=default; h=Content-Transfer-Encoding:Content-Type:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=jOmmRGt7HAhCGapC/i52iiMg5GXEkpGW4jspHoF955Y=; b=zGElfjnHMz0DKfGmphfq35HmBeMOjvNM4/RrXl4MgUnhgI8ocG0OupZSVBVwEISsmbjYyCZfy6sxgQkhfoh0CuSODi686mR7jxqINWgtMho0GX6/wJ+aq0IImy6cgAiC;
Received: from outbound4.ebay.com ([216.113.168.128] helo=[10.244.137.56]) by box514.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from <Jeff.Hodges@KingsMountain.com>) id 1S5mxL-0006GT-J8; Thu, 08 Mar 2012 16:41:11 -0700
Message-ID: <4F594396.1040503@KingsMountain.com>
Date: Thu, 08 Mar 2012 15:41:10 -0800
From: =JeffH <Jeff.Hodges@KingsMountain.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19
MIME-Version: 1.0
To: Julian Reschke <julian.reschke@gmx.de>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Identified-User: {11025:box514.bluehost.com:kingsmou:kingsmountain.com} {sentby:smtp auth 216.113.168.128 authed with jeff.hodges+kingsmountain.com}
Cc: IETF WebSec WG <websec@ietf.org>
Subject: [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: Thu, 08 Mar 2012 23:41:13 -0000

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  ; ; ;

?


 > 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 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 syntax for 
those two defined directives..

     max-age       = "max-age" "=" delta-seconds

     delta-seconds = <1*DIGIT, defined in [RFC2616], Section 3.3.2>

..and..

        includeSubDomains = "includeSubDomains"


thanks again,

=JeffH