Subject: Re: [tram] FW: New Version Notification for draft-reddy-tram-turn-third-party-authz-00.txt

From: "Tirumaleswar Reddy (tireddy)" <[email-masked]>
Date: Mon, 17 Feb 2014 11:10:24 +0000

Hi Oleg,

Thanks for the review. Please see inline [TR]

From: Oleg Moskalenko [mailto:[email-masked]] 
Sent: Sunday, February 16, 2014 10:31 AM
To: Tirumaleswar Reddy (tireddy)
Cc: [email-masked]
Subject: Re: [tram] FW: New Version Notification for draft-reddy-tram-turn-third-party-authz-00.txt

Hi Tiru
I have some comments:
1) Section 4. Obtaining a Token Using OAuth, figure 4

I believe that the sequence of messages is incorrect. The TURN server most probably will contact the Authorization server AFTER it gets the Allocate request. But on the figure 4, it looks like it somehow can predict the incoming request. The correct sequence must be, in the general case:
   Access Token Request (1) from client to Auth server
   Access Token + Session Key (2) from Auth server to client
   Allocate request from client to TURN server (3)
   Get Token from TURN Server to Auth server (4)
   Token metadata from Auth Server to TURN server (5)
   Allocate response from TURN server to the client (6)

[TR] Good catch, fixed it. It got messed when we were changing from self-contained to handle token.
 
The sequence shown on the figure 4 is possible only is the Auth Server and TURN server are somehow closely integrated and that is unnecessary.

[TR] Yes, the AS and TURN server have to be integrated. There may be ways to standardize this, but this is not in the scope of this doc right away.

2) The document is saying that the client when communicating to the Auth Server uses HTTP requests with JSON (REST API ?). May be it would be helpful if the communication protocol between TURN server and Auth server would be mentioned, too.

[TR] Drafts in OAuth WG like https://tools.ietf.org/html/draft-richer-oauth-introspection-04 discuss the communication mechanism b/w Resource Server and Authorization server.  You may also want to look into http://www.ietf.org/mail-archive/web/oauth/current/msg08607.html which discusses such communication mechanism already implemented but for a different purpose. I guess it all worked because Resource server and Authorization server are developed by the same company but with this use case we may have to discuss if standardization is required for the communication mechanism.

3) Section 7.2:

   OAuth does not impose any limitation on the length of the access token but since
   STUN messages cannot exceed 548 bytes (Section 7.1 of [RFC5389]),
   access token length needs to be restricted to fit within the maximum
   STUN message size.

I am not sure that the STUN (Binding ?) max message size is relevant here and worth mentioning at all - because this doc is about TURN, and the TURN messages are often much larger than 548 bytes (especially when carrying the video traffic). So I see no relevance of the 548 limit to the new authentication standard. And that limitation of 548 bytes is applicable only to the cases when we suspect that the path MTU is really really low and that is an extremely rare case.

[TR] Good point. But RFC 5766 recommends to restrict the size (Section 2.7 Avoiding Fragmentation)

<snip>

   As a guideline, sending a maximum of 500 bytes of application data in
   a single TURN message (by the client on the client-to-server leg) or
   a UDP datagram (by the peer on the peer-to-server leg) will generally
   avoid IP fragmentation.

</snip>

4) Are we sure that we want to limit the OAuth applicability only to the long-term credentials mechanism ? I see no technical or philosophical reasons why not to use it for short-term credentials mechanism, too. It would be a more "symmetric" approach.

[TR] what is the use case for short-term credential mechanism with TURN ?

5) I'd put more definite wording how TURN server handles the token lifetime. What happens in the middle of the TURN session, is the auth token expires while the session is still active ? There may be two possible cases:
   - the token lifetime is applicable only to the session initiation procedure. When the TURN session has been already established, it can go indefinitely while the client is refreshing the session properly.
   - in second case when the token expires, the server rejects new requests from the client (in the same TURN session) until the client sends the new token data in re-authentication exchange.

I'd suggest the first case as an eisier case for the implementation.

[TR] The client MUST obtain a new token after the previously used one expires. As you point out an already established TURN session can continue, the new token is applicable for new requests.  If the client uses the token after its lifetime then the TURN server MUST return error that the token is invalid which is in line with the steps defined in http://tools.ietf.org/html/rfc6749#section-1.5 

We will update these details next revision.

Cheers,
-Tiru.

Regards,
Oleg

On Fri, Feb 14, 2014 at 6:41 PM, Tirumaleswar Reddy (tireddy) <[email-masked]> wrote:
This document proposes the use of third party authorization using OAuth for TURN. Comments and suggestions are welcome.

-Tiru

-----Original Message-----
From: [email-masked] [mailto:[email-masked]]
Sent: Friday, February 14, 2014 1:59 PM
To: Ram Mohan R (rmohanr); Prashanth Patil (praspati); Tirumaleswar Reddy (tireddy); Prashanth Patil (praspati); Justin Uberti; Justin Uberti; Tirumaleswar Reddy (tireddy); Ram Mohan R (rmohanr)
Subject: New Version Notification for draft-reddy-tram-turn-third-party-authz-00.txt

A new version of I-D, draft-reddy-tram-turn-third-party-authz-00.txt
has been successfully submitted by Tirumaleswar Reddy and posted to the IETF repository.

Name:           draft-reddy-tram-turn-third-party-authz
Revision:       00
Title:          TURN Extension for Third Party Authorization
Document date:  2014-02-14
Group:          Individual Submission
Pages:          11
URL:            http://www.ietf.org/internet-drafts/draft-reddy-tram-turn-third-party-authz-00.txt
Status:         https://datatracker.ietf.org/doc/draft-reddy-tram-turn-third-party-authz/
Htmlized:       http://tools.ietf.org/html/draft-reddy-tram-turn-third-party-authz-00

Abstract:
   This document proposes the use of OAuth to obtain and validate
   ephemeral tokens that can be used for TURN authentication.  The usage
   of ephemeral tokens ensure that access to a TURN server can be
   controlled even if the tokens are compromised, as is the case in
   WebRTC where TURN credentials must be specified in Javascript.  It
   also addresses the need for stronger authentication described in
   [I-D.reddy-behave-turn-auth].

Please note that it may take a couple of minutes from the time of submission until the htmlized version and diff are available at tools.ietf.org.

The IETF Secretariat

_______________________________________________
tram mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/tram

---

From: Oleg Moskalenko <[email-masked]>
Date: Mon, 17 Feb 2014 10:29:11 -0800

Hi Tiru

please see below as [Oleg]:

On Mon, Feb 17, 2014 at 3:10 AM, Tirumaleswar Reddy (tireddy) <
[email-masked]> wrote:

> Subject: Re: [tram] FW: New Version Notification for
> draft-reddy-tram-turn-third-party-authz-00.txt
>
> Hi Tiru
> I have some comments:
> I believe that the sequence of messages is incorrect. The TURN server most
> probably will contact the Authorization server AFTER it gets the Allocate
> request. But on the figure 4, it looks like it somehow can predict the
> incoming request. The correct sequence must be, in the general case:
> The sequence shown on the figure 4 is possible only is the Auth Server and
> TURN server are somehow closely integrated and that is unnecessary.
>
> [TR] Yes, the AS and TURN server have to be integrated. There may be ways
> to standardize this, but this is not in the scope of this doc right away.
>

[Oleg]: I am afraid that if we require that AS and TURN to be provided by
the same company, it may affect the adoption of this approach.

>
> 2) The document is saying that the client when communicating to the Auth
> Server uses HTTP requests with JSON (REST API ?). May be it would be
> helpful if the communication protocol between TURN server and Auth server
> would be mentioned, too.
>
> [TR] Drafts in OAuth WG like
> https://tools.ietf.org/html/draft-richer-oauth-introspection-04 discuss
> the communication mechanism b/w Resource Server and Authorization server.
>  You may also want to look into
> http://www.ietf.org/mail-archive/web/oauth/current/msg08607.html which
> discusses such communication mechanism already implemented but for a
> different purpose. I guess it all worked because Resource server and
> Authorization server are developed by the same company but with this use
> case we may have to discuss if standardization is required for the
> communication mechanism.
>

[Oleg]: As I said, if the AS and TURN in practice will have to be provided
by the same company, then that may be a problem - it will affect the
standard adoption by the WebRTC community. I'll have to explore the current
situation with the open-source OAuth servers - whether they provide a
viable "introspection" protocol. I hope some protocol recommendations can
be provided for third-party AS communications.

> I am not sure that the STUN (Binding ?) max message size is relevant here
> and worth mentioning at all - because this doc is about TURN, and the TURN
> messages are often much larger than 548 bytes (especially when carrying the
> video traffic). So I see no relevance of the 548 limit to the new
> authentication standard. And that limitation of 548 bytes is applicable
> only to the cases when we suspect that the path MTU is really really low
> and that is an extremely rare case.
>

[Oleg]: We recently had a discussion about that in WebRTC forum, with
Justin. He is saying that the WebRTC client tools (Chrome) assume the
minimum practical MTU as 1280 and that limit is used for media traffic. And
he is right that this MTU is a real modern practical limit.

>
>
> 4) Are we sure that we want to limit the OAuth applicability only to the
> long-term credentials mechanism ? I see no technical or philosophical
> reasons why not to use it for short-term credentials mechanism, too. It
> would be a more "symmetric" approach.
>

[Oleg]: Currently WebRTC uses only the long-term credentials mechanism but
still there is a TURN standard for the short-term mechanism. While I cannot
provide any concrete example, I suppose there are some. And I believe that
OAuth is orthogonal to the TURN auth mechanism used - they can be combined
either way. So I see that coupling OAuth with the long-term mechanism is
rather artificial.

>
> 5) I'd put more definite wording how TURN server handles the token
> lifetime. What happens in the middle of the TURN session, is the auth token
> expires while the session is still active ? There may be two possible cases:
>    - the token lifetime is applicable only to the session initiation
> procedure. When the TURN session has been already established, it can go
> indefinitely while the client is refreshing the session properly.
>    - in second case when the token expires, the server rejects new
> requests from the client (in the same TURN session) until the client sends
> the new token data in re-authentication exchange.
>
> [TR] The client MUST obtain a new token after the previously used one
> expires. As you point out an already established TURN session can continue,
> the new token is applicable for new requests.

[Oleg]: Tiru, I'd still like to hear a more definite language: what about
"new requests" within the existing session ? They are allowed to use the
old token - right ? When you are saying "new requests" you mean "new
session allocation requests", right ?

Regards,
Oleg

---

From: Oleg Moskalenko <[email-masked]>
Date: Mon, 17 Feb 2014 21:12:09 -0800

Hi Tiru

I went thru the OAuth interoperability links which you suggested (see
below):

> case we may have to discuss if standardization is required for the
The links provide meaningful suggestions - but the drafts did not result in
definite standards. The current situation in OAuth is that it is a pretty
fragmented and balkanized field... and it is not moving toward a definite
interoperability standard.

As of now, OAuth is actually not a standard - it is more a framework. So we
have a logical conflict - the TURN specs are definitely a standard, not a
framework, but we introduce a dependency on something that is just a
framework. That would be inconsistent.

Each OAuth server provider defines its own proprietary API for the Resource
Server. That does not sounds very attractive. In practice, every TURN
server provider will have to provide its own OAuth server, too. That will
lead to further fragmentation.

Overall, OAuth is a heated minefield full of emotions and from the outside,
it seems to be going nowhere in terms of interoperability. The lead
developer of OAuth withdrew himself:

http://hueniverse.com/2012/07/oauth-2-0-and-the-road-to-hell/

As a TURN server developer, I'd be very hesitant to tie, closely, the
implementation to OAuth. I'd rather suggest to look at other alternatives,
giving the current state of OAuth - or wait till the things will be
clarified and OAuth will get more interoperability.

Of course we can develop our own OAuth server but that would be a rather
unfortunate outcome of the standardization process.

I am not saying that from the technical point of view this draft specs is a
bad idea. The TURN field is ready for something like that; but I see that
OAuth is not ready - and I have concerns on being dependent on OAuth.

Tiru, can you address my concerns ?

Thanks,
Oleg