Re: [TLS] RFC7301 ALPN conflicting objectives about app-specific server certificates

Viktor Dukhovni <ietf-dane@dukhovni.org> Wed, 01 July 2015 16:34 UTC

Return-Path: <ietf-dane@dukhovni.org>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B4B4D1A9239 for <tls@ietfa.amsl.com>; Wed, 1 Jul 2015 09:34:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
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 0F-TIVJ1glkK for <tls@ietfa.amsl.com>; Wed, 1 Jul 2015 09:34:10 -0700 (PDT)
Received: from mournblade.imrryr.org (mournblade.imrryr.org [38.117.134.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 672071A9251 for <tls@ietf.org>; Wed, 1 Jul 2015 09:33:54 -0700 (PDT)
Received: by mournblade.imrryr.org (Postfix, from userid 1034) id 10D53284D2B; Wed, 1 Jul 2015 16:33:53 +0000 (UTC)
Date: Wed, 01 Jul 2015 16:33:53 +0000
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
To: tls@ietf.org
Message-ID: <20150701163352.GK14121@mournblade.imrryr.org>
References: <20150630235340.GI14121@mournblade.imrryr.org> <20150701161851.22FE31A1B2@ld9781.wdf.sap.corp>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20150701161851.22FE31A1B2@ld9781.wdf.sap.corp>
User-Agent: Mutt/1.5.23 (2014-03-12)
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/5ldX065mLrKKuqVYi9vTxD4h4_Y>
Subject: Re: [TLS] RFC7301 ALPN conflicting objectives about app-specific server certificates
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: tls@ietf.org
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/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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, 01 Jul 2015 16:34:11 -0000

On Wed, Jul 01, 2015 at 06:18:51PM +0200, Martin Rex wrote:

> >>    Unlike many other TLS extensions, this extension does not establish
> >>    properties of the session, only of the connection.  When session
> >>    resumption or session tickets [RFC5077] are used, the previous
> >>    contents of this extension are irrelevant, and only the values in the
> >>    new handshake messages are considered.
> > 
> > I don't think there's a conflict here.  All that's said is that
> > ALPN is not a session property, and its value for a previous
> > connection is not directly relevant for a new connection.  Each
> > connection signals its own ALPN value.
> 
> There is a very clear conflict here.
> 
> A TLS session resume skips the exchange of credentials&identities
> (such as certificates), so as a result of a session resumption
> the session will have the _cached_ certificates from the original
> full TLS handshake as session attributes.

And yet it is not a conflict.  The specification says ALPN is
per-connection.  Since certificates are per-session, either the
client or the server need to do the right thing and not re-use
sessions that are not compatible with the requested ALPN.

Clients can try to maximize session re-use and leave the logic up
to the server (to perform a new handshake when the initial ALPN is
associated with a different server identity), or clients can maximize
correctness in the face of sloppily implemented servers and avoid
reuse of sessions for a different ALPN value.

So indeed most clients should create one session per ALPN value,
thus turning ALPN into a session property.  Clients that can
reasonably expect correct server logic might leave it up to the
server to decide whether to create a new session, or allow re-use,
because both the new and the old ALPN value map to the same server
identity.

-- 
	Viktor.