]>
The WebSocket
Protocol as a Transport for the Binary Floor Control Protocol
(BFCP)Oraclevictor.pascual.avila@oracle.comQuobisanton.roman@quobis.comFrance Telecom Orangestephane.cazeaux@orange.comCisco Systems, Inc.7200-12 Kit Creek RoadResearch Triangle ParkNC27709USgsalguei@cisco.comCisco Systems, Inc.Cessna Business Park,Kadabeesanahalli Village, Varthur Hobli,Sarjapur-Marathahalli Outer Ring RoadBangaloreKarnataka560103Indiarmohanr@cisco.comIETF
BFCPBIS Working GroupBFCPWebSocket The WebSocket protocol enables two-way realtime communication
between clients and servers. This document specifies the use of Binary Floor
Control Protocol(BFCP) as a new WebSocket sub-protocol enabling a reliable
transport mechanism between BFCP entities in new scenarios. The WebSocket(WS) protocol enables
two-way message exchange between clients and servers on top of a
persistent TCP connection, optionally secured with Transport Layer Security (TLS)
. The initial protocol handshake makes use of
Hypertext Transfer Protocol (HTTP) semantics, allowing the WebSocket
protocol to reuse existing HTTP infrastructure.The Binary Floor Control Protocol (BFCP) is a protocol to
coordinate access to shared resources in a conference. It is
defined in and is
used between floor participants and floor control servers, and
between floor chairs (i.e., moderators) and floor control
servers.Modern web browsers include a WebSocket client stack
complying with the WebSocket API as
specified by the W3C. It is expected that other client
applications (those running in personal computers and devices
such as smartphones) will also make a WebSocket client stack
available. This document extends the applicability of
and
to enable the
usage of BFCP in these scenarios.The transport over which BFCP entities exchange messages
depends on how the clients obtain information to contact the
floor control server (e.g. using an Session Description Protocol (SDP)
offer/answer exchange per or the
procedure described in RFC5018 ).
defines two transports
for BFCP: TCP and UDP. This specification defines a new
WebSocket sub-protocol (as defined in Section 1.9 in ) for transporting BFCP messages between a
WebSocket client and server. This sub-protocol provides a reliable and boundary
preserving transport for BFCP when run on top of TCP. Since WebSocket provides
a reliable transport, the extensions defined in for sending BFCP over unreliable
transports are not applicable. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described
in .Any BFCP entity capable
of opening outbound connections to WebSocket servers and
communicating using the WebSocket BFCP sub-protocol as
defined by this document.Any BFCP entity capable
of listening for inbound connections from WebSocket
clients and communicating using the WebSocket BFCP
sub-protocol as defined by this document.The WebSocket protocol is a
transport layer on top of TCP (optionally secured with TLS ) in which both client and server exchange
message units in both directions. The protocol defines a
connection handshake, WebSocket sub-protocol and extensions
negotiation, a frame format for sending application and control
data, a masking mechanism, and status codes for indicating
disconnection causes.The WebSocket connection handshake is based on HTTP and utilizes the HTTP GET method with an
"Upgrade" request. This is sent by the client and then answered
by the server (if the negotiation succeeded) with an HTTP 101
status code. Once the handshake is completed the connection
upgrades from HTTP to the WebSocket protocol. This handshake
procedure is designed to reuse the existing HTTP infrastructure.
During the connection handshake, client and server agree on the
application protocol to use on top of the WebSocket transport.
Such an application protocol (also known as a "WebSocket
sub-protocol") defines the format and semantics of the messages
exchanged by the endpoints. This could be a custom protocol or a
standardized one (as the WebSocket BFCP sub-protocol defined in
this document). Once the HTTP 101 response is processed both
client and server reuse the underlying TCP connection for
sending WebSocket messages and control frames to each other.
Unlike plain HTTP, this connection is persistent and can be used
for multiple message exchanges.The WebSocket protocol defines message units to be used by
applications for the exchange of data, so it provides a message
boundary-preserving transport layer.The term WebSocket sub-protocol refers to an
application-level protocol layered on top of a WebSocket
connection. This document specifies the WebSocket BFCP
sub-protocol for carrying BFCP messages over a WebSocket
connection.The BFCP WebSocket Client and BFCP WebSocket Server
negotiate usage of the WebSocket BFCP sub-protocol during the
WebSocket handshake procedure as defined in Section 1.3 of
. The Client MUST include the value
"BFCP" in the Sec-WebSocket-Protocol header in its handshake
request. The 101 reply from the Server MUST contain "BFCP" in
its corresponding Sec-WebSocket-Protocol header.Below is an example of a WebSocket handshake in which the
Client requests the WebSocket BFCP sub-protocol support from
the Server:The handshake response from the Server accepting the
WebSocket BFCP sub-protocol would look as follows:Once the negotiation has been completed, the WebSocket
connection is established and can be used for the transport of
BFCP messages. BFCP messages use a TLV (Type-Length-Value) binary
encoding, therefore BFCP WebSocket Clients and BFCP WebSocket
Servers MUST be transported in unfragmented binary WebSocket
frames (FIN:1,opcode:%x2) to exchange BFCP messages. The
WebSocket frame data MUST be a valid BCFP message, so the
length of the payload of the WebSocket frame MUST be lower
than the maximum size allowed (2^16 +12 bytes) for a BCFP
message as described in . In addition, the
encoding rules for reliable protocols defined in MUST be followed.While this specification assumes that BFCP encoding is only TLV binary,
future documents may define other mechanisms like JSON serialization.
if encoding changes a new subprotocol identifier would need to be selected.Each BFCP message MUST be carried within a single WebSocket
message, and a WebSocket message MUST NOT contain more than one
BFCP message.WebSocket provides a reliable transport and
therefore the BFCP WebSocket sub-protocol defined by this
document also provides reliable BFCP transport. Thus, client and server
transactions using WebSocket for transport MUST follow the
procedures for reliable transports as defined in and .BFCP WebSocket clients cannot receive incoming WebSocket
connections initiated by any other peer. This means that a BFCP
WebSocket client MUST actively initiate a connection towards a
BFCP WebSocket server. The BFCP server is a will have a globally routable address
and thus does not require ICE as clients always initiate connections to it. Rules to generate an 'm' line for a BFCP stream are described
in , Section 3New values are defined for the transport field: TCP/WS/BFCP
and TCP/WSS/BFCP. TCP/WS/BFCP is used when BFCP runs on top of WS, which in
turn runs on top of TCP.TCP/WSS/BFCP is used when BFCP runs on top of WSS, which
in turn runs on top of TLS and TCP.The port field is set following the rules in Section 3 and Section 8.1 of . Depending on the value
of the SDP 'setup' attribute defined in ,
the port field contains the port to which the remote endpoint will
direct BFCP messages or is irrelevant (i.e., the endpoint will initiate the connection
towards the remote endpoint) and should be set to a value of 9,
which is the discard port. Connection attribute and port MUST
follow the rules of While this document recommends the use of secure WebSockets (i.e.TCP/WSS)
for security reasons, TCP/WS is also permitted so as to achieve maximum
compatibility among clients. defines a new SDP attribute
to indicate the connection Uniform Resource Identifier (URI) for the WebSocket Client.
The SDP attribute 'websocket-uri' defined in Section 3 of
MUST be used when BFCP runs on top of WS or WSS.
When the 'websocket-uri' attribute is present in the media section of the SDP,
the procedures mentioned in Section 4 of
MUST be followed. An endpoint (i.e., both the offerer and the answerer) MUST create an SDP media description ("m=" line)
for each BFCP-over-WebSocket media stream and MUST assign either TCP/WSS/BFCP or TCP/WS/BFCP value to the
"proto" field of the "m=" line depending on whether the endpoint wishes to use secure WebSocket or WebSocket.
Furthermore, the server side, which could be either the offerer or answerer, MUST add an "a=websocket-uri"
attribute in the media section depending on whether it wishes to use WebSocket or secure WebSocket. This new
attribute MUST follow the syntax defined in . Additionally,
the SDP Offer/Answer procedures defined in Section 4 of MUST
be followed for the "m=" line associated with a BFCP-over-WebSocket media stream.The following is an example of an "m=" line for a BFCP connection. In this example, the offerer sends the SDP with the "proto" field having a value of TCP/WSS/BFCP * indicating that the offerer wishes to use secure WebSocket as a transport for the media stream.
It is possible that an endpoint (e.g., a browser) sends an offerless INVITE to the server.
In such cases the server will act as SDP offerer. The server MUST assign the SDP "setup"
attribute with a value of "passive". The server MUST have an "a=websocket-uri" attribute
with a "ws-URI" or "wss-URI" value depending on whether the server wishes to use WebSocket or secure WebSocket.
This attribute MUST follow the syntax defined in Section 3 of .
For BFCP application, the "proto" value in the "m=" line MUST be TCP/WSS/BFCP if WebSocket is over TLS,
else it MUST be TCP/WS/BFCP.
Section 9 of
states that BFCP clients and floor control servers SHOULD
authenticate each other prior to accepting messages, and
RECOMMENDS that mutual TLS/DTLS authentication be used. However,
browser-based WebSocket clients have no control over the use of
TLS in the WebSocket API , so it is
RECOMMENDED that standard Web-based methods for client and
server authentication are used, as follows.When a BFCP WebSocket client connects to a BFCP WebSocket
server, it SHOULD use TCP/WSS as its transport. If the signaling
or control protocol traffic used to set up the conference is authenticated
and confidentiality and integrity protected, Secure WebSocket (WSS) MUST be used,
and the floor control server MUST authenticate the client. The WebSocket client
MUST follow the procedures in while setting up TLS
connection with the WebSocket server.
The BFCP client validates the server by means of verifying the server certificate.
This means the "websocket-uri" value MUST contain a hostname.
The verification process does not use a=fingerprint.A floor control server that receives a message over TCP/WS
can mandate the use of TCP/WSS by generating an Error message,
as described in Section 13.8 of , with an Error code with
a value of 9 (use TLS).Prior to sending BFCP requests, a BFCP WebSocket client
connects to a BFCP WebSocket server and performs the connection
handshake. As described in the handshake procedure
involves a HTTP GET method request from the client and a
response from the server including an HTTP 101 status code.In order to authorize the WebSocket connection, the BFCP
WebSocket server SHOULD inspect any cookie
headers present in the HTTP GET request. For many web
applications the value of such a cookie is provided by the web
server once the user has authenticated themselves to the web
server, which could be done by many existing mechanisms. As an
alternative method, the BFCP WebSocket Server could request HTTP
authentication by replying to the Client's GET method request
with a HTTP 401 status code. The WebSocket protocol covers this usage in Section 4.1:
If the status code received from the server is not 101,
the WebSocket client stack handles the response per HTTP
procedures, in particular the
client might perform authentication if it receives 401
status code.If the status code received from the server is not 101,
the WebSocket client stack handles the response per HTTP
procedures, in particular the
client might perform authentication if it receives 401
status code. The WebSocket clients are vulnerable to the attacks
of basic authentication (mentioned in Section 4 of ) and
digest authentication (mentioned in Section 5 of ]). To overcome
some of these weakness, the WebSocket clients for example can use
HTTP Origin-Bound Authentication (HOBA) mechanism mentioned in .Considerations from , and RFC5018 apply.BFCP relies on lower-layer security mechanisms to provide
replay and integrity protection and confidentiality. It is
RECOMMENDED that the BFCP traffic transported over a WebSocket
communication be protected by using a secure WebSocket
connection (using TLS over TCP). The security
considerations in apply for BFCP over WebSocket as well.
The security model here is a typical webserver-client model
where the client validates the server certificate and then connects to the server.
describes the authentication procedures between client
and server.When using BFCP over websockets, the security mechanisms defined in
are not used. Instead, the
application is required to build and rely on the security mechanisms in .The rest of this section analyses the threats described in Section 14 of
when WebSocket is used as transport
protocol for BFCP.An attacker attempting to impersonate a floor control server is avoided by having
servers accept BFCP messages over WSS only. As with any other web connection, the clients
will verify the servers certificate. The floor control WebSocket client MUST follow the
procedures in (including hostname verification as per
Section 6.1 in ) while setting up TLS connection with floor
control webSocket server.An attacker attempting to impersonate a floor control client is avoided by
having servers accept BFCP messages over WSS only. As described in
Section 10.5 of the floor control server can use
any client authentication mechanism and follow the steps in
of this document.Attackers may attempt to modify messages exchanged by a client and a
floor control server. This can be prevented by having WSS between client and server.An attacker trying to replay the messages is prevented by
having floor control servers check that messages arriving over a
given WSS connection use an authorized user ID. Attackers may may eavesdrop on the network to get access
to confidential information between the floor control server and a
client (e.g., why a floor request was denied). In order to ensure that
BFCP users are getting the level of protection that they would get using
the BFCP protocol directly, applications need to have a way to
control the websocket libraries to use encryption algorithms specified in
Section 7 of . Since the
WebSocket API does not have a way to allow an
application to select the encryption algorithm to be used, the protection level
provided when WSS is used is limited to the underlying TLS algorithm used by
WebSocket library.This specification requests IANA to register the WebSocket
BFCP sub-protocol under the "WebSocket Subprotocol Name"
Registry with the following data:BFCPWebSocket Transport
for BFCP (Binary Floor Control Protocol)RFC&rfc.number;[[NOTE TO RFC EDITOR: Please change &rfc.number; to the number assigned to this specification, and remove this paragraph on publication.]]This document defines two new values for the SDP 'proto'
field under the Session Description Protocol (SDP) Parameters
registry. The resulting entries are shown in below:[[NOTE TO RFC EDITOR: Please change &rfc.number; to the number assigned to this specification, and remove this paragraph on publication.]]The authors want to thank Robert Welbourn, from Acme Packet and Sergio Garcia Murillo
who made significant contributions to the first version of
this document. This work benefited from the thorough review
and constructive comments of Charles Eckel, Christer Holmberg, Paul Kyzivat, Dan Wing and Alissa Cooper.
Thanks to Bert Wijnen, Robert Sparks and Mirja Kuehlewind for their reviews and comments on this document.
Thanks for Spencers Dawkin, Ben Campbell, Kathleen Moriarty, Alexey Melnikov, Jari Arkko and Stephen Farrell for
their feedback and comments during IESG reviews.
&RFC2119;
&RFC4145;
&RFC6455;
&RFC5018;
&BFCPbis;
&RFC7525;
&SDPBFCPbis;
&RFC7230;
&RFC5246;
&RFC6265;
&RFC7616;
&RFC7617;
&RFC7486;
The WebSocket APIW3CGoogle, Inc.