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

Peter Saint-Andre <stpeter@stpeter.im> Mon, 12 July 2010 17:22 UTC

Return-Path: <stpeter@stpeter.im>
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 1A7463A6982 for <certid@core3.amsl.com>; Mon, 12 Jul 2010 10:22:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.832
X-Spam-Level:
X-Spam-Status: No, score=-2.832 tagged_above=-999 required=5 tests=[AWL=-0.233, BAYES_00=-2.599]
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 s3aoLWKSGXuB for <certid@core3.amsl.com>; Mon, 12 Jul 2010 10:22:48 -0700 (PDT)
Received: from stpeter.im (stpeter.im [207.210.219.233]) by core3.amsl.com (Postfix) with ESMTP id 33A9D3A6407 for <certid@ietf.org>; Mon, 12 Jul 2010 10:22:48 -0700 (PDT)
Received: from leavealone.cisco.com (72-163-0-129.cisco.com [72.163.0.129]) (Authenticated sender: stpeter) by stpeter.im (Postfix) with ESMTPSA id 8B76840E44 for <certid@ietf.org>; Mon, 12 Jul 2010 11:22:55 -0600 (MDT)
Message-ID: <4C3B4F6E.80903@stpeter.im>
Date: Mon, 12 Jul 2010 11:22:54 -0600
From: Peter Saint-Andre <stpeter@stpeter.im>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
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> <4C3421B3.3070404@velox.ch>
In-Reply-To: <4C3421B3.3070404@velox.ch>
X-Enigmail-Version: 1.0.1
OpenPGP: url=http://www.saint-andre.com/me/stpeter.asc
Content-Type: text/plain; charset=UTF-8
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: Mon, 12 Jul 2010 17:22:50 -0000

On 7/7/10 12:41 AM, Kaspar Brand wrote:
> 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...

Is there a good security reason for this "requirement"? I don't see one.

>> 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].

For sure.

> 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]

That seems eminently sensible to me. (Whether any given CA would issue
such a certificate is a matter of CA policy...)

> 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.

Would removing all mention of "(most specific)" qualify as clarification?

> 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. 

Yes, I think that's what is happening in the example cited.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/