Re: [websec] AD review of draft-ietf-websec-key-pinning-17
Barry Leiba <barryleiba@computer.org> Mon, 30 June 2014 18:12 UTC
Return-Path: <barryleiba.mailing.lists@gmail.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 36C7F1A03D0 for <websec@ietfa.amsl.com>; Mon, 30 Jun 2014 11:12:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.422
X-Spam-Level: *
X-Spam-Status: No, score=1.422 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
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 an33e9CbyTTu for <websec@ietfa.amsl.com>; Mon, 30 Jun 2014 11:12:09 -0700 (PDT)
Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [IPv6:2607:f8b0:400c:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BA2611A03E5 for <websec@ietf.org>; Mon, 30 Jun 2014 11:12:08 -0700 (PDT)
Received: by mail-ve0-f171.google.com with SMTP id jz11so8509181veb.2 for <websec@ietf.org>; Mon, 30 Jun 2014 11:12:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Z69P3kzCP5jCpkf7qCkO/SGuEE3cmTnu7eAr6bjO/Ns=; b=HmKO/CYPqcJUhPbESdAXbvw4HGFJwcFTEsFYrsVw2gNwLPQe8uA4fJNBuZ9y+PSxM/ M9gqEcVJ60guSgIHtrHu/zIVeLAbjxcvwd/VguOEREwUIlcFodNB/ExnAwNiXLZDon2E iRyKGlO+wzHDNd3hf3q8+avUJfOepurf3g9GQjfgFe0r5oDH/Gfg0+MvNbV09AkyI5dm YlKL3l032UUINl3UiRxeA4yItpzRHc92knRSaNqVnG9v9Q8J8RYvcbwLJOV3atHpTrtN 9YjNsaIFhSasNsSnCuoKuyZoqfHz7Tr3WUGahbCm9slZS7CjcYTS/GlxQgUwCPv/VyjS QiaQ==
MIME-Version: 1.0
X-Received: by 10.220.203.134 with SMTP id fi6mr29811504vcb.18.1404151927915; Mon, 30 Jun 2014 11:12:07 -0700 (PDT)
Sender: barryleiba.mailing.lists@gmail.com
Received: by 10.58.106.73 with HTTP; Mon, 30 Jun 2014 11:12:07 -0700 (PDT)
In-Reply-To: <BD085BE7-6903-4F7C-87AD-C21A179D26E6@gmail.com>
References: <CALaySJLWny1EBpre_v_A80XTX2n0tSs1s7tXdh7z_joTHGNU6w@mail.gmail.com> <BD085BE7-6903-4F7C-87AD-C21A179D26E6@gmail.com>
Date: Mon, 30 Jun 2014 14:12:07 -0400
X-Google-Sender-Auth: xTBDBoWkboEMwsmu5PQxSHCuH4Y
Message-ID: <CAC4RtVCJCT9NDM8YfW1uR0Bp6OxL2FKEsXjBSnh0sSRdm94sFA@mail.gmail.com>
From: Barry Leiba <barryleiba@computer.org>
To: Yoav Nir <ynir.ietf@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/websec/NYLQB1vsyy94m_p2Hg_Rrf7Ssl4
Cc: draft-ietf-websec-key-pinning.all@tools.ietf.org, "websec@ietf.org" <websec@ietf.org>
Subject: Re: [websec] AD review of draft-ietf-websec-key-pinning-17
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: Mon, 30 Jun 2014 18:12:10 -0000
Yoav, thanks for the comments. I hope the authors will also comment tout de suite, so we can move this document along. > Authors: you seem to have your work cut out for you. And to the rest of > the working group: there is a good reason why Barry has sent this to the > list. Dealing with the AD review is a task for the working group, not only > the authors and chairs. So everyone, please feel free to jump in. Indeed: please do jump in. > The below responses are my own and have no hats. I’m skipping the language > ones, because me not American, me no talk English good. .גם לי בעברית >> Is "we believe that" in the middle of the second paragraph something >> that should stand as it is in the final RFC? > > We believe that, with care, host operators can greatly > reduce the risk of main-in-the-middle (MITM) attacks and other false- > authentication problems for their users without incurring undue risk. > > I think this should stay. OK, I'll let that drop, then. I do wish we could find a better way to say it than "we believe", but if no other ADs bring that up I'll say no more about it. >> I don't think it's clear enough that this document doesn't define that >> registry, and that this is giving instruction for future registry >> creation. Please talk with me about why you feel the need *now* to >> say that a future registry will have to use IETF Review as its policy. >> Why would Specification Required or Expert Review not be OK? Why >> shouldn't the decision be left for the time the registry is created? > > I agree with that. How about: > > NEW: > Additional directives extending the semantic functionality of the > header fields can be defined in other specifications. The first > such specification will need to define a registry for such > directives. That sounds fine. >> In the pin-directive, the token is the name of a cryptographic hash >> algorithm, and MUST be "sha256". (In the future, additional hash >> algorithms MAY be registered and used.) The quoted-string is a >> sequence of base 64 digits: the base 64-encoded SPKI Fingerprint >> ([RFC4648]). See Section 2.4. >> >> I don't like the MUST there (nor the MAY). As to "registered and >> used", is this intended to be in the same registry as above? So the >> directive "pin-sha256" would be registered, along with a new >> "pin-shaXYZ"? >> >> Assuming that's right, I'm really starting to think that the registry >> should be created now. The reason to defer creation is if we think >> that no new directives will ever really come along, so we won't need >> the registry. But if the hash algorithm names will be in the >> registry, we can be pretty sure we'll need new ones. > > This I will push back on. The day SHA-256 becomes not good enough for this > purpose is when there is a second pre-image attack against SHA-256. We don’t > have that yet even for MD5. I don’t think we’re going to *need* a pin-SHA512 > or a pin-SHA3-256. Somebody might *want* a pin-GOST-R34.11-94, but in that > case I’m happy to leave the work of setting up a registry to them. Again, I'll let this go... but I'm not terribly happy about it. It's not a question of whether or when we'll get *rid* of 256, but whether and when we'll add a new one as an alternative. As soon as we do, whether it be SHA-512, some SHA3 variant, or some GOST thing, it'll be up to someone else to create the registry. That someone might not be in as good a position to do it as we are now. But if you're really confident that we're likely never to actually need the registry, I'll drop this one as well. >> NEW >> When a connection passes Pin Validation using the UA's noted pins >> for the Host at the time, the Host becomes a Known Pinned Host. >> >> According to rule 5, above, the UA MUST ignore pin-directives with >> tokens naming hash algorithms it does not recognize. If the set of >> remaining effective pin-directives is empty, and if the Host is a >> Known Pinned Host, the UA MUST cease to consider the Host as a Known >> Pinned Host (the UA should fail open). The UA SHOULD indicate to >> users that the Host is no longer a Known Pinned Host. >> END >> >> On the last sentence, though, I'm really unsure: are we really giving >> UI advice in a protocol document? Is that a good idea? Do w have any >> sense that my mother will have the first idea what you're talking >> about when you indicate this to her? > > We do often write sentences like “This event should be logged.” I don’t > think either your mother or mine regularly run Console.app or eventvwr.exe > to check logs. I guess this is the equivalent statement for user agents. It > makes sense that if there is some indication that a website is pinned, that > indication SHOULD be gone when the website is unpinned. It’s not for us to > say how a particular vendor will indicate pinning in their UI, but I think > it’s reasonable to say that the pinning indication should be gone. As straight advice, I think "You ought to log this," is vastly different to "You ought to tell this to the end user." The former is something we know a lot about: what information is critical for problem determination. We know little to nothing about what's helpful or not in user interfaces. (I also don't think our advice on logging should be using 2119 language, as it's not a protocol interoperability issue.) You say that these indicators make sense; I contend that they don't. First, users have no idea what pinning means. Second, from the user's point of view, if you've confirmed the identity of the server, the user doesn't care whether you did that with key pinning or not, whether you did it with DANE or not, whether you did it by checking the CAs or not, or whatever. My sense (as a non-UI-designer) is that if you're going to tell the user anything, it's purely that the site's identity has been confirmed (or not). Nothing about the mechanism matters. I don't see why there's any value in indicating pinning in a UI. >> -- Section 4.3 -- >> >> Because having a backup key pair is so important to recovery, UAs >> MUST require that hosts set a Backup Pin. (See Section 2.5.) >> >> Unless I misunderstand, this requirement means that if my server >> doesn't send a backup pin, my server doesn't benefit from key pinning >> (it's as though I never included the header in the first place). If >> that's not true, then Section 2.5 needs to be fixed to make it clear >> that failure to include a backup pin constitutes a validation failure. >> >> If that is true, then you're trading off recovery for security, and I >> expect the Security ADs to question that. To head that off, it might >> be good to acknowledge that here, and perhaps to say a few more words >> about it. > > How about: > The down side of keeping a not-yet-deployed key pair > is that if an attacker gains control of the private > key she will be able to perform a MitM attack without being > discovered. Care must be taken to avoid leaking the key, such > as keeping it offline. That's fine to add, but it doesn't get to the point of my question. The point wasn't about securing the backup key. The point is this: Suppose I give you a pin, but not a backup pin. There are two things you can do: 1. Accept the pin, and proceed along happily unless and until I do something that makes that pin invalid. At that point, lacking a backup, you start denying access to my server. 2. Do not accept the pin because there's no backup, and proceed as though I hadn't sent the pin. The spec has chosen path 2. I'm questioning whether that's really the right path. It seems to me that (2) is less secure (because I don't get pinning), and you're choosing it just in case (1) might happen. Why wouldn't the better approach be to say that you SHOULD send a backup pin, and warn what can happen if you don't. And then if a server doesn't, and becomes inaccessible for a time as a result, it's their own fault for not paying attention to the advice? Barry
- [websec] AD review of draft-ietf-websec-key-pinni… Barry Leiba
- Re: [websec] AD review of draft-ietf-websec-key-p… Yoav Nir
- Re: [websec] AD review of draft-ietf-websec-key-p… Barry Leiba
- Re: [websec] AD review of draft-ietf-websec-key-p… Chris Palmer
- Re: [websec] AD review of draft-ietf-websec-key-p… Barry Leiba
- Re: [websec] AD review of draft-ietf-websec-key-p… Chris Palmer
- Re: [websec] AD review of draft-ietf-websec-key-p… Barry Leiba