Re: [websec] Consensus call: Issue #57 (max-max-age)

Trevor Perrin <trevp@trevp.net> Wed, 22 May 2013 22:29 UTC

Return-Path: <trevp@trevp.net>
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 6DDEA11E814C for <websec@ietfa.amsl.com>; Wed, 22 May 2013 15:29:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.806
X-Spam-Level:
X-Spam-Status: No, score=-0.806 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FH_RELAY_NODNS=1.451, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, RCVD_IN_SORBS_WEB=0.619, RDNS_NONE=0.1]
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 QrizYZ8I17to for <websec@ietfa.amsl.com>; Wed, 22 May 2013 15:29:35 -0700 (PDT)
Received: from mail-we0-x235.google.com (mail-we0-x235.google.com [IPv6:2a00:1450:400c:c03::235]) by ietfa.amsl.com (Postfix) with ESMTP id 702B911E813A for <websec@ietf.org>; Wed, 22 May 2013 15:29:33 -0700 (PDT)
Received: by mail-we0-f181.google.com with SMTP id u57so1646575wes.12 for <websec@ietf.org>; Wed, 22 May 2013 15:29:33 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=jF9vQYZwzofmYLqB2ED3OHpXVf7qSyv11l99eChfERQ=; b=LxeOtsmo2l8+tkE2Lq4031qn2LqgRAZN1l8lCS5xm+z5HoKwtDKDEE5JRkGOZg9I6Q KIBo2lqJzoJlVx8V3WiMmPoBdIYdF2EcRzhqdLzsdKiMcayKAvvaPR1EO317ebLFHHyd BPp9Lo1zerZ8K5k0xT5E03UvKAm2OkdQZ3st/Ms86cR5ORmy8dNPTre5jts3n8dLvRe5 Bhl79WgZW12SCIa5aICI5Rm5Nr2uAeYPERHZcqpgk1J9ojdFb8UVyxWr71pqg/Jq3I1c Q9zmcvflUvAzENpJAU56c1WHiqyhGBrIGT1w8SNNgxDR/r9aHmDiuUYjjsAOxd0LQHY/ hIzQ==
MIME-Version: 1.0
X-Received: by 10.180.108.168 with SMTP id hl8mr19119310wib.23.1369261773008; Wed, 22 May 2013 15:29:33 -0700 (PDT)
Received: by 10.217.110.129 with HTTP; Wed, 22 May 2013 15:29:32 -0700 (PDT)
X-Originating-IP: [208.70.28.214]
In-Reply-To: <1A1F4108-B0F3-4742-9DC5-2D8E1E56D7E1@checkpoint.com>
References: <43C5DE99-43EB-42FC-8F61-24F9A9429FD1@checkpoint.com> <CA+cU71=Q_QkHqiQ95AZgw8Bi7U_mgCi4icMypwFUp1C6i=apUA@mail.gmail.com> <518EE510.9060600@it.aoyama.ac.jp> <8450797E-818C-445C-ABD2-1B8F9AE1DBB9@checkpoint.com> <5194918A.7030300@gondrom.org> <CAGZ8ZG0SWZD9e-NP2RhQMQ-=F5JUCCytF2NYTdWH7u13hhBqqQ@mail.gmail.com> <1A1F4108-B0F3-4742-9DC5-2D8E1E56D7E1@checkpoint.com>
Date: Wed, 22 May 2013 15:29:32 -0700
Message-ID: <CAGZ8ZG0dtjLQRphcykdewUtx+D3rihtNYp57V2JJ9Ve2OtYBXA@mail.gmail.com>
From: Trevor Perrin <trevp@trevp.net>
To: Yoav Nir <ynir@checkpoint.com>
Content-Type: multipart/alternative; boundary="e89a8f3ba2f395ca8304dd56198f"
X-Gm-Message-State: ALoCoQmbgi6FboM6rTiltLQB5faIX8sSok85dd3YtGJxHpJ2FKJyOOZA/wBPgK6UHVmqwrgAXe37
Cc: IETF WebSec WG <websec@ietf.org>
Subject: Re: [websec] Consensus call: Issue #57 (max-max-age)
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, 22 May 2013 22:29:39 -0000

Hi Yoav,

On Tue, May 21, 2013 at 3:26 PM, Yoav Nir <ynir@checkpoint.com> wrote:

>  Hi Trevor
>
>  <no hats>
>
>  The suggestion that web spiders also note pins is interesting, but it's
> not mentioned in the draft at all.
>

I think this possibility should be mentioned.

The draft discusses "Preloaded Pin Lists", which are presumably conveyed to
the UA from some 3rd party (eg browser vendor).  It seems reasonable for
such lists to be created or kept fresh by scanning web sites.  I believe
Mozilla is taking this approach to HSTS [1].

Besides preloaded lists, there's other proposals that could discover pins
based on scans and then send fresh pins to clients (Convergence, S-Links,
Omnibroker, etc.)

So I think the draft should endorse the idea that pins might be discovered
by one party, then used by a second party.

If we agree this is a possible way to use server-asserted pins, then we
shouldn't assume that a 30-day pin is always worthless to a UA who can't
contact a site every 30 days.



> So I believe that we have to take the draft at face value, that it is user
> agents that are supposed to note pins. BTW: assuming that relatively few
> sites have pins, it is also possible for the browser itself to load pages
> in the background to refresh the list of pins.
>

Seems like a privacy risk to have the browser connecting back to pinned
sites on some interval.  Eg: you're at a coffee shop and your browser
decides to refresh pins for your embarrasing hobby sites.  Someone observes
these queries via sniffer...

If the global set of pins is small enough, the browser could periodically
fetch the entire thing (or the most important 10,000 pins, say).  I think
that's a practical, simple example of using 3rd-party infrastructure.



> Either way, we have to assume that the pin is noted by a user agent and is
> noted again only when the user clicks a link or types in the address again.
> I don't think we want to require anything else.
>
>  I do agree that a spider or the browser itself can periodically check on
> pins.
>
>  You go on to note three cases where limiting the max-age may be
> beneficial:
>
>    1) Domain name transfers (sales, disputes, reclaiming hijacked
> domains, etc.)
>  2) Preventing long-term lock-in.  E.g. you are pinned to CA keys which
> you lose trust in and suspect might be participating in MITM attacks; you
> are not bricked, but you are unable to change to a different CA and assert
> new CA pins until the old pins expire.
>  3) Pruning the amount of pin history you must keep your site consistent
> with (Do you remember what pins you or the previous domain owner asserted 6
> month ago? 6 years ago? ever?  They might still be out there, waiting to
> trip you up).
>
>
>  #2 and #3 make sense, but they only make sense as reasons to set max-age
> to a relatively short value. It may be good to incorporate this as advice
> to the administrator as to what to set max-age to. They are not a good
> reason, IMO, to set a hard limit in the protocol.
>

Not sure I agree.  #2 and #3 are consequences of long-lived bad pins
(lock-in to keys/CAs; and uncertainty over what pins might have been
asserted by previous sysadmins, domain owners, or attackers).

But these bad pins could arise from site mistakes, attacks, or previous
domain name owners, so asking sites to assert short-lived pins doesn't
guarantee they won't happen.

I'll try to break down the proposals for pin lifetimes:

 A) Sites assert short-lifetime pins
 B) UAs choose their own pin-lifetime limit
 C) Spec limit

(A) doesn't help with site mistakes, domain name transfers, or attacks
(disgruntled site administrator, hacker, or domain hijacker setting bad
pins, etc).

(B) doesn't give sites a guaranteed recovery period after which any bad
pins will disappear.  Let's say you acquire a new domain name, or you
suspect the previous admin was sloppy with pins, or a hacker might have set
bad pins.  If UAs can do whatever they want, then you can't be sure there
aren't bad pins hanging around somewhere, from *anything* that might have
happened *anytime* in the past.  Even if your domain seems to be working,
there could be bad "report-only" pins that are reporting on your users, or
that are locking you in to your current CA and which you might not discover
until you actually try to change CAs (months or years later)...

Anyways, a spec limit solves these problems - no matter what mistakes,
ownership changes, or attacks a domain name suffers, the site has a hard
guarantee that only the last 30 days of pin assertions matter.


Trevor


[1] https://blog.mozilla.org/security/2012/11/01/preloading-hsts/