Re: [secdir] SecDir review of draft-ietf-sipcore-sip-websocket-08

Iñaki Baz Castillo <ibc@aliax.net> Fri, 12 April 2013 13:17 UTC

Return-Path: <ibc@aliax.net>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 539F321F86A6 for <secdir@ietfa.amsl.com>; Fri, 12 Apr 2013 06:17:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.677
X-Spam-Level:
X-Spam-Status: No, score=-2.677 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OMf27d8dP9ed for <secdir@ietfa.amsl.com>; Fri, 12 Apr 2013 06:17:31 -0700 (PDT)
Received: from mail-qa0-f41.google.com (mail-qa0-f41.google.com [209.85.216.41]) by ietfa.amsl.com (Postfix) with ESMTP id 2548221F8573 for <secdir@ietf.org>; Fri, 12 Apr 2013 06:17:31 -0700 (PDT)
Received: by mail-qa0-f41.google.com with SMTP id bs12so863563qab.0 for <secdir@ietf.org>; Fri, 12 Apr 2013 06:17:30 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding :x-gm-message-state; bh=C7W9YIaJsxPI1aOZ6P7CqujOhzJO6K1uqHhS/UZ9/Fo=; b=F5L4CycZw6T+BsYgUWeT8+Nz98r7LT5iGA6Mlquoxwo7zOV6zShOhM9Vfs29j1TSdV sluP0xMmnWZq9ZK4djiWFFRciNQmayNdYXg9bUhabMu0REwmIR0nzHYLQcmDgnOR0hRF 47CG4GjgJIksAAfONOFdcy90RgKAGi15JsXCBlaxQE2mLPf7S/zymbd+GFXhsAE2c7Mm lx4lv2rFbvSO7V3h1zDGHa6ZobclN7PNQamiCm+CMN83RJoe9jK8utj+eZRntftBdl7W jYMmA1b5Kbx6KvWFsfIQ2jRIFF0jfT3m5abdl9MMLk1uENim1nHEnocIDf5SwRmdo0qE TTtg==
X-Received: by 10.224.36.6 with SMTP id r6mr11886960qad.84.1365772650533; Fri, 12 Apr 2013 06:17:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.49.81.175 with HTTP; Fri, 12 Apr 2013 06:17:10 -0700 (PDT)
In-Reply-To: <CALiegfn55tepAXP2DJye6doFcd+ocY9a1oEchLLFhVo5BZf1VA@mail.gmail.com>
References: <5165D736.9010903@gmail.com> <CALiegfn55tepAXP2DJye6doFcd+ocY9a1oEchLLFhVo5BZf1VA@mail.gmail.com>
From: Iñaki Baz Castillo <ibc@aliax.net>
Date: Fri, 12 Apr 2013 15:17:10 +0200
Message-ID: <CALiegf=dp6veajuXNUMuVd0Re_8J-FvFiY2bqd_tzJe5uRWG=Q@mail.gmail.com>
To: Yaron Sheffer <yaronf.ietf@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Gm-Message-State: ALoCoQmQistsIha40bZmftsUvObg/zeelF00Ulmj0SPzHj5j80Jh6kIuAdFIF35qwvhMay0uMKLZ
Cc: draft-ietf-sipcore-sip-websocket.all@tools.ietf.org, The IESG <iesg@ietf.org>, IETF Security Directorate <secdir@ietf.org>
Subject: Re: [secdir] SecDir review of draft-ietf-sipcore-sip-websocket-08
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/secdir>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Apr 2013 13:17:32 -0000

Please let me one comment more about this at the end of this mail:



2013/4/11 Iñaki Baz Castillo <ibc@aliax.net>:
> 2013/4/10 Yaron Sheffer <yaronf.ietf@gmail.com>:
>
>> Details
>>
>> RFC 3261 has 20 pages of security considerations, and defines several
>> security mechanisms. The current document "only" defines a transport for
>> SIP, but such transport needs to preserve the security of any SIP mechanisms
>> being used. In particular, it should be clear how endpoint identities are
>> determined at each layer and how identities at different layers relate to
>> one another. In other words, what's known as "channel binding".
>
> IMHO there is no a "channel binding". It may be or not, that's up to
> the implementor. For example an implementor could use the same WS
> connection and carry SIP registrations and calls from different SIP
> accounts over the same WS connection. Another implementor may
> associate (at server side) each WS connection with a SIP identity (for
> example the SIP identity could be provided in a URL parameter in the
> WS HTTP GET request, or retrieved from a Cookie in the same HTTP
> request).
>
> Honestly I don't think we should force a specific behavior here. When
> SIP is transported over TCP there is no rules in RFC 3261 stating that
> the endpoint is associated to the TCP connection, same here IMHO.
>
>
>
>> The only security-related section (other than the Security Considerations)
>> is Authentication (Sec. 7), and this section is marked non-normative. So the
>> reader is left to wonder: how is the SIP client authenticated? How does this
>> authentication relate to the WebSocket-level client authentication? And
>> similarly for the server.
>
> IMHO we should leave this as flexible as possible. For example, as
> author of OverSIP (the first SIP proxy with WebSocket support) I leave
> the user to program it custom logic for authenticating/authorizing
> WebSocket connections and the SIP "layer" on top of them. From section
> "WebSocket authentication/authorization" at
> http://oversip.net/documentation/misc/sip_websocket/:
>
>
> ------------------------------------------------------------------
> WebSocket authentication/authorization
>
> When a WebSocket client attempts to establish a WebSocket connection,
> OverSIP invokes user programmable callbacks. The user can there
> inspect parameters from the connection (including the HTTP GET request
> of the WebSocket handshake) in order to decide, based on any custom
> policy, whether to allow or deny the connection.
>
> The user can also assign custom parameters to the authorized WebSocket
> connection and retrieve such parameters when processing SIP requests
> coming through that WebSocket connection. By playing with these
> features several architectural solutions can be built for implementing
> any kind of authentication/authorization system.
> ------------------------------------------------------------------


About the above subject, I strongly consider that the draft MUST NOT
mandate how the implementor should authenticate/authorize WebSocket
connection/authentications or how he should correlate WebSocket
connections with SIP identities. If we mandate that then we are
limiting web developers. There are tons of ways in WWW world for
authenticating and authorizing connections/sessions, IMHO we should
not mandate nothing at the WebSocket layer because that is out of the
scope of the draft (which indeed just defines WebSocket as a new
transport for SIP, but does not attempt to deal with WebSocket
authentication/authorization).

Please take into account that RFC 6455 (The WebSocket Protocol) does
NOT state how authentication/authorization in WebSocket sessions
should be implemented. Instead it leaves full flexibility to web
developers for choosing their preferred mechanism. Why should this
draft mandate that at *WebSocket* level? does RFC 3261 state something
about how a SIP proxy should accept or not SIP TCP connections from
certain IP addresses?

The draft could mandate something like:

"HTTP Digest authentication is required at WebSocket level when
establishing the WS handshake, and later HTTP Digest authentication
MUST be used for every SIP request over such a WS connection, and both
credentials must be the same and...".

That would be a big error, and that would just work if we assume that
"SIP over WebSocket" is just valid for creating a pure phone in a web
(out of the context of the website itself) which would just become a
replacement for desktop phones or softphones. That's fully wrong.
There are a lot of possible scenarios for "SIP over WebSocket":

- A social network, which *already* has its
login/authentication/session/authorization mechanism, could include
SIP over WebSocket for enabling RTC between its users. No need for
Digest auth at all since the user was *already* logged in the web site
and thus the server(s) can correlate the HTTP session with the
WebSocket connection (via Cookies, a custom token or whatever).

- Another web site could provide a "Web <--> PSTN" application in
which the user has to set his SIP information (SIP account, SIP proxy,
SIP password...).

- etc etc


So, I strongly think that the draft is correct in this subject.
Mandating how authentication must be done would limit the scope of
this SIP transport and would make it 100% unusable for most of the
existing web deployments.


Best regards.



--
Iñaki Baz Castillo
<ibc@aliax.net>