Re: [websec] draft-ietf-websec-key-pinning

Ryan Sleevi <sleevi@google.com> Tue, 26 August 2014 21:12 UTC

Return-Path: <sleevi@google.com>
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 680171A033C for <websec@ietfa.amsl.com>; Tue, 26 Aug 2014 14:12:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.046
X-Spam-Level:
X-Spam-Status: No, score=-2.046 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.668, SPF_PASS=-0.001] autolearn=ham
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 VB294hJtpc_V for <websec@ietfa.amsl.com>; Tue, 26 Aug 2014 14:12:37 -0700 (PDT)
Received: from mail-yh0-x231.google.com (mail-yh0-x231.google.com [IPv6:2607:f8b0:4002:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F3FC11A87C8 for <websec@ietf.org>; Tue, 26 Aug 2014 14:12:36 -0700 (PDT)
Received: by mail-yh0-f49.google.com with SMTP id b6so12456144yha.8 for <websec@ietf.org>; Tue, 26 Aug 2014 14:12:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wwPlsrNdPOA/R60kvrbG9iyAJHRCW+ZHaAg3TSFP9yo=; b=c0i557z1jMWCQoGAEQ3THCMV37DZPgwgVyXt6ic6rLF+0YSACkcMQwYArZs7deekPd Agy0V0q6zPUV9jp7uDH7c40oliN9JUGvilWeKyu7eh/zZNNz4UL7oUmfcJH5BKDpLVhp 1fJPx8D5VpLlqQGlfgVde3tNbjzKcnWQKK1ZN4WLo2VrMn2nps6CsrF/dp3N+vBdgiIH yWZ21HomIe34xoW+MgiMVBIZrT4Gp8i8Q/Vp1vTj/d2ZKqEJZ+01ajv336PZ7S+D+D1a JaNxRGLnSP+FR3hyvU3dAjDPAO6MstA3hlF6dxOR8e6pek0O4itk5ugGBMIHqM9XSRZm AKFw==
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=wwPlsrNdPOA/R60kvrbG9iyAJHRCW+ZHaAg3TSFP9yo=; b=hW3v65JJN08+M8DJfoMSmeIPinsiJ0JeAV1jIPcFBZPYJTPs6Jz28Q1JkmELYEj0mP Vgs3zVYAM7cWwDMYpEFHMmboMmpdwfFFH5rrDBj8m2GuVGt8hrqZIgci2ZqV44Y7o8iO X99T3g/s3/YxJLGnop+FWCAOYelFxVjhLfjkfYR9hZXXLUVm5EavMMEa+bepXWtoK+JM Wv/fJRtPAg3ELqVOXU0r7w/iOEx9X4hr4/JI6EOKm4C4mLFd9Ab1LGgyZHa8SgPgl0CP pw1CSL7iu12H37nBwh086UKXZCWisbpZ+tFnTGUrCxfSHCr2y9i7uZk8WkLyXIYoDgOt Ab4A==
X-Gm-Message-State: ALoCoQnvE/oby+MuxGJupMf/naptIbkdawBiGzU/Po5JNPcQpCFFJoQP+wcq6313XFfWAKkkBvLo
MIME-Version: 1.0
X-Received: by 10.220.250.142 with SMTP id mo14mr13906408vcb.26.1409087556187; Tue, 26 Aug 2014 14:12:36 -0700 (PDT)
Received: by 10.52.119.178 with HTTP; Tue, 26 Aug 2014 14:12:36 -0700 (PDT)
In-Reply-To: <CA+cU71kitObiZM2Lpc1c8f7waY5u2c5YW787w4xqpJNpbc3ENg@mail.gmail.com>
References: <BAY169-DS62B5941BF0A9024964BB0AEEE0@phx.gbl> <CACvaWvYHAmpX0f9_m-sckhWz9tcyWA-sxVR4vP-A5UcAQmnYXA@mail.gmail.com> <BAY169-DS45F1C5036AB09CA44D0BC7AEDF0@phx.gbl> <CA+cU71k-pLD315dzfd_c74QM51c7V2VQkZ26PiXUTqntmESD=A@mail.gmail.com> <CAOuvq20mZkScvPDKjsa1eZ6rdoHxf_+oF=gpaOcvkOTaYhyj6Q@mail.gmail.com> <CA+cU71mW47OvqRNTbw-H7u-F_k6hMv4xr0XcMYAS_V6eE8brwA@mail.gmail.com> <CAOuvq20C+T9Ejf_KUsfPRtUWL7ggCF0UWJZkGr5xGBEkERXeRQ@mail.gmail.com> <CA+cU71kitObiZM2Lpc1c8f7waY5u2c5YW787w4xqpJNpbc3ENg@mail.gmail.com>
Date: Tue, 26 Aug 2014 14:12:36 -0700
Message-ID: <CACvaWvYdxoLNx9_+fAETUF-VMqN-paz1JBDzym7P9Kwzkcff7w@mail.gmail.com>
From: Ryan Sleevi <sleevi@google.com>
To: Tom Ritter <tom@ritter.vg>
Content-Type: multipart/alternative; boundary="089e013cba223e9eae05018ec3d5"
Archived-At: http://mailarchive.ietf.org/arch/msg/websec/YN9_HZKqdNpcSza2_cAY2sgRASo
X-Mailman-Approved-At: Tue, 26 Aug 2014 14:18:31 -0700
Cc: "draft-ietf-websec-key-pinning@tools.ietf.org" <draft-ietf-websec-key-pinning@tools.ietf.org>, Eric Lawrence <ericlaw1979@hotmail.com>, IETF WebSec WG <websec@ietf.org>
Subject: Re: [websec] draft-ietf-websec-key-pinning
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: Tue, 26 Aug 2014 21:12:40 -0000

On Tue, Aug 26, 2014 at 2:06 PM, Tom Ritter <tom@ritter.vg> wrote:

> On 26 August 2014 15:51, Chris Palmer <palmer@google.com> wrote:
> >> Requiring PKP-RO to be on every load would allow an attacker
> >> to strip the header on the connections they MITM.
> >
> > Only if The Alice Foundation did not also use a regular PKP header.
>
> Correct.
>
> >> Letting it be cached
> >> allows an organization to put a max-age of 45 days on it, without the
> >> risk of bricking their site if they aren't administratively competent.
> >>
> >> Obviously an attacker can also block the reports from being sent, but
> >> I'm hoping that the clause "In any case of report failure, the UA MAY
> >> attempt to re-send the report later" will be considered in this case,
> >> and that UAs will make an attempt at getting potentially blocked
> >> reports out at a later date.
> >
> > Yeah, sort of. But don't think of PKP-RO as a defense against attacks,
> > even if it might sometimes have that secondary benefit. It is
> > primarily a debugging aid for The Alice Foundation and BobCorp to get
> > PKP working. ("What all Trents do we need to trust, anyway?")
>
> I'm not going to put words in your mouth, because different authors
> have different opinions about things, but I will quote from another:
>
> > Ryan Sleevi wrote (
> http://lists.w3.org/Archives/Public/public-webcrypto-comments/2013Feb/0001.html
> )
> >> I wrote:
> >> 1. A large site that is commonly proxies by corporate and malicious
> >> actors wishes to monitor how common this is done.  They place
> >> javascript bindings in their code to view the user's certificate and
> >> report the observed value.
> >> Note this use case has already been performed by Facebook, who had to
> >> resort to Flash to do so, because javascript did not provide the
> >> functionality.
> >
> >Use report-uri with HPKP, in report-only mode
>
> I don't consider PKP-RO as a defense, but as an attempt at detection
> of attacks, with no risk of breaking your site.  It is extraordinarily
> useful to be notified of attacks against your users, even if they are
> not prevented. They help you understand where you should invest time
> and money.
>

To be clear, I absolutely agree with Chris. You cannot and should not be
seeing PKP-RO as a security mechanism.

Contextually, this also lacks the significant discussion of enterprise
policy and the like. As noted in the spec, UAs MAY disable Pin Validation
according to policy - such as locally trusted authorities, such as
corporate proxies or malicious actors.


>
> The foot-gun potential is very high with HPKP, we all know that.  It's
> high enough to the point that many organizations, who have someone
> maintaining a website part time (or outsource it) may forgoe PKP
> entirely because it makes them nervous - but they would be happy to
> deploy a no-risk PKP-RO.  But the benefit of doing so if it is not
> being cached is extraordinarily low, to the point it's probably not
> worth doing.
>
> -tom
>