Re: [websec] #58: Should we pin only SPKI, or also names

Yoav Nir <ynir@checkpoint.com> Wed, 14 August 2013 17:31 UTC

Return-Path: <ynir@checkpoint.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 AC64D21E80C4 for <websec@ietfa.amsl.com>; Wed, 14 Aug 2013 10:31:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.099
X-Spam-Level:
X-Spam-Status: No, score=-10.099 tagged_above=-999 required=5 tests=[AWL=-0.500, BAYES_00=-2.599, J_BACKHAIR_43=1, RCVD_IN_DNSWL_HI=-8]
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 eexTYdWs09SQ for <websec@ietfa.amsl.com>; Wed, 14 Aug 2013 10:31:14 -0700 (PDT)
Received: from smtp.checkpoint.com (smtp.checkpoint.com [194.29.34.68]) by ietfa.amsl.com (Postfix) with ESMTP id D3FA521F9DAF for <websec@ietf.org>; Wed, 14 Aug 2013 10:31:13 -0700 (PDT)
Received: from DAG-EX10.ad.checkpoint.com ([194.29.34.150]) by smtp.checkpoint.com (8.13.8/8.13.8) with ESMTP id r7EHVBLU007844; Wed, 14 Aug 2013 20:31:11 +0300
X-CheckPoint: {520BBEDF-7-1B221DC2-1FFFF}
Received: from IL-EX10.ad.checkpoint.com ([169.254.2.105]) by DAG-EX10.ad.checkpoint.com ([169.254.3.223]) with mapi id 14.02.0342.003; Wed, 14 Aug 2013 20:31:10 +0300
From: Yoav Nir <ynir@checkpoint.com>
To: Trevor Perrin <trevp@trevp.net>
Thread-Topic: [websec] #58: Should we pin only SPKI, or also names
Thread-Index: AQHOjHagv3/BmvZ4wU6WrbkIw+Bd/ZmAXZOAgAADk4CAAHu6gIAIRDGAgAJ+5gCAA6qMgIAB0yuAgACEa4CAAA6sAIAAYXWAgACClYCAADLvgIACEiGAgAADIYA=
Date: Wed, 14 Aug 2013 17:31:10 +0000
Message-ID: <0E8707B2-60C2-407D-9BAE-1A0CEEAEBC7E@checkpoint.com>
References: <060.be9b0009dc0350ca543f553042673944@trac.tools.ietf.org> <073501ce8c6e$f6c17d90$e44478b0$@digicert.com> <CAMm+LwjdGJC4FHCJ_OAYGRqCGGc0Nz1pLV=yVGK9M9E7drfujQ@mail.gmail.com> <CAOuvq200e9HnPX1w9sZ+e7ipBmdgZdPL5xzKDgcaDpSxz1N=gg@mail.gmail.com> <CAMm+Lwh384YBMXw-BDoxJw+AN4qv8x6GQpF9YK4PW1gQRnadpg@mail.gmail.com> <6125A841-6C85-4858-B37F-C021067F0CFA@checkpoint.com> <2035FF99-A079-4F2F-B4DE-962FE1C1B964@checkpoint.com> <CAOuvq20O9bqHGR-5eKPmasNnWEuNW7ACL7PxM09yoTmmyt1UUg@mail.gmail.com> <CAGZ8ZG2C4uB=4vgH325TWeNW89ne4E_DN0j9ZV0t2AKa1o+x9g@mail.gmail.com> <52089A35.9040103@mozilla.org> <CAGZ8ZG3HUUsQJ63mCqHd_LOq+KSdsVpG7Gibdif5dS4oGLywpA@mail.gmail.com> <52091598.7000306@mozilla.org> <faac23b0797219a618f8ffee1932f7e2.squirrel@webmail.dreamhost.com> <CAGZ8ZG1zRJ3fWsK7+Zd_CWjZKTms_YjAxFWzQ+=yrn_VTW+s4g@mail.gmail.com> <5209FF9D.1080208@mozilla.org> <CAGZ8ZG3-WgKuRCWSsB8U_Y72J9TYU83tsmY-QZ8=-8bOoxkj+A@mail.gmail.com>
In-Reply-To: <CAGZ8ZG3-WgKuRCWSsB8U_Y72J9TYU83tsmY-QZ8=-8bOoxkj+A@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.31.20.33]
x-kse-antivirus-interceptor-info: scan successful
x-kse-antivirus-info: Clean
x-cpdlp: 11e042ff1c7c9b0d9c93fd72aec50df796f37e11c5
Content-Type: text/plain; charset="us-ascii"
Content-ID: <DDC77DD1BE482E4A8F6BABD7A784CCE6@ad.checkpoint.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: websec <websec@ietf.org>
Subject: Re: [websec] #58: Should we pin only SPKI, or also names
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, 14 Aug 2013 17:31:19 -0000

On Aug 14, 2013, at 8:20 PM, Trevor Perrin <trevp@trevp.net>
 wrote:

> On Tue, Aug 13, 2013 at 2:42 AM, Gervase Markham <gerv@mozilla.org> wrote:
>> On 13/08/13 07:40, Trevor Perrin wrote:
>>> Names are also smaller, and easier to configure, review, and debug
>>> than lists of hash values.
>> 
>> Sure. No-one is denying that there are some advantages to using names;
>> the question is whether those advantages are worth it given the
>> significant downsides.
> 
> The only real downside I've heard is that this would be a lot of work
> which people don't want to tackle now.
> 
> Which is fine, but I hope we can revisit this later.

Sure, we can.

>> In terms of how to proceed, I suggest the wise thing is to define the
>> syntax so it is open to being extended with names or other identifiers
>> later, but get the standard done without that facility. Then, we don't
>> have to let the best be the enemy of the good.
> 
> Per current spec, any new directives will be ignored by old browsers.
> 
> Do we want the ability for new directives to be somehow marked
> "critical", so that an HPKP header is ignored if these new directive
> aren't understood?

Since pins have an OR relationship between them, a UA has to record all the possible pins, or none. If we get "pin-sha1=xxxxxxx ; pin-named=honest-abes-used-cars-and-certificates.com" and you note only the one you understand (the first), you will block access to the site if the certificate turns out to no longer fit the first pin, even if it does fit the second pin.

So at least new pin encodings need to be critical.

> 
>>>> It's well known and understood that not every user updates their browser
>>>> every cycle. Or, when and if pinning is integrated into an OS, they don't
>>>> always update their OS. So you will quickly have a situation, very easily
>>>> within a few releases, of the name 'Foo CA' ambiguously referring to
>>>> multiple different sets of SPKIs.
>>> 
>>> Browsers would need to stop using name->key mappings that aren't
>>> current (say, more than 30 days old).
>> 
>> And so HPKP no longer works for those sites in those browsers? That
>> doesn't sound great from a security standpoint to me. It also makes
>> using names clearly worse for the site than using hashes.
> 
> HPKP pins based on stale name<->key mappings would not be applied.  I
> think any instantiation of this concept would have to work that way.
> 
> A browser that's been somehow cut-off from security updates for a long
> time will have other vulnerabilities (preloaded pins will be disabled,
> security holes will be unpatched, blacklists and revocation data will
> be absent, etc).

That's fine for a browser, but website administrators will also be required to check whether the string that they entered still means what they though it means. They will be required to check this periodically.

>> That's rather a big change in the idea to be throwing in as a bullet
>> point mid-way through a discussion. Forgive me, but it rather seems like
>> you are making this up as you go along rather than having thought it
>> through and presented a coherent proposal.
> 
> Well, I am.
> 
> The hard part of this is what communication / coordination / registry
> mechanisms can be set up for CAs to coordinate this with browsers.  I
> don't have a good sense of that.

I think the browser-CA communications is the easy part. It's the CA-EE communications that is hard.
> 
> 
>>>> This is independent of mergers - CAs that are issuing new intermediates,
>>>> or deprecating old roots, etc.
>>> 
>>> Yes, but either these get tracked by browsers, or they need to be
>>> tracked by every website using an affected CA pin.
>> 
>> If the idea of using names is greater simplicity for sites, imposing a
>> requirement that they track the goings-on in the CA industry seems not
>> to meet that goal.
> 
> There's some misunderstanding.
> 
> My point is that changes like CAs issuing new intermediates or
> deprecating old roots MUST get incorporated into website pins somehow.
> 
> Either every website using CA pins has to keep track of these changes
> and make these updates (current system).
> 
> Or only the browsers have to do this (named pins).
> 
> Most of the objections people have been raising come down to: "Pinning
> CA keys is hard, CA keys change over time and between root stores, how
> could browsers possibly keep track of this..."
> 
> Any my counter is:  Yes!  It's hard!  Which is why I'd much rather
> have a few browsers keep track of it then ask every website deployer
> to do so.
> 
> 
>>> I could imagine the former becoming widely used.  Websites could
>>> easily see what other websites are doing, discuss and compare which
>>> CAs they consider good choices, and test and review their deployments.
>>> CAs would be incentivized to opt-in to this system by making it easy
>>> for browsers to pin them, and to provide good security so that
>>> websites would choose to include them into pins.
>> 
>> Can't CA's help in the current system?
> 
> Of course, and they'll have to.
> 
> The question is whether they should be publishing this data for every
> pinned website to track, or every browser to track.
> 
> 
>> "Here's the set of 3 opaque
>> strings you should add to your HPKP header to pin to our consumer roots"
>> is not all that much more complex than "Here's a string that looks like
>> a domain name you should add to your HPKP header to pin to our consumer
>> roots".
> 
> I disagree, configuring long lists of random-appearing strings that
> require frequent updating is much harder than configuring a few
> readable names that almost never change.
> 
> But I suppose this is a debate that can be resumed in a year or two
> when we've got more experience.

+1