Re: [pkix] Please clarify when and where wildcards should be matched in PKIX certificates

Tom Ritter <tom@ritter.vg> Fri, 05 June 2015 12:09 UTC

Return-Path: <tom@ritter.vg>
X-Original-To: pkix@ietfa.amsl.com
Delivered-To: pkix@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9B7791A0368 for <pkix@ietfa.amsl.com>; Fri, 5 Jun 2015 05:09:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.379
X-Spam-Level:
X-Spam-Status: No, score=-1.379 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, 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 9N9ywmqOdcGs for <pkix@ietfa.amsl.com>; Fri, 5 Jun 2015 05:09:48 -0700 (PDT)
Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2ED781A033A for <pkix@ietf.org>; Fri, 5 Jun 2015 05:09:48 -0700 (PDT)
Received: by qgg3 with SMTP id 3so5070355qgg.2 for <pkix@ietf.org>; Fri, 05 Jun 2015 05:09:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ritter.vg; s=vg; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=UC20oTg8xzkafKMTsuJMsYEroDHd03huwbAyKbkiRac=; b=QmTPjf8ZARU6mJQ0ksZXKEcTwjMU6KoCvSdXeaMr2IK1newvGq02NKKTrWFa8xLaDI D5S0HELZegjvKhcJ413y0q8lVxEFXYTg+BqWr5R5ALRQ/0SfRiVMTPzGMqk0L2uCNE7M DcUPnxeynxLFzhjDFvkPKmxb4RzX4rAACQXwk=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=UC20oTg8xzkafKMTsuJMsYEroDHd03huwbAyKbkiRac=; b=i0Z5IIkyH144FHK7GWjQxqX5kZ+XK/ynq6rq8DOdms1c5GjRg/6+7VC+TdOFa9u9bj pQiHOIRBEZVMB6HtxwZsyL2aTNxMTg15Gcd7wfBcPrXvFp4loi068FG35PWuDkw8WPYX rybNC6k1X62+J8Qs+OuUgremPZGHkyVQuFjApI7/GX7W8nIoGxH894ieHgqJheJxXVzj pEClm773qtIrLC1zFnWG3+esMhv/qB1rmr1lMzvMkujJBHO1XGFb3fZW08uHOv7jVPYB nU9QbzFbShXZZX0dDxXgJvZuDjgYPb26zB9OpLZr5MTstxeK36PawvFSuk1XqmcqFeAe q8Pw==
X-Gm-Message-State: ALoCoQnMURDrNRD9ro8/A66vicqdeterNykLDmhLI/P2IFN7LtQ2JFGyb5efFeH3XPzDnD3bvVC4
X-Received: by 10.55.41.195 with SMTP id p64mr5958684qkp.40.1433506187441; Fri, 05 Jun 2015 05:09:47 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.51.103 with HTTP; Fri, 5 Jun 2015 05:09:26 -0700 (PDT)
In-Reply-To: <CAH8yC8mQ8t5Fd7s+yyeL2XoEkXieULN74d23aWX=wqQoqCxagw@mail.gmail.com>
References: <CAH8yC8=_PypmYYW_0XPUS0xFB6vP4N1=RTmzCjdwVnR-05H=hw@mail.gmail.com> <CAH8yC8kLgbXYZb_-AY3er5EagG5XmUDaQhL7ynRwd+GL2anJeQ@mail.gmail.com> <CAH=tA5tT4VwWQUCcQ+E9BR1+ZVnHHS4HkwGZ3zJT736wZvQk8g@mail.gmail.com> <CAH8yC8mQ8t5Fd7s+yyeL2XoEkXieULN74d23aWX=wqQoqCxagw@mail.gmail.com>
From: Tom Ritter <tom@ritter.vg>
Date: Fri, 05 Jun 2015 05:09:26 -0700
Message-ID: <CA+cU71=RwPrnktLHTXgF-L3GpZX7QQL4mL+Q=ijsweENotkVxw@mail.gmail.com>
To: Jeffrey Walton <noloader@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/pkix/wZXne8kPCVXki0FdDDAt2ugGPpI>
Cc: PKIX <pkix@ietf.org>, Tomoyuki Sahara <sahara@surt.net>
Subject: Re: [pkix] Please clarify when and where wildcards should be matched in PKIX certificates
X-BeenThere: pkix@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: PKIX Working Group <pkix.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pkix>, <mailto:pkix-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/pkix/>
List-Post: <mailto:pkix@ietf.org>
List-Help: <mailto:pkix-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pkix>, <mailto:pkix-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Jun 2015 12:09:49 -0000

On 5 June 2015 at 03:42, Jeffrey Walton <noloader@gmail.com> wrote:
> On Fri, Jun 5, 2015 at 5:28 AM, Tomoyuki Sahara <sahara@surt.net> wrote:
>> On Fri, Jun 5, 2015 at 4:45 PM, Jeffrey Walton <noloader@gmail.com> wrote:
>>>
>>> And it may allow match just "*", if that is interpreted as the
>>> leftmost label (but not the center label or rightmost label). Stranger
>>> things have happened....
>>
>>
>> A site in Alexa top 10,000 presents such a certificate (but the cerfiticate
>> is self-singed so it should be site administrator's mistake).
>>
>> Fortunately, Mozilla and libressl won't match such wildcards to any domain
>> because they checks if presented identifier in server's certificate has at
>> least 2 dots (".").
>>
>> But the "two-dots" check is far from perfect:
>>
>> - A number of ccTLDs have more levels (e.g. www.example.co.jp)
>> - It prevents new gTLDs from using wildcard certificates like "*.gtld".
>>
>> It can be more strict with Public Suffix List in theory but I don't think
>> it is a good idea in practice.
>>
>> Any ideas?
>
> Tough problem in general.
>
> (1) At the second label (with the leftmost as a wildcard), there are
> three top levels to consider.
>
>     (A) Traditional Top Level Domains (call them gTLDs). *.COM, *.NET, *.MIL,etc
>     (B) Country Top Level Domains (call them ccTLDs). *.UK, *.CN, etc
>     (C) Vanity Top level Domains (call them vTLDS). *.GOOLGE and friends
>
> We can remediate (A) because its an exhaustive list. We just say NO.
>
> We can remediate (B) because its an exhaustive list of about 250, and
> we can build a list of the authorities offline. In the absence of a
> declared authority or delegate, we just say NO.
>
> I think (A) and (B) could (and should) be called out in PKIX
> validation because validation is within purview of PKIX and the rules
> are obvious.
>
> I don't know how to remediate (C). How do we say, *.GOOGLE is OK if
> its certified by Google but not others? When we encounter *.GOOGLE
> that claims to be certified by Google, how do we know its authentic?

Technically, we don't need to remediate (C), because we're trying to
support a use case no one has asked for. Or at least, not seriously.
No vanity TLD has come to Mozilla or Chrome or Microsoft and said
"Hey, we want to do *.vanity, but it doesn't work!"[0]  Just as
dotless vanity domains (http://vanity) aren't going to work[1], we can
say that TLD wildcards aren't going to work.

-tom

[0] Right?
[1] Right? That's decided, no?