Re: [TLS] WWW-Authenticate challenge for client-certificates

Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk> Wed, 20 January 2010 15:55 UTC

Return-Path: <Bruno.Harbulot@manchester.ac.uk>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 201223A6A93 for <tls@core3.amsl.com>; Wed, 20 Jan 2010 07:55:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.574
X-Spam-Level:
X-Spam-Status: No, score=-5.574 tagged_above=-999 required=5 tests=[AWL=-1.975, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 OfDtFUl6cLrK for <tls@core3.amsl.com>; Wed, 20 Jan 2010 07:55:42 -0800 (PST)
Received: from serenity.mcc.ac.uk (serenity.mcc.ac.uk [130.88.200.93]) by core3.amsl.com (Postfix) with ESMTP id 1C70D3A6A92 for <tls@ietf.org>; Wed, 20 Jan 2010 07:55:41 -0800 (PST)
Received: from kelvin.its.manchester.ac.uk ([130.88.25.195]) by serenity.mcc.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from <Bruno.Harbulot@manchester.ac.uk>) id 1NXcu8-000Nj6-GN; Wed, 20 Jan 2010 15:55:36 +0000
Received: from pulsar.rcs.manchester.ac.uk ([130.88.1.47]:43405 helo=mymachine) by kelvin.its.manchester.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from <Bruno.Harbulot@manchester.ac.uk>) id 1NXcu8-0002hM-B7; Wed, 20 Jan 2010 15:55:36 +0000
Message-ID: <4B572778.6010903@manchester.ac.uk>
Date: Wed, 20 Jan 2010 15:55:36 +0000
From: Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: Steve Dispensa <dispensa@phonefactor.com>
References: <4B55B51B.2040706@manchester.ac.uk> <C77BDFA6.E5C3%dispensa@phonefactor.com>
In-Reply-To: <C77BDFA6.E5C3%dispensa@phonefactor.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Authenticated-Sender: Bruno Harbulot from pulsar.rcs.manchester.ac.uk (mymachine) [130.88.1.47]:43405
X-Authenticated-From: Bruno.Harbulot@manchester.ac.uk
X-UoM: Scanned by the University Mail System. See http://www.itservices.manchester.ac.uk/email/filtering/information/ for details.
Cc: tls@ietf.org, ietf-http-wg-request@w3.org
Subject: Re: [TLS] WWW-Authenticate challenge for client-certificates
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2010 15:55:43 -0000

Hello,

Steve Dispensa wrote:
> On 1/19/10 7:35 AM, "Bruno Harbulot" <Bruno.Harbulot-m7QheJJv02N4oUbgFh0ZNQ@public.gmane.org>
>> I'd like to suggest ideas towards the potential specification of a
>> challenge for client-certificate authentication using HTTP over TLS.
> 
> Any interest in incorporating other TLS authentication methods like SRP?

Why not. I don't know much about SRP, but this might work in a similar 
way. We could have this:
   WWW-Authenticate: transport mode="tls-client-certificate"
   WWW-Authenticate: transport mode="tls-srp"


>> For example, most TLS frameworks either "request" or "require" a
>> client-certificate (using the Apache Httpd terminology).
>> In 'request' mode, the server asks for a client-certificate, but will
>> continue the connection if the client doesn't present one
>> ("setWantAuthentication" in Java).
>> In 'require' mode, the server asks for a client-certificate, but makes
>> the TLS handshake fail if the client doesn't present one
>> ("setNeedAuthentication" in Java).
> 
> At least one commercial vendor has a server-wide setting to "require" that
> TLS request a client certificate, but it's legal for the client to decline.
> That being the case, this commercial vendor's decision is simply to move on
> and keep processing, not bothering to validate the presence of the
> certificate until later. This then triggered a renegotiation, leading to the
> renegotiation problem. The point is that, in this case, simply setting the
> server to "require" a client cert wasn't good enough, since it allowed the
> client to decline it. The semantics of this area of HTTP-TLS interaction is
> complex and ill-defined.

What I meant by 'require' is a server that would not accept a client 
sending an empty TLS Certificate message in response to a TLS 
CertificateRequest message (and thus terminate the handshake with an 
error message). I'm not sure we mean 'require' in the same way here, 
since it couldn't possibly let the client continue the connection in 
this case (the TLS connection not being even established).

IIS (and the .Net HTTP framework) seems to be configured by default not 
to request a certificate, but to request one only at a later point, 
depending on what the HTTP request is trying to access. I'm not sure if 
this is the commercial vendor you had in mind, but this one does indeed 
use re-negotiation by default (unless configured with 
clientcertnegotiation=true with netsh), but I can't find much 
information from MS about CVE-2009-3555 anyway.


>> As a side note, I also think that such a mechanism could partly help
>> with the TLS renegotiation issue (still discussed on the IETF TLS
>> mailing list). Indeed, if the HTTP framework was able to detect a
>> renegotiation had occurred, it could make the client re-send the request
>> post-negotiation (rather than assume that the certificate presented
>> during the second handshake were also valid for the request sent before).
> 
> 
> This would indeed obviate the need to renegotiate to request a client
> certificate. In any case, it has the potential to clarify exactly what
> authenticated identity is associated with each request. (There has been a
> significant amount of discussion lately about identity changes during TLS
> connections across renegotiations, and whether apps are prepared to properly
> handle these changes.)
> 
> I'm all for a more explicit identity model here.

Yes, I think such a header 'WWW-Authenticate' could also include a 
parameter to have a hint of which certificate to send. I'm not sure 
whether the request resent should have an 'Authorization' header, since 
the credentials would be obtainable from the the TLS layer anyway.


> I also heard it suggested that an HTTP status code for "resend request"
> would have been useful - that way, the trick of buffering a request and
> requesting a renegotiation wouldn't have been needed in the first place. I
> think clarifying the authentication process is a better, more specific
> solution to the problem, but perhaps a "resend request" status would be
> helpful. I just wanted to throw that out for discussion.

What I had in mind was indeed a "cleaner 401" behaviour for TLS 
authentication, so as to model the resend request like other HTTP 
mechanisms do (form/cookies excepted of course, but that's another debate).


Best wishes,

Bruno.