Re: [xmpp] Clarification of TLS Identity checking in draft-ietf-xmpp-3920bis

Peter Saint-Andre <stpeter@stpeter.im> Tue, 15 March 2011 02:39 UTC

Return-Path: <stpeter@stpeter.im>
X-Original-To: xmpp@core3.amsl.com
Delivered-To: xmpp@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 37A8B3A6A3A for <xmpp@core3.amsl.com>; Mon, 14 Mar 2011 19:39:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.314
X-Spam-Level:
X-Spam-Status: No, score=-102.314 tagged_above=-999 required=5 tests=[AWL=-0.315, BAYES_00=-2.599, J_CHICKENPOX_83=0.6, USER_IN_WHITELIST=-100]
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 WgQaf0QIKAvt for <xmpp@core3.amsl.com>; Mon, 14 Mar 2011 19:39:50 -0700 (PDT)
Received: from stpeter.im (stpeter.im [207.210.219.233]) by core3.amsl.com (Postfix) with ESMTP id 3AB1B3A6973 for <xmpp@ietf.org>; Mon, 14 Mar 2011 19:39:50 -0700 (PDT)
Received: from squire.local (dsl-251-69.dynamic-dsl.frii.net [216.17.251.69]) (Authenticated sender: stpeter) by stpeter.im (Postfix) with ESMTPSA id 57E544006D; Mon, 14 Mar 2011 20:41:37 -0600 (MDT)
Message-ID: <4D7ED1C8.4050201@stpeter.im>
Date: Mon, 14 Mar 2011 20:41:12 -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.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
To: Florian Zeitz <florob@babelmonkeys.de>
References: <C9A3FBEC.4D471%joe.hildebrand@webex.com> <4D7EA297.1020304@babelmonkeys.de>
In-Reply-To: <4D7EA297.1020304@babelmonkeys.de>
X-Enigmail-Version: 1.1.1
OpenPGP: url=http://www.saint-andre.com/me/stpeter.asc
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha1"; boundary="------------ms020005050102000300000508"
Cc: xmpp@ietf.org
Subject: Re: [xmpp] Clarification of TLS Identity checking in draft-ietf-xmpp-3920bis
X-BeenThere: xmpp@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: XMPP Working Group <xmpp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/xmpp>, <mailto:xmpp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/xmpp>
List-Post: <mailto:xmpp@ietf.org>
List-Help: <mailto:xmpp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xmpp>, <mailto:xmpp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 15 Mar 2011 02:39:51 -0000

On 3/14/11 5:19 PM, Florian Zeitz wrote:
> Am 15.03.2011 00:07, schrieb Joe Hildebrand:
>> On 3/14/11 4:38 PM, "Florian Zeitz"<florob@babelmonkeys.de>  wrote:
>>
>>
>>> I was recently wondering something related.
>>> Do I set the 'to' attribute in the initial stream header to the JID's
>>> domainpart, or to the domain I got from a SRV lookup?
>>> The later is certainly not sufficient as a source domain. That in turn
>>> implies (IMHO) we will always have/want to set the 'to' attribute to the
>>> JID's domainpart (and while the draft actually says to put a
>>> "domainpart" there, it is not specific on where to get that from,
>>> especially for the cases where you can't set a 'from', because you don't
>>> know the JID beforehand). I'd therefore assume you'd not use the
>>> user-entered FQDN as source domain, but I'd like some clarification on
>>> that point, too.
>>
>> It's always the domain name the user entered, not something you get
>> from the
>> (currently untrusted) DNS.  Many servers use this name to figure out
>> which
>> certificate to give you when you Start-TLS, rather than having to rely on
>> SNI.
>>
> That is not a sufficient answer.
> Stef Walter's point, that I was trying to address, was that in some
> cases the user entered two different domains. One as part of his JID the
> other one as the domain to connect to.

I think you mean the kind of thing that is explained, in depth, in
draft-saintandre-tls-server-id-check. I encourage anyone who has
questions about these matters to please re-read that spec, because it
discusses these matters in great detail.

So yes, it is true that in some circumstances a user might configure his
IM client with two things:

1. The domain name of the application service, which is the domainpart
of his JID, such as romeo@montague.lit => montague.lit; this is the
"source domain".

2. A "hardcoded" hostname that he has explicitly assocated with the
domainpart of your JID, such as apps.shakespeare.lit; this is the
"target domain".

However, for the purposes of checking the identity of the application
service when connecting via TLS, Romeo's client would check to see that
the service presents a certificate that says it is "montague.lit"
(unless he overrides the checks or explicitly approve of connecting to
"apps.shakesepeare.lit").

Please understand that 99% of users will never see such a configuration
option and that they don't know anything about apps.shakespeare.lit or
some special hostname that they're connecting to -- all that they know
is that they're trying to connect to montague.lit (if they even know
this, because lots of people just think that they're trying to connect
to "Shakespeare" or even "that IM thing" -- if you doubt it, I recommend
that you run your own public IM service, because it can be quite
enlightening).

> Both are certainly valid options for checking against.

Are they? From a user perspective, is montague.lit (the source domain)
just as valid as apps.shakespeare.lit (the target domain)? Does the
typical user understand that kind of delegation arrangement? Again, I
suggest that they don't.

> My reasoning was that since you have to use the domainpart of the JID
> when doing SRV (I was not sure from reading the draft, but it seemed
> sensible), 

What else would you use?

> it seems logical to do the same when the user specified a FQDN.

In this case, if Romeo has explicitly approved of connecting to
apps.shakespeare.lit then he has "pinned" the certificate to that
domain, in which case it's fine for the server to check that identity in
addition to "montague.lit". However, in general this is not a good idea
because very few users understand the implications of such a configuration.

In any case, nothing in this message requires any changes to either
draft-ietf-xmpp-3920bis or draft-saintandre-tls-server-id-check.

Peter

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