Re: [certid] Why require EKU for certid?

Martin Rex <mrex@sap.com> Thu, 30 September 2010 03:23 UTC

Return-Path: <mrex@sap.com>
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 B82233A6C05 for <certid@core3.amsl.com>; Wed, 29 Sep 2010 20:23:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.525
X-Spam-Level:
X-Spam-Status: No, score=-9.525 tagged_above=-999 required=5 tests=[AWL=0.124, BAYES_00=-2.599, HELO_EQ_DE=0.35, J_CHICKENPOX_33=0.6, RCVD_IN_DNSWL_HI=-8]
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 stwEF+3+u0+W for <certid@core3.amsl.com>; Wed, 29 Sep 2010 20:23:52 -0700 (PDT)
Received: from smtpde01.sap-ag.de (smtpde01.sap-ag.de [155.56.68.170]) by core3.amsl.com (Postfix) with ESMTP id 5FCCE3A6BCC for <certid@ietf.org>; Wed, 29 Sep 2010 20:23:52 -0700 (PDT)
Received: from mail.sap.corp by smtpde01.sap-ag.de (26) with ESMTP id o8U3OZDl002336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Sep 2010 05:24:35 +0200 (MEST)
From: Martin Rex <mrex@sap.com>
Message-Id: <201009300324.o8U3OYBJ013277@fs4113.wdf.sap.corp>
To: paul.hoffman@vpnc.org (Paul Hoffman)
Date: Thu, 30 Sep 2010 05:24:34 +0200 (MEST)
In-Reply-To: <p0624084fc8c98553729e@[10.20.30.163]> from "Paul Hoffman" at Sep 29, 10 05:13:01 pm
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Scanner: Virus Scanner virwal07
X-SAP: out
Cc: stefan@aaa-sec.com, certid@ietf.org
Subject: Re: [certid] Why require EKU for certid?
X-BeenThere: certid@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: mrex@sap.com
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: Thu, 30 Sep 2010 03:23:53 -0000

Paul Hoffman wrote:
> 
> At 1:20 AM +0200 9/30/10, Stefan Santesson wrote:
> >My point is more that it is good practice to have serverAuth set when the CN
> >attribute is allowed to carry a DN.
> 
> Yes it is. However, that is irrelevant to this document. It would be
> relevant to a document saying how to create a well-formed server
> certificate for TLS.

It is my understanding that the target audience of this document
includes CAs, WebServer Admins, Sysadmins and applications on top of TLS
... however it is a little weak in clarifying to which particular
audience which particular recommendation/imperative applies.


> 
> >Absent the serverAuth EKU it is hard to programmatically be sure that the CN
> >actually contains a DNS name. Yes you can probably be pretty sure but there
> >is just a slight chance for problems due to overloaded semantics.
> 
> Even if the serverAuth EKU is set, you cannot be sure the CN actually
> contains a DNS name. The two are orthogonal.

They are independent, correct.  Server endpoint identification has been
performed by SSLv3 clients and TLS v1.0 (rfc-2246) clients based on
CN-IDs exclusively for many years.  rfc-2459 defines an EKU / KeyPurposeId
for TLS Servers and TLS clients http://tools.ietf.org/html/rfc2459#page-39
while the server endpoint identification by dNSName SANs instead of CN-IDs
appears to be first documented in rfc-2818.

Conceptually, every extension that is added to an X.509v3 certificate
further constraints its purpose/applicability (compared to not carrying
the extension).  There are small deviations for the BasicConstraints
defined in PKIX, but basically, that's it.

So a server cert with the TLS id-kp-serverAuth EKU is "limited" to
TLS server auth, not "extended" to it.  AFAIK there are also two
private OIDs from Netscape and two from Microsoft with the same
meaning as id-kp-serverAuth and id-kp-clientAuth.  And I would not
rely on clients being strict in checking TLS server EKUs...



> 
> >More importantly it has to do with name constraints processing. If you
> >accept the CN attribute as a domain name you need to make sure that it also
> >matches any name constraints set for the dNSName of the path. It is much
> >cleaner again to use the serverAuth as a mechanism for switching in this
> >logic.

EKUs primarily affect usage scenarios that are born with EKU requirements,
rather than SSL&TLS clients and servers, where the EKU situation
started as a big mess and the current status is fairly undetermined.


> 
> >Absent this check, the domain name may violate name constraints and you
> >would never know. This is the most important point.
> 
> If the TLS client is doing full certificate path validation, the
> certificate cannot violate name constraints. That is quite different
> than what you just said.

As defined by PKIX, name constraints defined for dNSName SANs do not
apply to directoryNames such as a certificate subject.

Some people are trying to artificially redefine the semantics of
name constraints to ensure business models of CAs coming preconfigured
as trusted with the software.  They're asking TLS clients for a gruesome
breach of the PKIX name constraints architecture to "protect" against
CAs from evading "dNSName SAN name constraints" imposed by their
superiorCAs by issuing server certs without dNSName SANs
(and CN-IDs instead, to which dNSName SAN name constraints do no apply).


I think it is an extremely bad idea to increase the complexity of
CN-ID server-id-check semantics, which have been deprecated 10 years ago,
by the order of a magnitude -- in particular in a BCP document,
because most of the installed base does not work that way and
a huge part of them is quite unlikely to ever adopt such weird
CN-ID semantics.


-Martin