Re: [websec] New draft of HTTP header-based public key pinning

Chris Palmer <palmer@google.com> Wed, 09 November 2011 01:30 UTC

Return-Path: <palmer@google.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 C63321F0C51 for <websec@ietfa.amsl.com>; Tue, 8 Nov 2011 17:30:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.977
X-Spam-Level:
X-Spam-Status: No, score=-103.977 tagged_above=-999 required=5 tests=[AWL=-1.000, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-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 8h21l2Sa3x9W for <websec@ietfa.amsl.com>; Tue, 8 Nov 2011 17:30:54 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by ietfa.amsl.com (Postfix) with ESMTP id E665E1F0C3B for <websec@ietf.org>; Tue, 8 Nov 2011 17:30:53 -0800 (PST)
Received: by wwi36 with SMTP id 36so1198514wwi.13 for <websec@ietf.org>; Tue, 08 Nov 2011 17:30:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record; bh=QpC7ECxZtxqE/6lV0ejrgk2tdGCkSdFPXFAEOwZ4YLg=; b=mk29QSyEjshmotNdIhICD31157T8rT5rzVzWoEOxyvYT4XupR1v1hUJmhdKNoTNfRl p1Bp2jjoSXWVy0xM5kqg==
Received: by 10.216.141.155 with SMTP id g27mr5041740wej.19.1320802252718; Tue, 08 Nov 2011 17:30:52 -0800 (PST)
MIME-Version: 1.0
Received: by 10.216.141.155 with SMTP id g27mr5041729wej.19.1320802252251; Tue, 08 Nov 2011 17:30:52 -0800 (PST)
Received: by 10.216.216.205 with HTTP; Tue, 8 Nov 2011 17:30:52 -0800 (PST)
In-Reply-To: <CA+cU71kFFpuooyiBTarvLT3VJigZhW0BgpQi1gMTn7zB=sFh+w@mail.gmail.com>
References: <CAOuvq21Ne0CWT3Dzn0sutGDBg0K+efZhxmqBZiLuxbO2OwxnFg@mail.gmail.com> <CA+cU71kFFpuooyiBTarvLT3VJigZhW0BgpQi1gMTn7zB=sFh+w@mail.gmail.com>
Date: Tue, 08 Nov 2011 17:30:52 -0800
Message-ID: <CAOuvq20uCZsp80yJ6gjeh-AGVswu3GTPuSYYCGyXPWpO-RJpsA@mail.gmail.com>
From: Chris Palmer <palmer@google.com>
To: Tom Ritter <tom@ritter.vg>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: Ian Fette <ifette@google.com>, Chris Evans <cevans@google.com>, IETF WebSec WG <websec@ietf.org>, Wan-Teh Chang <wtc@google.com>
Subject: Re: [websec] New draft of HTTP header-based public key pinning
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: Wed, 09 Nov 2011 01:30:54 -0000

On Tue, Nov 8, 2011 at 4:31 PM, Tom Ritter <tom@ritter.vg> wrote:

> I believe 'directives' should replace "fingerprints" with "pins":
>
>   directives      = max-age LWS ";" LWS pins
>                     / pins LWS ";" LWS max-age

You are right. Fixed.

> I think this paragraph is misworded:
>
> UAs MUST have a way for users to clear current pins that were set by
>   HSTS.  UAs SHOULD have a way for users to query the current state of
>   Pinned Hosts.
>
> Instead of HSTS, should that be "Public Key Pinning"?  If not, pins
> set during HSTS must be flagged and treated differently - why?

You are right. I now say:

UAs MUST have a way for users to clear current pins for Pinned Hosts.
UAs SHOULD have a way for users to query the current state of Pinned
Hosts.

>  - There is no directive or suggestion to User Agents about saving or
> not saving pins received in a private browsing mode.  Maybe there
> shouldn't be, but if a User-Agent does save them, the same 304/ETag
> trick malicious sites use to track users can be created using certs
> and subdomains.

Yes, another person raised this concern, and it is real. I don't see a
way to resolve this problem; perhaps I am not smart enough, but I
can't see a way to have both dynamic pinning AND avoid this tracking
attack.

I am willing to add a paragraph about what browsers should do in
private browsing mode, and I am willing to go either way on what the
requirement should be. I don't know what is best.

>  - The "Pinning Self-Signed End Entities" section was a bit confusing,
> I had to read it a couple times to be sure you were talking about a
> server's self-signed cert, and not a client cert.

Now I say:

If UAs accept hosts that authenticate themselves with self-signed end
entity certificates, they MAY also allow hosts to pin the public keys
in such certificates. The usability and security implications of this
practice are outside the scope of this specification.

Is that better?

>  - The Pin-Break mechanism gets more complicated which each revision.

Yeah, that's why I just dropped it.

> I know it's being shopped around for both this and the approach to put
> pinning in the TLS layer (TACK), but does its removal implies pin
> break codes are not intended to go into the final version of this
> document, or will it be added later after the first bit is worked out?

For now my plan is to ship a trial implementation of HTTP header-based
dynamic pinning without pin break codes, and see how people like it.
It might turn out that nobody likes pinning at all, or that people
like X.509-based dynamic pinning better, and either approach with or
without TACK/pin break codes. To get that trial implementation off the
ground, I'm doing The Simplest Thing That Could Possibly Work.

If it happens that (a) we standardize it without pin break codes and
(b) after a year everyone says, "this is great but it really needs pin
break codes to be awesome", we'll just update the spec and the
implementations.