Re: [websec] Comments on draft-ietf-websec-key-pinning-06

Yoav Nir <ynir@checkpoint.com> Sun, 23 June 2013 07:26 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 034EB21F9C5E for <websec@ietfa.amsl.com>; Sun, 23 Jun 2013 00:26:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.606
X-Spam-Level:
X-Spam-Status: No, score=-10.606 tagged_above=-999 required=5 tests=[AWL=-0.008, BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 WzF8cGzXtY3i for <websec@ietfa.amsl.com>; Sun, 23 Jun 2013 00:26:02 -0700 (PDT)
Received: from smtp.checkpoint.com (smtp.checkpoint.com [194.29.34.68]) by ietfa.amsl.com (Postfix) with ESMTP id 9493921F9BFE for <websec@ietf.org>; Sun, 23 Jun 2013 00:26:01 -0700 (PDT)
Received: from IL-EX10.ad.checkpoint.com ([194.29.34.147]) by smtp.checkpoint.com (8.13.8/8.13.8) with ESMTP id r5N7PwYs011558; Sun, 23 Jun 2013 10:25:58 +0300
X-CheckPoint: {51C6A306-9-1B221DC2-1FFFF}
Received: from DAG-EX10.ad.checkpoint.com ([169.254.3.48]) by IL-EX10.ad.checkpoint.com ([169.254.2.180]) with mapi id 14.02.0342.003; Sun, 23 Jun 2013 10:25:58 +0300
From: Yoav Nir <ynir@checkpoint.com>
To: David Matson <dmatson@microsoft.com>
Thread-Topic: [websec] Comments on draft-ietf-websec-key-pinning-06
Thread-Index: Ac5t5xheMaFE3h1jTOy+Nog0fBhFEQB4q68A
Date: Sun, 23 Jun 2013 07:25:58 +0000
Message-ID: <6F2FE5F2-D02C-4B09-A6CA-7C3B63722E34@checkpoint.com>
References: <8c03997da80b4e8da7100491011b8c12@BN1PR03MB039.namprd03.prod.outlook.com>
In-Reply-To: <8c03997da80b4e8da7100491011b8c12@BN1PR03MB039.namprd03.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.31.20.74]
x-kse-antivirus-interceptor-info: protection disabled
x-cpdlp: 1113787d79f99e2d990d94a2382159bdd646342e2c
Content-Type: multipart/alternative; boundary="_000_6F2FE5F2D02C4B09A6CA7C3B63722E34checkpointcom_"
MIME-Version: 1.0
Cc: "websec@ietf.org" <websec@ietf.org>
Subject: Re: [websec] Comments on draft-ietf-websec-key-pinning-06
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: Sun, 23 Jun 2013 07:26:07 -0000

Hi David

As far as I know, this idea was not discussed before. If we were to do this, the proper URI for this would be some kind of RFC 5785 URI like "/.well-known/pins" or "/.well-known/hpkp".

Looking at the examples in the key-pinning draft, an HPKP header using SHA-1 takes just under 120 bytes. Compared to some of the stuff that gets sent in HTTP headers (I'm looking at you, user-agent) this is pretty tame. Moreover, the key-pinning header does not have to be sent in every response - it's enough to send it once per full TLS handshake.  Another think to consider is HTTP/2, where the header compression is not yet specified, but the algorithm that is currently being discussed on the mailing list has the ability to reference headers from previous responses, so that the full Public-Key-Pin could be included only once, and referred back to in other responses, although that's not really necessary.

Still, I can see several merits in your proposal:
 - clients that don't support key pinning need not get a header they're not going to process
 - Inserting a header only in the first response requires information from the TLS layer, so it's easier to just insert the header in every response.
 - HTTP/2 is not yet here, let alone wide-spread.

What do others think?

Yoav


On Jun 20, 2013, at 9:55 PM, David Matson <dmatson@microsoft.com<mailto:dmatson@microsoft.com>> wrote:

I sent the mail below to the draft-ietf-websec-key-pinning-06 authors, and Chris Palmer suggested I raise the points on this mailing list. He also mentioned a previous discussion (which I haven’t been able to locate) around a well-known host security information URL; if there’s a good place to get up to speed on that discussion, a pointer would be much appreciated.

Thanks,

David

I really like the overall approach taken in Public Key Pinning Extension for HTTP (draft-ietf-websec-key-pinning-06). Particularly, the public key (including algorithm) seems like exactly the right thing to pin.

A couple of thoughts on other areas of the draft (my apologies if these have been discussed before elsewhere; I’m only familiar with the draft text):

1. It would be nice to avoid including full public key data with every HTTP response. Particularly if there are multiple public keys in use, there’s a bit of potential data overhead on every response. Would it make more sense to have the public key data in a separate resource? As a first step, perhaps having every resource just have a pointer, using a header something like the following:
Public-Key-Pin-Location: /pins
Where “/pins” would be a separate resource that would have Public-Key-Pins header data.
Or, to go one step further, this data could then appear in the entity-body (perhaps in JSON format) and use normal HTTP resource-level mechanisms—for example, using Cache-Control to specify the expiration rather than a custom max-age header directive.

2. It would be nice to have the public key specified in a central place for the host, rather than by any resource, since the public keys are at the TLS level and don’t vary per resource. I’m not sure there’s an ideal solution here, but a couple of options might be:
a. Have a fixed, well-known resource per host for retrieving public key pin data (such as “/well-known-pins” or something like that).
b. An OPTIONS * request might be a good fit here, it was apparently intended for server-level information. Perhaps the response to an OPTIONS * could have the public key data (like the Public-Key-Pins header). Alternatively, to combine the two ideas, the OPTIONS * response could, instead of having the public key data itself, instead have a header with a URL for a public key pins resource (like the Public-Key-Pin-Location header mentioned above).

Thanks for considering these ideas.


Email secured by Check Point

_______________________________________________
websec mailing list
websec@ietf.org<mailto:websec@ietf.org>
https://www.ietf.org/mailman/listinfo/websec