idnits 2.17.1 draft-pascual-bfcpbis-bfcp-websocket-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([I-D.draft-ietf-bfcpbis-RFC4583bis], [I-D.draft-ietf-bfcpbis-RFC4582bis]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == The 'Updates: ' line in the draft header should list only the _numbers_ of the RFCs which will be updated by this document (if approved); it should not include the word 'RFC' in the list. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 415 has weird spacing: '...te name ws-ur...' -- The document date (February 9, 2014) is 3719 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'I-D.draft-ietf-bfcpbis-rfc4583bis' is mentioned on line 24, but not defined ** Obsolete undefined reference: RFC 4583 (Obsoleted by RFC 8856) == Outdated reference: A later version (-16) exists of draft-ietf-bfcpbis-rfc4582bis-10 == Outdated reference: A later version (-27) exists of draft-ietf-bfcpbis-rfc4583bis-08 ** Obsolete normative reference: RFC 4234 (Obsoleted by RFC 5234) -- Obsolete informational reference (is this intentional?): RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) Summary: 3 errors (**), 0 flaws (~~), 6 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 BFCPBIS Working Group V. Pascual 3 Internet-Draft A. Roman 4 Updates: rfc4582bis, rfc4583bis (if approved) Quobis 5 Intended status: Standards Track S. Cazeaux 6 Expires: August 13, 2014 France Telecom Orange 7 G. Salgueiro 8 Cisco 9 S. Garcia Murillo 10 Medooze 11 February 9, 2014 13 The WebSocket Protocol as a Transport for the Binary Floor Control 14 Protocol (BFCP) 15 draft-pascual-bfcpbis-bfcp-websocket-00 17 Abstract 19 The WebSocket protocol enables two-way realtime communication between 20 clients and servers. This document specifies a new WebSocket sub- 21 protocol as a reliable transport mechanism between Binary Floor 22 Control Protocol (BFCP) entities to enable usage of BFCP in new 23 scenarios. This document normatively updates [I-D.draft-ietf- 24 bfcpbis-rfc4582bis] and [I-D.draft-ietf-bfcpbis-rfc4583bis] 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on August 13, 2014. 43 Copyright Notice 45 Copyright (c) 2014 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 62 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 3 63 3. The WebSocket Protocol . . . . . . . . . . . . . . . . . . . 4 64 4. The WebSocket BFCP Sub-Protocol . . . . . . . . . . . . . . . 4 65 4.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 5 66 4.2. BFCP encoding . . . . . . . . . . . . . . . . . . . . . . 5 67 5. BFCP WebSocket Transport . . . . . . . . . . . . . . . . . . 6 68 6. Fields in the 'm' Line . . . . . . . . . . . . . . . . . . . 6 69 7. Authentication . . . . . . . . . . . . . . . . . . . . . . . 7 70 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 71 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 72 9.1. Registration of the WebSocket BFCP Sub-Protocol . . . . . 9 73 9.2. Registration of the 'TCP/WS/BFCP' and 'TCP/WSS/BFCP' SDP 74 'proto' Values . . . . . . . . . . . . . . . . . . . . . 9 75 9.3. Registration of the 'ws-uri' SDP media attribute . . . . 9 76 9.4. Acknowledgements . . . . . . . . . . . . . . . . . . . . 10 77 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 78 10.1. Normative References . . . . . . . . . . . . . . . . . . 10 79 10.2. Informative References . . . . . . . . . . . . . . . . . 10 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 82 1. Introduction 84 The WebSocket [RFC6455] protocol enables two-way message exchange 85 between clients and servers on top of a persistent TCP connection 86 (optionally secured with TLS [RFC5246]). The initial protocol 87 handshake makes use of HTTP [RFC2616] semantics, allowing the 88 WebSocket protocol to reuse existing HTTP infrastructure. 90 The Binary Floor Control Protocol (BFCP) is a protocol to coordinate 91 access to shared resources in a conference. It is defined in 92 [I-D.ietf-bfcpbis-rfc4582bis] and is used between floor participants 93 and floor control servers, and between floor chairs (i.e., 94 moderators) and floor control servers. 96 Modern web browsers include a WebSocket client stack complying with 97 the WebSocket API [WS-API] as specified by the W3C. It is expected 98 that other client applications (those running in personal computers 99 and devices such as smartphones) will also make a WebSocket client 100 stack available. This document updates [I-D.ietf-bfcpbis-rfc4582bis] 101 and [I-D.ietf-bfcpbis-rfc4583bis] in order to enable the usage of 102 BFCP in these scenarios. 104 The transport over which BFCP entities exchange messages depends on 105 how the clients obtain information to contact the floor control 106 server (e.g. using an SDP offer/answer exchange per 107 [I-D.ietf-bfcpbis-rfc4583bis] or the procedure described in RFC5018 108 [RFC5018]). [I-D.ietf-bfcpbis-rfc4582bis] defines two transports for 109 BFCP: TCP and UDP. This specification defines a new WebSocket sub- 110 protocol (as defined in section 1.9 in [RFC6455]) for transporting 111 BFCP messages between a WebSocket client and server, a new reliable 112 and message boundary transport for BFCP. In order to enable this, 113 this document also defines two new SDP 'proto' values. 115 This document does not restrict the selection nor prevent the usage 116 of other transport mechanisms for the BFCP protocol. Transport 117 selection is entirely at the discretion of the application. As an 118 example, an RTCWeb applications may choose to use either DataChannel 119 or WebSocket transport for BFCP, while non-RTCWeb applications could 120 still benefit from the ubiquity of the WebSocket protocol and make 121 use of the transport for BFCP defined in this document. 123 2. Terminology 125 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 126 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 127 document are to be interpreted as described in [RFC2119]. 129 2.1. Definitions 131 BFCP WebSocket Client: A BFCP entity capable of opening outbound 132 connections to WebSocket servers and communicating using the 133 WebSocket BFCP sub-protocol as defined by this document. 135 BFCP WebSocket Server: A BFCP entity capable of listening for 136 inbound connections from WebSocket clients and communicating 137 using the WebSocket BFCP sub-protocol as defined by this 138 document. 140 3. The WebSocket Protocol 142 The WebSocket protocol [RFC6455] is a transport layer on top of TCP 143 (optionally secured with TLS [RFC5246]) in which both client and 144 server exchange message units in both directions. The protocol 145 defines a connection handshake, WebSocket sub-protocol and extensions 146 negotiation, a frame format for sending application and control data, 147 a masking mechanism, and status codes for indicating disconnection 148 causes. 150 The WebSocket connection handshake is based on HTTP [RFC2616] and 151 utilizes the HTTP GET method with an "Upgrade" request. This is sent 152 by the client and then answered by the server (if the negotiation 153 succeeded) with an HTTP 101 status code. Once the handshake is 154 completed the connection upgrades from HTTP to the WebSocket 155 protocol. This handshake procedure is designed to reuse the existing 156 HTTP infrastructure. During the connection handshake, client and 157 server agree on the application protocol to use on top of the 158 WebSocket transport. Such an application protocol (also known as a 159 "WebSocket sub-protocol") defines the format and semantics of the 160 messages exchanged by the endpoints. This could be a custom protocol 161 or a standardized one (as the WebSocket BFCP sub-protocol defined in 162 this document). Once the HTTP 101 response is processed both client 163 and server reuse the underlying TCP connection for sending WebSocket 164 messages and control frames to each other. Unlike plain HTTP, this 165 connection is persistent and can be used for multiple message 166 exchanges. 168 The WebSocket protocol defines message units to be used by 169 applications for the exchange of data, so it provides a message 170 boundary-preserving transport layer. These message units can contain 171 either UTF-8 text or binary data, and can be split into multiple 172 WebSocket text/binary transport frames as needed by the WebSocket 173 stack. 175 The WebSocket API [WS-API] for web browsers only defines callbacks 176 to be invoked upon receipt of an entire message unit, regardless 177 of whether it was received in a single Websocket frame or split 178 across multiple frames. 180 4. The WebSocket BFCP Sub-Protocol 182 The term WebSocket sub-protocol refers to an application-level 183 protocol layered on top of a WebSocket connection. This document 184 specifies the WebSocket BFCP sub-protocol for carrying BFCP messages 185 through a WebSocket connection. 187 4.1. Handshake 189 The BFCP WebSocket Client and BFCP WebSocket Server negotiate usage 190 of the WebSocket BFCP sub-protocol during the WebSocket handshake 191 procedure as defined in section 1.3 of [RFC6455]. The Client MUST 192 include the value "bfcp" in the Sec-WebSocket-Protocol header in its 193 handshake request. The 101 reply from the Server MUST contain "bfcp" 194 in its corresponding Sec-WebSocket-Protocol header. 196 Below is an example of a WebSocket handshake in which the Client 197 requests the WebSocket BFCP sub-protocol support from the Server: 199 GET / HTTP/1.1 200 Host: bfcp-ws.example.com 201 Upgrade: websocket 202 Connection: Upgrade 203 Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== 204 Origin: http://www.example.com 205 Sec-WebSocket-Protocol: bfcp 206 Sec-WebSocket-Version: 13 208 The handshake response from the Server accepting the WebSocket BFCP 209 sub-protocol would look as follows: 211 HTTP/1.1 101 Switching Protocols 212 Upgrade: websocket 213 Connection: Upgrade 214 Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= 215 Sec-WebSocket-Protocol: bfcp 217 Once the negotiation has been completed, the WebSocket connection is 218 established and can be used for the transport of BFCP messages. The 219 WebSocket messages transmitted over this connection MUST conform to 220 the negotiated WebSocket sub-protocol. 222 4.2. BFCP encoding 224 BFCP messages use a TLV (Type-Length-Value) binary encoding, 225 therefore BFCP WebSocket Clients and BFCP WebSocket Servers MUST be 226 transported in unfragmented binary WebSocket frames 227 (FIN:1,opcode:%x2) to exchange BFCP messages. The WebSocket frame 228 data MUST be a valid BCFP message, so the length of the payload of 229 the WebSocket frame MUST be lower than the maximum size allowed (2^16 230 +12 bytes) for a BCFP message as described in 231 [I-D.ietf-bfcpbis-rfc4582bis]. In addition, the encoding rules for 232 reliable protocols defined in [I-D.ietf-bfcpbis-rfc4582bis] MUST be 233 followed. 235 5. BFCP WebSocket Transport 237 WebSocket [RFC6455] is a reliable protocol and therefore the BFCP 238 WebSocket sub-protocol defined by this document is a reliable BFCP 239 transport. Thus, client and server transactions using WebSocket for 240 transport MUST follow the procedures for reliable transports as 241 defined in [I-D.ietf-bfcpbis-rfc4582bis] and 242 [I-D.ietf-bfcpbis-rfc4583bis] 244 BFCP WebSocket clients cannot receive incoming WebSocket connections 245 initiated by any other peer. This means that a BFCP Websocket client 246 MUST actively initiate a connection towards a BFCP Websocket server 248 Each BFCP message MUST be carried within a single WebSocket message, 249 and a WebSocket message MUST NOT contain more than one BFCP message. 251 6. Fields in the 'm' Line 253 Rules to generate an 'm' line for a BFCP stream are described in 254 [I-D.ietf-bfcpbis-rfc4583bis], Section 3 256 New values are defined for the transport field: TCP/WS/BFCP and TCP/ 257 WSS/BFCP. 259 TCP/WS/BFCP is used when BFCP runs on top of WS, which in turn 260 runs on top of TCP. 262 TCP/WSS/BFCP is used when BFCP runs on top of WSS, which in turn 263 runs on top of TLS and TCP. 265 When TCP is used as the transport, the port field is set following 266 the rules in Section 7 of [I-D.ietf-bfcpbis-rfc4582bis]. Depending 267 on the value of the 'setup' attribute, the port field contains the 268 port to which the remote endpoint will direct BFCP messages or is 269 irrelevant (i.e., the endpoint will initiate the connection towards 270 the remote endpoint) and should be set to a value of 9, which is the 271 discard port. Connection attribute and port MUST follow the rules of 272 [RFC4145] 274 Some web browsers do not allow non-secure Websocket connections to be 275 made. So, while the recommendation to use Secure WebSockets (i.e. 276 TCP/WSS) is for security reasons, it is also to achieve maximum 277 compatiblity among clients. 279 When using Secure Websockets the CNAME of the SSL certificate must 280 match the WebSocket connection URI host, and while it is possible to 281 generate self signed certificates with IPs as CNAME, it will not be 282 viable in most cases for certificates signed by well known 283 authorities. So, a new attribute 'ws-uri' is defined in this 284 specification to indicate the connection uri for the WebSocket 285 Client. The Augmented BNF syntax as described in [RFC4234] is: 287 ws-uri = "a=ws-uri:" ws-URI 289 Where ws-URI is defined in [RFC6455] 291 When the 'ws-uri' attribute is present in the BCFP media section of 292 the SDP, the IP and port provided in the 'c' lines SHALL be ignored 293 and the full uri SHALL be used instead to open the WebSocket 294 connection 296 The following are examples of 'm' lines for BFCP connections: 298 Offer (browser): 299 m=application 9 TCP/WSS/BFCP * 300 a=setup:active 301 a=connection:new 302 a=floorctrl:c-only 303 m=audio 55000 RTP/AVP 0 304 m=video 55002 RTP/AVP 31 306 Answer (server): 307 m=application 50000 TCP/WSS/BFCP * 308 a=setup:passive 309 a=connection:new 310 a=ws-uri:wss://bfcp-ws.example.com?token=3170449312 311 a=floorctrl:s-only 312 a=confid:4321 313 a=userid:1234 314 a=floorid:1 m-stream:10 315 a=floorid:2 m-stream:11 316 m=audio 50002 RTP/AVP 0 317 a=label:10 318 m=video 50004 RTP/AVP 31 319 a=label:11 321 7. Authentication 323 Section 9 of [I-D.ietf-bfcpbis-rfc4582bis] states that BFCP clients 324 and floor control servers SHOULD authenticate each other prior to 325 accepting messages, and RECOMMENDS that mutual TLS/DTLS 326 authentication be used. However, browser-based WebSocket clients 327 have no control over the use of TLS in the WebSocket API [WS-API], so 328 it is RECOMMENDED that standard Web-based methods for client and 329 server authentication are used, as follows. 331 When a BFCP WebSocket client connects to a BFCP WebSocket server, it 332 SHOULD use TCP/WSS as its transport. The WebSocket client SHOULD 333 inspect the TLS certificate offered by the server and verify that it 334 is valid. 336 Since the WebSocket API does not distinguish between certificate 337 errors and other kinds of failure to establish a connection, it is 338 expected that browser vendors will warn end users directly of any 339 kind of problem with the server certificate. 341 A floor control server that receives a message over TCP/WS can 342 request the use of TCP/WSS by generating an Error message, as 343 described in Section 13.8 of [I-D.ietf-bfcpbis-rfc4582bis], with an 344 Error code with a value of 9 (use TLS). 346 Prior to sending BFCP requests, a BFCP WebSocket client connects to a 347 BFCP WebSocket server and performs the connection handshake. As 348 described in Section 3 the handshake procedure involves a HTTP GET 349 method request from the client and a response from the server 350 including an HTTP 101 status code. 352 In order to authorize the WebSocket connection, the BFCP WebSocket 353 server MAY inspect any cookie [RFC6265] headers present in the HTTP 354 GET request. For many web applications the value of such a cookie is 355 provided by the web server once the user has authenticated themselves 356 to the web server, which could be done by many existing mechanisms. 357 As an alternative method, the BFCP WebSocket Server could request 358 HTTP authentication by replying to the Client's GET method request 359 with a HTTP 401 status code. The WebSocket protocol [RFC6455] covers 360 this usage in section 4.1: 362 If the status code received from the server is not 101, the 363 WebSocket client stack handles the response per HTTP [RFC2616] 364 procedures, in particular the client might perform authentication 365 if it receives 401 status code. 367 8. Security Considerations 369 Considerations from [I-D.ietf-bfcpbis-rfc4582bis], 370 [I-D.ietf-bfcpbis-rfc4583bis] and RFC5018 [RFC5018] apply. 372 BFCP relies on lower-layer security mechanisms to provide replay and 373 integrity protection and confidentiality. It is RECOMMENDED that the 374 BFCP traffic transported over a WebSocket communication be protected 375 by using a secure WebSocket connection (using TLS [RFC5246] over 376 TCP). 378 9. IANA Considerations 380 9.1. Registration of the WebSocket BFCP Sub-Protocol 382 This specification requests IANA to register the WebSocket BFCP sub- 383 protocol under the "WebSocket Subprotocol Name" Registry with the 384 following data: 386 Subprotocol Identifier: bfcp 388 Subprotocol Common Name: WebSocket Transport for BFCP (Binary Floor 389 Control Protocol) 391 Subprotocol Definition: TBD: this document 393 9.2. Registration of the 'TCP/WS/BFCP' and 'TCP/WSS/BFCP' SDP 'proto' 394 Values 396 This document defines two new values for the SDP 'proto' field under 397 the Session Description Protocol (SDP) Parameters registry. The 398 resulting entries are shown in Figure 1 below: 400 Value Reference 401 -------------- --------- 402 TCP/WS/BFCP [TBD: this document] 403 TCP/WSS/BFCP [TBD: this document] 405 Figure 1: Values for the SDP 'proto' field 407 9.3. Registration of the 'ws-uri' SDP media attribute 409 This section instructs the IANA to register the following SDP att- 410 field under the Session Description Protocol (SDP) Parameters 411 registry: 413 Contact name TBD 415 Attribute name ws-uri 417 Long-form attribute name Websocket Connection URI 419 Type of attribute Media level 421 Subject to charset No 423 Purpose of attribute The 'ws-uri' attribute is intended to be used 424 as connection URI for opening the WebSocket. 426 Allowed attribute values A ws-URI as defined in [RFC6455] 428 9.4. Acknowledgements 430 The authors want to thank Robert Welboun, from Acme Packet, who made 431 significant contributions to the first version of this document. 433 10. References 435 10.1. Normative References 437 [I-D.ietf-bfcpbis-rfc4582bis] 438 Camarillo, G., Drage, K., Kristensen, T., Ott, J., and C. 439 Eckel, "The Binary Floor Control Protocol (BFCP)", draft- 440 ietf-bfcpbis-rfc4582bis-10 (work in progress), November 441 2013. 443 [I-D.ietf-bfcpbis-rfc4583bis] 444 Camarillo, G. and T. Kristensen, "Session Description 445 Protocol (SDP) Format for Binary Floor Control Protocol 446 (BFCP) Streams", draft-ietf-bfcpbis-rfc4583bis-08 (work in 447 progress), November 2013. 449 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 450 Requirement Levels", BCP 14, RFC 2119, March 1997. 452 [RFC4145] Yon, D. and G. Camarillo, "TCP-Based Media Transport in 453 the Session Description Protocol (SDP)", RFC 4145, 454 September 2005. 456 [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 457 Specifications: ABNF", RFC 4234, October 2005. 459 [RFC5018] Camarillo, G., "Connection Establishment in the Binary 460 Floor Control Protocol (BFCP)", RFC 5018, September 2007. 462 [RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol", RFC 463 6455, December 2011. 465 10.2. Informative References 467 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 468 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 469 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 471 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 472 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 474 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 475 April 2011. 477 [WS-API] W3C and I. Hickson, Ed., "The WebSocket API", May 2012. 479 Authors' Addresses 481 Victor Pascual 482 Quobis 484 Email: victor.pascual@quobis.com 486 Anton Roman 487 Quobis 489 Email: anton.roman@quobis.com 491 Stephane Cazeaux 492 France Telecom Orange 494 Email: stephane.cazeaux@orange.com 496 Gonzalo Salgueiro 497 Cisco Systems, Inc. 498 7200-12 Kit Creek Road 499 Research Triangle Park, NC 27709 500 US 502 Email: gsalguei@cisco.com 504 Sergio Garcia Murillo 505 Medooze 507 Email: sergio.garcia.murillo@gmail.com