Re: [tram] Review of draft-johnston-tram-stun-origin-02

Oleg Moskalenko <mom040267@gmail.com> Tue, 06 May 2014 16:59 UTC

Return-Path: <mom040267@gmail.com>
X-Original-To: tram@ietfa.amsl.com
Delivered-To: tram@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7EFCD1A0175 for <tram@ietfa.amsl.com>; Tue, 6 May 2014 09:59:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.749
X-Spam-Level:
X-Spam-Status: No, score=-1.749 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=no
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 ernp4X2tT1Yn for <tram@ietfa.amsl.com>; Tue, 6 May 2014 09:59:53 -0700 (PDT)
Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) by ietfa.amsl.com (Postfix) with ESMTP id A99921A01AE for <tram@ietf.org>; Tue, 6 May 2014 09:59:52 -0700 (PDT)
Received: by mail-wg0-f45.google.com with SMTP id m15so5672511wgh.28 for <tram@ietf.org>; Tue, 06 May 2014 09:59:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CvC6IUta/+waUVri8x+Lx95f4wiz1TmKYscmT8xlxlg=; b=J3V1lHsFJnT3Ii+Y7rpkTkGKKX+T8QySKcFidZUgoYWc5BLtXnaF36NJzSvXZRzW6t UD+g34qBw/as/hq1Zjmx4bTh30Exj8LEbzNrc/IoE9EiOuM4fXaE/9pY2CBrDlKteBBy jnkUhS9vzX4nZblFLXR3v7dnlT35Js+/ta6IIumF0KrVDm5LuMXpLcROEtAsYFDM/P5w OSlmFSWEM79MVUdSFp2te8bF7XCOoLUNg3sZ9OFl8Nu5BunOTIi7qsWG8ZYuWR95RiVL Rbqzop0ulM1WExhrdgraUET63qBdJKXTVdVCAd07jZYDOp1m4orxdEOCTcmHGEShPq0i TgfA==
MIME-Version: 1.0
X-Received: by 10.180.187.225 with SMTP id fv1mr22095935wic.14.1399395588447; Tue, 06 May 2014 09:59:48 -0700 (PDT)
Received: by 10.194.9.67 with HTTP; Tue, 6 May 2014 09:59:48 -0700 (PDT)
In-Reply-To: <5368BF90.2070307@getjive.com>
References: <5368BF90.2070307@getjive.com>
Date: Tue, 06 May 2014 09:59:48 -0700
Message-ID: <CALDtMrLsgRT-HSpS4TD4UUQjSbe2M3cmFApYsks6x4qs65JS=Q@mail.gmail.com>
From: Oleg Moskalenko <mom040267@gmail.com>
To: Marc Petit-Huguenin <marcph@getjive.com>
Content-Type: multipart/alternative; boundary="001a11c25d30f3262b04f8be2c84"
Archived-At: http://mailarchive.ietf.org/arch/msg/tram/jP2XiS_oI1-cMxk1OXOUId4GoeQ
Cc: "tram@ietf.org" <tram@ietf.org>
Subject: Re: [tram] Review of draft-johnston-tram-stun-origin-02
X-BeenThere: tram@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussing the creation of a Turn Revised And Modernized \(TRAM\) WG, which goal is to consolidate the various initiatives to update TURN and STUN." <tram.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tram>, <mailto:tram-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tram/>
List-Post: <mailto:tram@ietf.org>
List-Help: <mailto:tram-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tram>, <mailto:tram-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2014 16:59:54 -0000

please see inline:


On Tue, May 6, 2014 at 3:55 AM, Marc Petit-Huguenin <marcph@getjive.com>wrote:

>
>
> A3. Section 1, 8th paragraph
>
> I do not think that the ORIGIN should be used to select the certificate
> when (D)TLS is used.  First it does not work with DANE, as when an SRV
> (and probably NAPTR too, but that's undefined yet) RR redirects to a
> different domain, the domain to be checked with is the host name, not
> the service domain (see draft-ietf-dane-srv).  For non-DANE cases, I
> think that the correct way to select the certificate is to use SNI.
>
> So I would suggest to restrict the normative use of ORIGIN only to
> select realms.
>

[Oleg] Technically, you cannot use the ORIGIN for the certificate selection
because the (D)TLS negotiation is happening before any TURN ALLOCATE packet
is delivered to the server. Although, I am not sure that I see a use case
for multiple different TLS certificates on the same network service
endpoint, even if it serves multiple realms.


>
> A4. Section 2.2. ORIGIN attribute usage
>
> The text does not say if the ORIGIN attribute should/can be provided
> after the authentication (i.e. refresh, data packets, etc...)
>


[Oleg] After the initial negotiation, the ORIGIN is optional and can be
used only for logging purposes.


>
> A5. Section 2.2.  Mandatory support for server
>
> How a TURN server that requires the usage of ORIGIN can signal this?
>

[Oleg] I suppose that the server just uses a default realm if the ORIGIN is
absent. If server requires the ORIGIN, then the default realm can be a
bogus realm that has no real users. I do not see a reason to introduce a
new error code here. If the client supports ORIGIN then it just always
includes ORIGIN (as a comprehensive-optional attribute) into the ALLOCATE
request. If the client does not support ORIGIN, then it works with the
default realm. I see no valid reasons why a client that supports ORIGIN
would want to try ALLOCATE without the ORIGIN.


>
> A6. Section 2. Other Usages
>
> I think that other STUN Usages should be listed after section 2.3:
>
> - Media Keep-Alive Usage (Section 20 of RFC5245)
> - SIP Keep-Alive Usage (RFC 5626)
> - NAT Behavior Discovery Usage (RFC 5780)
>
> A7. Section 4, 3rd paragraph: "If the STUN MESSAGE-INTEGRITY attribute
> is present, the contents of the ORIGIN attribute are integrity protected."
>
> Which never happen in the usages listed in the document:  for section
> 2.1, there is never an integrity protection, and for 2.2, the ORIGIN is
> needed to select the realm, so the ORIGIN is sent before it can be
> protected.  Perhaps 2.2 should say that if ORIGIN was sent to select the
> realm, it MUST be repeated at identical on the second Allocate (the one
> that has an M-I) and that the server MUST reject it if it is not
> identical to the first one.  Not sure it matters though.
>

[Oleg] That's right, I think that the wording about the MESSAGE-INTEGRITY
must be clarified and/or removed. In the initial ALLOCATE request, the
ORIGIN is not protected. In other requests, the ORIGIN is optional and not
required - but if it is included, then it will be protected (as virtually
any other attribute) but the value of the ORIGIN attribute in those
protected messages really does not matter. I do not see any valid attack
that can be prevented by checking the ORIGIN attribute value and by
protection. It can help only in finding the errors in the software
implementation but that is definitely not a valid purpose of the network
protocol.

Thanks
Oleg