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

Julian Reschke <julian.reschke@gmx.de> Sat, 29 October 2011 07:59 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 E77DA21F8495 for <websec@ietfa.amsl.com>; Sat, 29 Oct 2011 00:59:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.358
X-Spam-Level:
X-Spam-Status: No, score=-104.358 tagged_above=-999 required=5 tests=[AWL=-1.759, 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 6tRZcwbzridZ for <websec@ietfa.amsl.com>; Sat, 29 Oct 2011 00:59:36 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ietfa.amsl.com (Postfix) with SMTP id 93BD121F8493 for <websec@ietf.org>; Sat, 29 Oct 2011 00:59:35 -0700 (PDT)
Received: (qmail invoked by alias); 29 Oct 2011 07:59:33 -0000
Received: from p5DCC93A7.dip.t-dialin.net (EHLO [192.168.178.36]) [93.204.147.167] by mail.gmx.net (mp001) with SMTP; 29 Oct 2011 09:59:33 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+8DD5pSHW8+D1P3Z1LyX3swU0J2UhOShrKNJy/FM /ajP/mo5paWcM5
Message-ID: <4EABB25E.9000900@gmx.de>
Date: Sat, 29 Oct 2011 09:59:26 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: =JeffH <Jeff.Hodges@KingsMountain.com>
References: <4EAB66B3.4090404@KingsMountain.com>
In-Reply-To: <4EAB66B3.4090404@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] 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 07:59:37 -0000

On 2011-10-29 04:36, =JeffH wrote:
>  >> Strict-Transport-Security = "Strict-Transport-Security" ":"
>  >> directive *( ";" [ directive ] )
>  >>
>  >> STS directives:
>  >>
>  >> directive = max-age | includeSubDomains | STS-d-ext
>  >>
>  >> max-age = "max-age" "=" delta-seconds
>  >
>  > What happens with
>  >
>  > max-age="1"
>  >
>  > ?
>  >
>  > Do you expect all recipients to reject this? Depending on the parsing
>  > API they use they might not even know that the value was quoted on
> the wire.
>
> Offhand, I'm not super sure, but after thinking about it while
> researching/writing the below, I'm thinking "yes", max-age="1" is
> invalid according to the ABNF and we should do whatever we do in error
> cases (which is a separate open question). But implementors' parsing API
> and its problems are out-of-scope for a spec such as this.

They are out-of-scope in that we don't specify them. But we still should 
consider what's likely to be implemented, and the cost of not being able 
to re-use a generic parser.

> This obviously isn't the first HTTP response header field with such a
> syntax and thus these potential issues (this one with a delta-seconds
> value, and the issue you note below wrt "includeSubDomains"), yes?

Indeed. It's just I've been paying more attention to these kinds of 
issues recently :-)

>  > > includeSubDomains = "includeSubDomains"
>  >
>  > There's a tiny risk that some implementations will handle value-less
>  > parameters the same way as parameters with empty values, such as
>  >
>  > includeSubDomains=
>  >
>  > or
>  >
>  > includeSubDomains=""
>  >
>  > but maybe I'm over-engineering here.
>
> Yes, I'm wondering if this might be over-engineering -- I note that in
> RFC 6266 you didn't distinguish/address this sort of case for "inline"
> or "attachment" -- are you feeling now that you should have, and thus we
> ought to do so going forward?
> ...

That case is a bit different as this is a stand-alone token, and there 
do not seem to be any header fields that are similar to C-D but allow a 
quoted-string in the first position.

Also see <http://greenbytes.de/tech/tc2231/#inlonlyquoted> -- some 
recipients reject it, some don't. This is not a big issue per se, unless 
those you reject it are forced to follow suite because senders start to 
rely on it.

> ...

Best regards, Julian