Re: [certid] Need to define "most specific RDN"

Kaspar Brand <ietf-certid@velox.ch> Wed, 07 July 2010 06:42 UTC

Return-Path: <ietf-certid@velox.ch>
X-Original-To: certid@core3.amsl.com
Delivered-To: certid@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3ADAA3A68AC for <certid@core3.amsl.com>; Tue, 6 Jul 2010 23:42:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level:
X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[BAYES_50=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6ja9H8RAetrV for <certid@core3.amsl.com>; Tue, 6 Jul 2010 23:42:53 -0700 (PDT)
Received: from appendix.velox.ch (appendix.velox.ch [62.75.148.60]) by core3.amsl.com (Postfix) with ESMTP id 781B43A68B1 for <certid@ietf.org>; Tue, 6 Jul 2010 23:42:46 -0700 (PDT)
Received: from cortex.velox.ch (84-75-163-235.dclient.hispeed.ch [84.75.163.235]) (authenticated bits=0) by appendix.velox.ch (8.14.4/8.14.4/2.0) with ESMTP id o676fsra025930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <certid@ietf.org>; Wed, 7 Jul 2010 08:41:55 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=velox.ch; s=appendix-177f; t=1278484915; bh=ZSeNzRiKHYm4pyhN8EshZ5qtghjmlIYGrL0GhxoUoUM=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=LRzgq16ZN+qJGkKl4vbHufgk+G7VnEd0QKzya954weAtYcfHuOEmKEO3gYhDJaDok O4DADDnvXixCrWagEebZatt5KpG9pIDUTGoKuvyRhZxNwmv5GXurIGCNqD0dymdcK/ cw2CaxAtxj7RifX8bhRvvQINF6cXUmjQnto3/JBcHe/170tWl7vPd3bi57MRePImzq oTi8amDhtWUXY+JMvB6xucBrA4NM28bj4oFZkIIU10USQgFE82wHEjlrx9+gU5mBiF EYX9WHahktxRXR0n0YJy1aFP3I4Sb0HmelYwImpBERRPEXq64QElHs9bvFih/0JUML JkZz1QryRB44g==
Message-ID: <4C3421B3.3070404@velox.ch>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=velox.ch; s=cortex-8a58; t=1278484914; bh=ZSeNzRiKHYm4pyhN8EshZ5qtghjmlIYGrL0GhxoUoUM=; h=Date:From:MIME-Version:To:Subject:References:In-Reply-To: Content-Type:Content-Transfer-Encoding; b=MDbjAo0j+BPMuZ6KQ3etSUUggd9/GkD++FJDrKljoBCfjmiX6EnhqYWIN73OCEJt9 IVw0MNKvmNxMBMUAZJwtKNrjYQ1cOf+mU4Rf04LAK2n/0YH3UApPX9lotcb2QN1css uGqkie4HHVTS2erDLG4wy4/gJyo8KyegQ8pLyuZDZyPzyOTz6MPuAXsadlE2P9j0Zc Qn8t6Z/dDiU7Br0dEWL+9s6VpW4Es3Hn6XmGkKTEJM6rvJ+Pb0gCYJoXM7z5idz0oX mFEqNwp5wLCWw3cxjZa+ciw5+qZSOIQ9qgCgavQflXbbZAGmoW+d9XzQeWhQJevBdF cN+6ZUKUw1PUQ==
Date: Wed, 07 Jul 2010 08:41:55 +0200
From: Kaspar Brand <ietf-certid@velox.ch>
User-Agent: Thunderbird/3.x
MIME-Version: 1.0
To: certid@ietf.org
References: <201006301746.o5UHkIsE019133@fs4113.wdf.sap.corp> <4C2B843A.5010206@stpeter.im> <4C305B93.9090001@velox.ch> <201007061435.29786.ludwig.nussel@suse.de> <4C335CE5.1090608@edelweb.fr>
In-Reply-To: <4C335CE5.1090608@edelweb.fr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [certid] Need to define "most specific RDN"
X-BeenThere: certid@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Representation and verification of identity in certificates <certid.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/certid>, <mailto:certid-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/certid>
List-Post: <mailto:certid@ietf.org>
List-Help: <mailto:certid-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/certid>, <mailto:certid-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Jul 2010 06:42:56 -0000

On 06.07.2010 18:42, Peter Sylvester wrote:
> X.500 defines a tree structure, the nodes are relative names put
> into a hierarchie represented by a DN. a prefix of the elements in
> the sequence defines thus a "subtree", and the relative name of a leaf
> is the rightmost element, In a tree the most specific element a leaf
> and moving backwards defined less specific.
> 
> There is no need at all to talk about binary encoding, or DER or
> whatever. A DN is a sequence of relative names forming a tree
> structure when interpreted in the X.500 context. This is thus
> one clear interpretation of 'most specific'  (for a RDN).

I don't think that this is the issue here - it's the wording in RFC 2818
which is the source of all this... well, I'd say, mess:

   If a subjectAltName extension of type dNSName is present, that MUST
   be used as the identity. Otherwise, the (most specific) Common Name
   field in the Subject field of the certificate MUST be used. Although
   the use of the Common Name is existing practice, it is deprecated and
   Certification Authorities are encouraged to use the dNSName instead.

   Matching is performed using the matching rules specified by
   [RFC2459].  If more than one identity of a given type is present in
   the certificate (e.g., more than one dNSName name, a match in any one
   of the set is considered acceptable.)

Reading "(most specific) Common Name field" as "Common Name in the most
specific RDN" is one interpretation, but I'm not sure if it's the only
one. And given the attention this issue received on the list so far, it
also seems somewhat ironic that this "requirement" is only appearing in
parentheses in an RFC which happens to be informational only, BTW...

> Anyway, since there is no good reason not to put a subjectAltName,
> I do not think that one shouls say anything more than
> "If you use a Common Name other than in the most simple case one
>   may run a risk not to be interpreted correctly."

A BCP document should say more that just state how implementations
currently behave, I think [1].

Leaving that "most specific", peculiar requirement from RFC 2818 aside,
I don't believe that there are really strong arguments against treating
multiple CNs in the subject different from a subjectAltName extension
with multiple dNSName entries - why not consider "a match in any one of
the set[s]" acceptable...? [2]

Clarifying/fixing that blurry "(most specific)" statement from RFC 2818
would be highly desirable for the new BCP, IMO. If by this we can get
away with a term whose meaning isn't intuitively clear (compare this
e.g. to "left-most DNS label"), then I would definitely consider that a
plus.

Kaspar


[1] From RFC 2026: a BCP document
   [...] is a vehicle by which the IETF
   community can define and ratify the community's best current thinking
   on a statement of principle or on what is believed to be the best way
   to perform some operations or IETF process function."

[2] I'm aware of Nelson's message at
http://www.ietf.org/mail-archive/web/certid/current/msg00115.html, but
am wondering to how many CAs the statement about unvetted CNs really
applies. In my sample from 2009, the multi-CN certs (211 out of ~90,000)
are basically limited to one of the so-called "commercial CAs", and I'm
pretty sure that this CA does (/claims to) vet all CNs... what they
actually do is mirror the entries from the subjectAltName extension in
the subject DN. (It happens to be the same CA as the one appearing in
the message referenced by Ludwig, for the sake of completeness.)