Re: [tram] Stephen Farrell's Discuss on draft-ietf-tram-turn-third-party-authz-13: (with DISCUSS and COMMENT)

Martin Thomson <martin.thomson@gmail.com> Tue, 14 April 2015 16:45 UTC

Return-Path: <martin.thomson@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 0C8191B2EAE; Tue, 14 Apr 2015 09:45:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] 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 3DZ2jWbDvuJT; Tue, 14 Apr 2015 09:45:49 -0700 (PDT)
Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1CD841B2EAA; Tue, 14 Apr 2015 09:45:49 -0700 (PDT)
Received: by oiko83 with SMTP id o83so6379386oik.1; Tue, 14 Apr 2015 09:45: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=dcsLg8pEH7NPAgmzNUXAm6YeTQmWPGvcbiBpyZQsJ5w=; b=0ioDfLtEKHKiY14Q4TeYsGbH7JkifOUD8VmbuzLglV51/HsjOQDfW3I0VDlKkgTf0D jazLCabdVyQFUhUBG4SNNxTsNw/QWJWvkzLhfiZ54F12jgKcjWXEjMMorA3ZUDYeh+IZ izjCx+GLhu3QwQdpu3uLospqPo/Aef/qBwaKPZVsbrYZxYoTK9go9+ynfjtdSSOOs7v5 4nue97YPqTk9VKfJRlKydGhLapmkKqecJX9Vj7Pi1AX9gRuge+rSfJF6oybGfv5tgvja o3KnzZ4OG0CW6EpVrdNJZeV78ya6PHxY4PHkcN0OTholJa+xA1wqhqPz8gMRMo7txdZM cJzQ==
MIME-Version: 1.0
X-Received: by 10.202.200.209 with SMTP id y200mr12062611oif.20.1429029948619; Tue, 14 Apr 2015 09:45:48 -0700 (PDT)
Received: by 10.202.212.212 with HTTP; Tue, 14 Apr 2015 09:45:48 -0700 (PDT)
In-Reply-To: <CALDtMrLO-kqM4LTOgKJq90swE52k0draQ110t5Q8GVfUwPFpUQ@mail.gmail.com>
References: <20150410193813.20376.40907.idtracker@ietfa.amsl.com> <55282B4E.4000409@akamai.com> <913383AAA69FF945B8F946018B75898A411FFC5F@xmb-rcd-x10.cisco.com> <CABkgnnUyHTd83LWM0Lp0xOJnVp3Gt6KvrbuGkraejP7kwEJf7w@mail.gmail.com> <CALDtMrLO-kqM4LTOgKJq90swE52k0draQ110t5Q8GVfUwPFpUQ@mail.gmail.com>
Date: Tue, 14 Apr 2015 09:45:48 -0700
Message-ID: <CABkgnnXM0oZs1Za9v5eAGAnNwioQDxHBu9GCP5K04XO9BN6YtQ@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Oleg Moskalenko <mom040267@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tram/oBGgex4M64RIkACzXMky3BzKONY>
Cc: "tram-chairs@ietf.org" <tram-chairs@ietf.org>, "tram@ietf.org" <tram@ietf.org>, Brandon Williams <brandon.williams@akamai.com>, "rlb@ipv.sx" <rlb@ipv.sx>, "Salz, Rich" <rsalz@akamai.com>, "Tirumaleswar Reddy (tireddy)" <tireddy@cisco.com>, "Stephen Farrell (stephen.farrell@cs.tcd.ie)" <stephen.farrell@cs.tcd.ie>
Subject: Re: [tram] Stephen Farrell's Discuss on draft-ietf-tram-turn-third-party-authz-13: (with DISCUSS and COMMENT)
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, 14 Apr 2015 16:45:51 -0000

On 13 April 2015 at 22:26, Oleg Moskalenko <mom040267@gmail.com> wrote:
> On Mon, Apr 13, 2015 at 11:17 AM, Martin Thomson
> <martin.thomson@gmail.com> wrote:
>>
>> Section 1 doesn't really explain what the draft provides.
>
> I disagree. It is pretty clear on general description what this draft
> is about. At least, it was obvious to me from the very first reading.

I've read it again.  It's clearer on second reading, but still confused.

The abstract says:

   This document proposes the use of OAuth 2.0 to obtain and validate
   ephemeral tokens that can be used for Session Traversal Utilities for
   NAT (STUN) authentication.

But the document doesn't do that at all.  It describes the
communications between the authorization server and the STUN server.
Sort of.

Here's what I'd say:

1. Long-term secrets can't be sent to untrusted TURN clients, such as
a browser using WebRTC. These clients need to be given short-lived
credentials.

2. This document describes how the OAuth framework can be applied to
this problem.
   - A client is directed to an authorization server to retrieve an
access token.  Clients are configured with the authorization server
and the method of retrieval.
   - Clients retrieve a token from the authorization server (using
whatever proprietary method they choose).
   - Clients sends the token in a TURN server in Allocate or Refresh requests.
   - TURN servers use information in the token in authorizing these requests.

3. This document defines the ACCESS-TOKEN STUN attribute that is used
to carry the authorization token provided by an authorization server.

I see no value in standardizing protocol interactions (4.1.1) or the
access token format.  I can't work out how to make the
THIRD-PARTY-AUTHORIZATION work at all.

>> Section 3 claims to be an overview, but it doesn't actually describe
>> what happens.  It leaves the token acquisition part out of scope.
>> That's fine, but it doesn't describe how the THIRD-PARTY-AUTHORIZATION
>> attribute might be used, even in the broadest sense.
>
> It describes it in section 6.1.

Not really.

6.1 says that the presence of the attribute indicates that third party
authorization is needed.  It doesn't describe what the value is *for*.
Given that it's not actually possible to act on the information that
it does provide without some external information, I fail to see the
value of the attribute.

> "Server name" is just a logical whatever name. It is not related to
> anything that you mentioned; that is just a well-known name, set by
> the STUN server administrator. I believe that this is pretty clear
> from the text.

Are you saying that the value has no protocol value?

> I believe that extra token information is a very very bad idea - it
> kills the whole interoperability thing in the draft. If we are adding
> "extra" information to the token, we can as well just kill the draft
> and tell the STUN server developers "do whatever you want, secure the
> stuff somehow, we do not care".

Well, we can disagree about this.

I also disagree with the idea that this interface between STUN server
and authorization server can be standardized in such a half-hearted
fashion.  If the HTTP interaction is out of scope, then why isn't the
token construction also out of scope?

> I suppose that's pretty clear that the AS and STUN server mutual
> communications are protected by TLS certificates that they trust.

I suppose that you mean this: "HTTPS MUST be used for mutual
authentication and confidentiality."  HTTPS doesn't provide client
authentication natively, so I attributed this to a misunderstanding
about what HTTPS could provide.  If you say that this is important,
authorizing access to the long-term key is not given proper treatment.

There's nothing in the security considerations; there should be.

>> Section 5 fails to explicitly state whether the MAC key is used as
>> input to short term or long term credentials.  It needs to say short
>> term, I think.
>
> No. The whole document is about the LONG-TERM credentials. That's
> pretty clear for everybody who followed the STUN security, and it is
> getting mentioned in the text many times (just search for "long-term"
> on the page).

"long-term" is used in the introduction as part of an explanation that
essentially says that long-term credentials are broken for the WebRTC
use case.  That much is true.

Elsewhere it is used exclusively to describe the long-term credentials
shared between the authorization server and the STUN server.

Nothing is said at all regarding what method to use for STUN MESSAGE-INTEGRITY.

>> Section 7 seems to imply two layers of authentication: the AEAD and
>> some HMAC.  I can't work out what is being authenticated.  I'm not
>> sure that anyone else could either.
>
> I am afraid that you simply need more time to read that document.

I did spend more time.  I now understand why I was so confused by the
text.  Why would this document repeat text from a document that it
doesn't even need to cite?

Also, I just noticed that this uses base64.  That's arbitrary.  Does
the client remove that encoding before including the token in the STUN
message?  There's no MUST there, but it seems like it's part of the
process somehow.