[RAI] MSRP Expert Review of draft-pd-dispatch-msrp-websocket-04

Ben Campbell <ben@nostrum.com> Fri, 10 January 2014 23:34 UTC

Return-Path: <ben@nostrum.com>
X-Original-To: rai@ietfa.amsl.com
Delivered-To: rai@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com []) by ietfa.amsl.com (Postfix) with ESMTP id B0F221ADF7E for <rai@ietfa.amsl.com>; Fri, 10 Jan 2014 15:34:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.264
X-Spam-Level: *
X-Spam-Status: No, score=1.264 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_MISMATCH_COM=0.553, HOST_MISMATCH_NET=0.311, MANGLED_LIST=2.3] autolearn=no
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id Aa4r3hnVNBLj for <rai@ietfa.amsl.com>; Fri, 10 Jan 2014 15:34:53 -0800 (PST)
Received: from shaman.nostrum.com (nostrum-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:267::2]) by ietfa.amsl.com (Postfix) with ESMTP id AB6E91AD10A for <rai@ietf.org>; Fri, 10 Jan 2014 15:34:53 -0800 (PST)
Received: from [] (mobile-166-147-069-018.mycingular.net []) (authenticated bits=0) by shaman.nostrum.com (8.14.3/8.14.3) with ESMTP id s0ANYXr8021139 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 10 Jan 2014 17:34:39 -0600 (CST) (envelope-from ben@nostrum.com)
From: Ben Campbell <ben@nostrum.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Date: Fri, 10 Jan 2014 17:34:28 -0600
Message-Id: <45B84D8F-AD8C-4B28-90DF-9B1C40771104@nostrum.com>
To: draft-pd-dispatch-msrp-websocket.all@tools.ietf.org, Mary Barnes <mary.ietf.barnes@gmail.com>
Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\))
X-Mailer: Apple Mail (2.1827)
Received-SPF: pass (shaman.nostrum.com: is authenticated by a trusted mechanism)
Cc: rai@ietf.org
Subject: [RAI] MSRP Expert Review of draft-pd-dispatch-msrp-websocket-04
X-BeenThere: rai@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Real-time Applications and Infrastructure \(RAI\)" <rai.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rai>, <mailto:rai-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rai/>
List-Post: <mailto:rai@ietf.org>
List-Help: <mailto:rai-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rai>, <mailto:rai-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Jan 2014 23:34:55 -0000


Mary asked me to do a review of draft-pd-dispatch-msrp-websocket-04 from the perspective of an alleged MSRP expert. (Actually she requested it for 03, but since 04 is available, I reviewed that one. Please be advised that my knowledge of WebSocket is somewhat limited.

I think this draft is on the right track and generally well written. But I have two general areas of concern, which I think I've mentioned before:

 I'd like to see more detail on the expected support (and behavior) for a WebSocket MSRP Relay when dealing with 4975/4976 clients and relays. For example, would it be acceptable to build a WebSocket MSRP Relay that would only talk to WebSocket clients, and not support "legacy" MSRP relays and clients at all? Since this draft introduces some new rules on chunk sizes, how would a WebSocket MSRP relay handle it if a "legacy" peer did not follow them? 

The security considerations section needs considerably more meat. I'd like to see a discussion of the security implications of downgrading the 4976 MUST requirement for TLS between a client and a server, as well as the use of the MSRPS scheme if the WebSocket connection is not protected.

It would be worth a discussion of any other TLS requirements that differ between MSRP/WebSocket and 4975/4976. For example, are the certificate matching rules the same for WebSocket as for MSRP/TLS? Is there any requirement that the domain names match between the WebSocket and MSRP layers? (i.e. could I authenticate as example.com, but except traffic for example.net?)

From higher level perspective, does the use of WebSocket introduce potential web oriented vunerabilities that native MSRP wouldn't have? (e.g., sidejacking of authentication cookies over non-protected connections?)

specific comments:

-- Abstract and Introduction:

The idea that WebSocket enables communication between clients and servers needs a bit more context. One assumes that clients and servers could talk to each other before the advent of WebSocket. When does it make sense to use MSRP/WebSocket rather than MSRP/TLS or MSRP/TCP?

-- section 1, last bullet:

This point needs more context. The need to apply policy to a messages is already one of the justifications for 4976. Likewise, MSRP using SIP already offers varying degrees of authentication. How is the need for these things different in the WebSockets context?


I am not happy with the downgrade of of the TLS requirement between client and relay. I recognize that WebSocket

-- 4.2:

MSRP only allows a "binary" transfer encoding. I'm not sure it makes sense to use text frames, even for text content. If text frames are allowed, do you need to verify that only text-based content-types are negotiated at the signaling layer? Does introduce a mapping requirement for WebSocket relays, for example if a WebSocket client sends text frames towards a "legacy" peer?

-- 5.1, 1st paragraph:

Is it impossible to have an MSRP _client_ implemented on a WebSocket _server_? (For example, an robot endpoint for human-to-machine or machine-to-machine communication?)

-- 5.1, last paragraph:

Can you offer guidance on a reasonable or maximum chunk size? It may be worth suggesting a minimum size beneath which MSRP messages should not be chunked. Can a MSRP chunk in a WebSocket frame be interrupted? (I note the examples have interruptible chunks.)

nit: Indented paragraphs are usually considered parenthetical explanations. It's generally not a good idea to put 2119 normative language in them.

-- 5.2.1: 

Is there ever a need to map between MSRP URIs and HTTP URIs? Is a WebSocket MSRP client expected to always connect to it's own server, or would it ever connect to a WebSocket server that it learned about in the offer/answer? (e.g a WebSocket server acting on behalf of the peer?) Is there any requirement that the MSRP URI domain name matches the HTTP domain name in any way? (In particular, can a server that presented a TLS cert for one or more domains accept MSRP URIs for a domain that was not included in the cert?)

-- 5.3.1:

It seems ambiguous when you allow the connection to be authenticated at the WebSocket layer whether the AUTH request is still required. I assume it is, since all the examples use it. But it's not clear to me from the language in this section.

-- 5.3.2:

This issue has given me heartburn for WebSocket in general. It's not as big of an issue for protocols that do not have MUST level requirements for TLS. But I really don't like downgrading a security related MUST from 4976. As I mentioned above, if we are going to do so, we need a thorough discussion of the security implications. (For example, do we introduce a requirement to ensure MSRPS URLs are never used for unprotected links? Do we need to worry about "legacy" endpoint users that assume that the peer's client to relay connection is always protected? 

It seems like we should have some general IETF policy on this, as I'm sure MSRP is not the first place it has come up. But in general, while I am sensitive to "existing code" or "API" limitations preventing some requirements from being MUSTs, I am personally less sympathetic when it means downgrading an already existing security requirement. 

-- 6, last paragraph:

Seems lile they also need to be prepared to receive bodiless SEND keep-alives  from the peer, especially from legacy peers.

-- 7:

Is there any requirent (in WebSockets or otherwise) that authentication cookies only be tranferred over protected connections? Does this introduce a sidejacking attack into MSRP?

-- 7, last paragraph: " ... authentication MAY be requested at MSRP protocol level."

Who can request it? Just the client by sending an AUTH? (Still not clear if AUTH is expected when authenticating at the WebSocket layer.) Also, you might consider avoiding 2119 language in a section marked as "non-normative".

-- 8:

I'd like to see an example with authentication included. It would also be good to see an example where the peer has it's own relay.

All the examples assume default settings for the Failure-Report and Success-Report header fields. There's no other mention of them. Does anything change with those as a result of using WebSocket?

-- 8.4:

Does this not still assume the offer/answer exchange from the previous example? Why not include the "bob -> alice" message in the previous example? (Or are we assuming Bob initiated the session negotiation this time?)