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

Yoav Nir <ynir@checkpoint.com> Thu, 15 August 2013 16:16 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 99F8C21E80A1 for <websec@ietfa.amsl.com>; Thu, 15 Aug 2013 09:16:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.543
X-Spam-Level:
X-Spam-Status: No, score=-10.543 tagged_above=-999 required=5 tests=[AWL=0.056, BAYES_00=-2.599, 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 fomMPBeqn8Yv for <websec@ietfa.amsl.com>; Thu, 15 Aug 2013 09:16:18 -0700 (PDT)
Received: from smtp.checkpoint.com (smtp.checkpoint.com [194.29.34.68]) by ietfa.amsl.com (Postfix) with ESMTP id DC89421E8084 for <websec@ietf.org>; Thu, 15 Aug 2013 09:16: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 r7FGG9BO028884; Thu, 15 Aug 2013 19:16:09 +0300
X-CheckPoint: {520CFEC9-14-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; Thu, 15 Aug 2013 19:16:08 +0300
From: Yoav Nir <ynir@checkpoint.com>
To: Tobias Gondrom <tobias.gondrom@gondrom.org>
Thread-Topic: [websec] #58: Should we pin only SPKI, or also names
Thread-Index: AQHOjHagv3/BmvZ4wU6WrbkIw+Bd/ZmAXZOAgAADk4CAAHu6gIAIRDGAgAJ+5gCAA6qMgIAB0yuAgACEa4CAAA6sAIAAYXWAgACClYCAADLvgIACEiGAgABrbACAAJAKAIAAAumAgAAKsYCAAGecgIAABRGAgAAKr4A=
Date: Thu, 15 Aug 2013 16:16:08 +0000
Message-ID: <0C203D85-A82B-4CF3-8E36-7867B8803CB1@checkpoint.com>
References: <060.be9b0009dc0350ca543f553042673944@trac.tools.ietf.org> <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> <520C166E.7000202@mozilla.org> <CAGZ8ZG0SHHFWkx-uQGAzCXXBijZw_PnsChfQ0zbmx5AWg6T2Vg@mail.gmail.com> <520C91B3.20402@mozilla.org> <CAGZ8ZG37s3RoL+TO33JBwuniQXJtV=cGvNrzARGUp9A9w3rn8g@mail.gmail.com> <D3C42FFE-C17E-440B-80BE-FB989AD5E1A4@checkpoint.com> <520CF5D5.20008@gondrom.org>
In-Reply-To: <520CF5D5.20008@gondrom.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.31.20.3]
x-kse-antivirus-interceptor-info: scan successful
x-kse-antivirus-info: Clean
x-cpdlp: 11682f0913d6093a13c4c77914d6b7dd01dfe1992d
Content-Type: text/plain; charset="iso-8859-1"
Content-ID: <CA187744A6282A46879621F6B562A74F@ad.checkpoint.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "<websec@ietf.org>" <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: Thu, 15 Aug 2013 16:16:24 -0000

On Aug 15, 2013, at 6:37 PM, Tobias Gondrom <tobias.gondrom@gondrom.org> wrote:

> On 15/08/13 16:19, Yoav Nir wrote:
>> On Aug 15, 2013, at 12:08 PM, Trevor Perrin <trevp@trevp.net> wrote:
>> 
>>> On Thu, Aug 15, 2013 at 1:30 AM, Gervase Markham <gerv@mozilla.org> wrote:
>>>> On 15/08/13 09:20, Trevor Perrin wrote:
>>>>> So you're expecting sites to edit their HPKP header on every cert
>>>>> change?
>>>> No; it's quite possible that the advice on renew would be "keep the same
>>>> pins".
>>> OK.  So you're expecting sites to request a new cert at least T days
>>> prior to their existing cert expiring (where T is the length of time
>>> needed for extant pins to expire).
>> That would require either the sites to buy more certs than they need (and have overlapping certs) or the CAs to issue future certs (notBefore date T days in the future) and commit to the pinning data being valid for (validity_period + T). Not rocket science, but somewhat error prone.
>> 
>> OTOH if the site administrator pins the EE public key, they don't need to involve the CA at all. They just need to generate the key pair (or the certificate request) T days in advance, and add the new pin to the HPKP header/resource.
>> 
>> If someone were to ask me what a good pinning policy would be, I would say that they need three pins most of the time:
>> 1. for the EE certificate
>> 2. for the current root CA
>> 3. for some other root CA (that you trust)
>> 
>> If the EE certificate is compromised, you issue a new one from the current root CA, and update the pin.
>> If the CA gets compromised, you issue a new cert from the backup root CA and update the pin (also with a new backup)
>> T days before expiry, you generate a certreq, and add the new public key as a fourth pin until you change the certificate. 
>> 
>> The pinning idea became cool because static pinning caught the Diginotar breach. A policy like this would detect fake certificates (as long as Diginotar was not your primary or backup CA).
>> 
>> If CAs publish pin data on their website and guarantee that they will put any change on their website at least x days before the change takes place (90 days?) this kind of policy would work, but it would require administrators to check monthly both their primary and backup pins, otherwise the recovery plan above won't work.
> Actually the CA could also use an email push service instead of or in
> addition to the website publication.

They could, but occasionally the contact person at the customer's is someone who's left the company. Also, while the primary CA has your address, the backup CA has no idea that it is the backup CA. But yes, a link with "sign up for email updates regarding pinning data" would work.

Yoav