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

Julian Reschke <julian.reschke@gmx.de> Mon, 26 March 2012 08:41 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 B543C21F84E7 for <websec@ietfa.amsl.com>; Mon, 26 Mar 2012 01:41:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.207
X-Spam-Level:
X-Spam-Status: No, score=-104.207 tagged_above=-999 required=5 tests=[AWL=-1.608, 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 wmcL7+Clya2W for <websec@ietfa.amsl.com>; Mon, 26 Mar 2012 01:41:42 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id A04FC21F84AA for <websec@ietf.org>; Mon, 26 Mar 2012 01:41:41 -0700 (PDT)
Received: (qmail invoked by alias); 26 Mar 2012 08:41:39 -0000
Received: from mail.greenbytes.de (EHLO [IPv6:::1]) [217.91.35.233] by mail.gmx.net (mp034) with SMTP; 26 Mar 2012 10:41:39 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+tX6o+vkytD2IoyKg9+4qYjGwZOwmYX9GzFEcwUP lcjjGNXP2QyRxR
Message-ID: <4F702BBE.3060806@gmx.de>
Date: Mon, 26 Mar 2012 10:41:34 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0
MIME-Version: 1.0
To: =JeffH <Jeff.Hodges@KingsMountain.com>
References: <4F702902.1060406@KingsMountain.com>
In-Reply-To: <4F702902.1060406@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: Mon, 26 Mar 2012 08:41:42 -0000

On 2012-03-26 10:29, =JeffH wrote:
>  >> I'm not sure how to cleanly and unambiguously define them in terms of
>  >> both token and quoted-string (and retain max-age's basis on
>  >> delta-seconds). Perhaps you could propose how to do this?
>  >
>  > Just define the base grammar for the overall parsing; such as
>
> I would appreciate it if you would just plain propose the grammar you
> believe we should have.

The base grammar in Section 6 is fine (except for the nit about the 
leading ";" we were already discussing).

For the predefined directives, for example, change:

6.1.1. The max-age Directive


    The REQUIRED max-age directive specifies the number of seconds, after
    the reception of the STS header field, during which the UA regards
    the host, from whom the message was received, as a Known HSTS Host
    (see also Section 8.1.1 "Noting a HSTS Host", below).  The delta-
    seconds production is specified in [RFC2616].

    The syntax of the max-age directive is defined as:

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

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

    Note:  A max-age value of zero signals the UA to cease regarding the
           host as a Known HSTS Host.

to

6.1.1. The max-age Directive

    The REQUIRED max-age directive specifies the number of seconds, after
    the reception of the STS header field, during which the UA regards
    the host, from whom the message was received, as a Known HSTS Host
    (see also Section 8.1.1 "Noting a HSTS Host", below).

    The syntax of the max-age directive's value (after potential
    applying quoted-string unescaping) is:

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

    Note:  A max-age value of zero signals the UA to cease regarding the
           host as a Known HSTS Host.

So this

- states that the given ABNF applies to the value after q-s processing 
(when needed)
- changes the ABNF to specify only the *value*
- also we can remove the prose statement about delta-seconds; having it 
in the ABNF is sufficient

Finally, examples should show both variants of the syntax.

Best regards, Julian