Re: [websec] Richard Barnes' Yes on draft-ietf-websec-key-pinning-19: (with COMMENT)

Richard Barnes <rlb@ipv.sx> Wed, 06 August 2014 20:22 UTC

Return-Path: <rlb@ipv.sx>
X-Original-To: websec@ietfa.amsl.com
Delivered-To: websec@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 72D8A1A00FC for <websec@ietfa.amsl.com>; Wed, 6 Aug 2014 13:22:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=unavailable
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id araL0fDwpdkr for <websec@ietfa.amsl.com>; Wed, 6 Aug 2014 13:22:43 -0700 (PDT)
Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7EFA21A00A7 for <websec@ietf.org>; Wed, 6 Aug 2014 13:22:42 -0700 (PDT)
Received: by mail-oi0-f45.google.com with SMTP id e131so2018945oig.4 for <websec@ietf.org>; Wed, 06 Aug 2014 13:22:42 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=NSKv3buq5HNj8JpSd4OOq3yJutyvXTBuYuiAu+J6msA=; b=hzh8pDjsDK8/q2UoCuCiOU7wsJKBlrHs3LSFKMih/yvMNU10ZRYEKSWi+2SKquBOUC Rq0CSP+S5ebpD7wfahjqvn4ZABrxiSR4bZwgqRjVVZauDTRPUZt7sScBRZJeg3Ke3ODc ichkGGymrJonh94jm+Eboyxs96hUlYe73XYAl4tbjcfUvXL3By2UcmAelSQpsSrvrAWZ 8TpT2yK7+f4f61J8pgbM5OShgyFe4v6E2GvF3kLbMuWgMJDM3D4lMY26csbGCP166NKM hC6Sb8emchRsxW8FHuzI6dmm7UgI+M9wOVm8tw3d9emBIOuXvGPG7NwiyLVeERzuCX91 WfQQ==
X-Gm-Message-State: ALoCoQmHehg73b58L0Uyt9uTqQnN5cuoVEgXnu+gpcgujKnd6VAEB437F2bCNWzceHPhY3Tu3pzx
MIME-Version: 1.0
X-Received: by 10.182.20.241 with SMTP id q17mr18251040obe.83.1407356561985; Wed, 06 Aug 2014 13:22:41 -0700 (PDT)
Received: by 10.76.106.202 with HTTP; Wed, 6 Aug 2014 13:22:41 -0700 (PDT)
In-Reply-To: <CACvaWvapKThsHPQPzoJ0BZVwea8fnm5O+OMAHFxdcZudp=MCjw@mail.gmail.com>
References: <20140806192308.15466.52635.idtracker@ietfa.amsl.com> <CACvaWvapKThsHPQPzoJ0BZVwea8fnm5O+OMAHFxdcZudp=MCjw@mail.gmail.com>
Date: Wed, 06 Aug 2014 16:22:41 -0400
Message-ID: <CAL02cgRgxXmGr52rweaUahGZeC=d-Zk8hptVwPTFXNTmbbJ71A@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: Ryan Sleevi <sleevi@google.com>
Content-Type: multipart/alternative; boundary="e89a8f50221cf426f604fffbbbf7"
Archived-At: http://mailarchive.ietf.org/arch/msg/websec/zXMdkw8ZqjWn2yc7r8FwdDsDKBk
Cc: draft-ietf-websec-key-pinning@tools.ietf.org, "<websec@ietf.org>" <websec@ietf.org>, The IESG <iesg@ietf.org>, "websec-chairs@tools.ietf.org" <websec-chairs@tools.ietf.org>
Subject: Re: [websec] Richard Barnes' Yes on draft-ietf-websec-key-pinning-19: (with COMMENT)
X-BeenThere: websec@ietf.org
X-Mailman-Version: 2.1.15
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: Wed, 06 Aug 2014 20:22:49 -0000

On Wed, Aug 6, 2014 at 4:00 PM, Ryan Sleevi <sleevi@google.com> wrote:

>
>
>
> On Wed, Aug 6, 2014 at 12:23 PM, Richard Barnes <rlb@ipv.sx> wrote:
>
>> Richard Barnes has entered the following ballot position for
>> draft-ietf-websec-key-pinning-19: Yes
>>
>> When responding, please keep the subject line intact and reply to all
>> email addresses included in the To and CC lines. (Feel free to cut this
>> introductory paragraph, however.)
>>
>>
>> Please refer to http://www.ietf.org/iesg/statement/discuss-criteria.html
>> for more information about IESG DISCUSS and COMMENT positions.
>>
>>
>> The document, along with other ballot positions, can be found here:
>> http://datatracker.ietf.org/doc/draft-ietf-websec-key-pinning/
>>
>>
>>
>> ----------------------------------------------------------------------
>> COMMENT:
>> ----------------------------------------------------------------------
>>
>> This is an important document, and overall clearly written.  There are a
>> few points that it would be good to clean up.
>>
>>
>> Introduction: "At least one UA..."
>>
>> FWIW, this is now "At least two UAs..."  Firefox also has a manual pin
>> list as of version 32, currently in Beta.
>>
>>
>> Introduction: "but is possible to pin keys without requiring HSTS"
>>
>> -> "but it is ... and vice versa."
>>
>>
>> Section 2.2.2. "Pinned Hosts SHOULD NOT include..."
>>
>> This applies not just to Pinned Hosts, but to any web host, right?
>>
>>
>> Section 2.3.1. "If a UA receives more than one PKP header field ... only
>> the first PKP-RO header field (if present)"
>>
>> This seems problematic in light of the fact that HTTP recipients are
>> allowed to coalesce the values of multiple header fields.
>> http://tools.ietf.org/html/rfc7230#section-3.2.2
>>
>> So, for example, if header coalescing were done at a lower layer in the
>> HTTP stack than HPKP, then the pinning code wouldn't be able to
>> distinguish "first" vs. "rest".  On the other hand, maybe this is a use
>> case for using semicolons as separators, since the combined header field
>> would not be valid.  In either case, there's a need for updated text.
>>
>
> Note, same issue applies to http://tools.ietf.org/html/rfc6797#section-8.1,
> which is the source of this language.
>
> This appears to be RFC 7230 changing the rules that RFC 2616 set out,
> incompatibly.
>
> RFC 2616 reads
> "Multiple message-header fields with the same field-name MAY be present in
> a message if and only if the entire field-value for that header field is
> defined as a comma-separated list [i.e., #(values)]"
>
> In this respect, both this draft and 6797 are compliant with 2616.
>
> RFC 7230 changes this, incompatibly, to read
> "A sender MUST NOT generate ... unless it's defined as a comma-separated
> list [i.e., #(values)] or the header field is a well-known exception"
> "A recipient MAY combine multiple header fields with the same field name,
> ..., without changing the semantics of the message, by appending each
> subsequent field value to the combined field value in order, separated by
> comma."
>
> So this is clearly something that 7230 changed from 2616, in a way that
> provides a more liberal interpretation than 2616 allows.
>
> As addressed earlier on review, because semi-colons are used, if a
> recipient did coalesce, then such a header injection would cause the
> pinning header to be ignored (as invalid), rather than processed. That
> still seems to be acceptable behaviour - e.g. no language change required.
>

Fair enough.  I hadn't seen your response to Pete.




> Section 2.5. "at least one Pin that does NOT refer to an SPKI in the
> certificate chain"
>
> I understand the motivation for this, but this doesn't actually force the
> site to have a backup pin -- they can just make up a pin value.  It seems
> like it would be more effective to make the recommendation in Section 4.3
> stronger.
>

I'm not sure what you see as a viable change. There's no way that a UA can
> confirm a Backup Pin is a valid backup pin, short of requiring the key be
> online and capable of proving itself, which is precisely what having a
> backup pin is to help you avoid.
>

I guess I'm just saying that forcing the server to present a backup pin is
kind of ineffective, precisely because the UA can't verify that it's
actually a backup pin.  So I'm not sure that having this requirement will
result in much more backup pinning than the recommendations in 4.3,
especially if those recommendations were made stronger or more prominent.

But if the WG thinks the requirement for a backup pin is worth the effort,
it is specified interoperably, so I'm not going to stand in the way.

--Richard