<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced.
     An alternate method (rfc include) is described in the references. -->
<!-- Normative References -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!-- MUST, SHOULD, MAY -->
<!ENTITY RFC7235 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7235.xml">
<!-- HTTP Over TLS -->
<!ENTITY RFC3261 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3261.xml">
<!-- SIP -->
<!ENTITY RFC3263 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3263.xml">
<!-- Locating SIP Servers -->
<!ENTITY RFC3403 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3403.xml">
<!-- NAPTR -->
<!ENTITY RFC5234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
<!-- ABNF -->
<!ENTITY RFC6455 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6455.xml">
<!-- WebSocket -->
<!ENTITY RFC5018 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5018.xml">
<!-- TCP -->
<!ENTITY RFC4582 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4582.xml">
<!-- BFCP -->
<!ENTITY RFC4583 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4583.xml">
<!-- BFCP SDP -->
<!ENTITY BFCPbis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-bfcpbis-rfc4582bis.xml">
<!-- rfc4582bis -->
<!ENTITY SDPBFCPbis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-bfcpbis-rfc4583bis.xml">
<!-- rfc4583bis -->

<!-- Informative References -->
<!ENTITY RFC2606 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2606.xml">
<!-- Reserved Top Level DNS Names -->
<!ENTITY RFC7230 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7230.xml">
<!-- HTTP -->
<!ENTITY RFC3327 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3327.xml">
<!-- Path -->
<!ENTITY RFC3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
<!-- URI -->
<!ENTITY RFC4168 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4168.xml">
<!-- SIP STCP -->
<!ENTITY RFC5246 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!-- TLS -->
<!ENTITY RFC5626 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5626.xml">
<!-- Outbound -->
<!ENTITY RFC5627 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5627.xml">
<!-- GRUU -->
<!ENTITY RFC6223 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6223.xml">
<!-- SUpport for Keep-Alive -->
<!ENTITY RFC6265 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6265.xml">
<!-- HTTP State Management Mechanism -->
<!ENTITY RFC4145 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4145.xml">
<!-- TCP-Based Media Transport in SDP -->

]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<?rfc tocappendix="yes" ?>
<rfc category="std" docName="draft-ietf-bfcpbis-bfcp-websocket-10"
     ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the
         full title is longer than 39 characters -->

    <title abbrev="WebSocket as a Transport for BFCP">The WebSocket
    Protocol as a Transport for the Binary Floor Control Protocol
    (BFCP)</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Victor Pascual" initials="V.P."
            surname="Pascual">
      <organization>Oracle</organization>

      <address>
        <email>victor.pascual.avila@oracle.com</email>
      </address>
    </author>

    <author fullname="Ant&oacute;n Rom&aacute;n" initials="A.R."
            surname="Rom&aacute;n">
      <organization>Quobis</organization>

      <address>
        <email>anton.roman@quobis.com</email>
      </address>
    </author>

    <author fullname="St&eacute;phane Cazeaux" initials="S.C."
            surname="Cazeaux">
      <organization>France Telecom Orange</organization>

      <address>
        <email>stephane.cazeaux@orange.com</email>
      </address>
    </author>

    <author fullname="Gonzalo Salgueiro" initials="G.S."
            surname="Salgueiro">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>7200-12 Kit Creek Road</street>

          <city>Research Triangle Park</city>

          <region>NC</region>

          <code>27709</code>

          <country>US</country>
        </postal>

        <email>gsalguei@cisco.com</email>
      </address>
    </author>
    
     <author initials="R" surname="Ravindranath" fullname="Ram Mohan Ravindranath">
			<organization abbrev="Cisco">Cisco Systems, Inc.</organization>
			<address>
				<postal>
					<street>Cessna Business Park,</street>
					<street>Kadabeesanahalli Village, Varthur Hobli,</street>
					<street>Sarjapur-Marathahalli Outer Ring Road</street>
					<city>Bangalore</city>
					<region>Karnataka</region>
					<code>560103</code>
					<country>India</country>
				</postal>
				<email>rmohanr@cisco.com</email>
			</address>
	</author>
		    
	<author fullname="Sergio Garcia Murillo" initials="S.G.M."
            surname="Garcia Murillo">
      <organization>Medooze</organization>

      <address>
        <email>sergio.garcia.murillo@gmail.com</email>
      </address>
    </author>
    
    <date year="2016"/>

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
         in the current day for you. If only the current year is specified, xml2rfc will fill
         in the current day and month for you. If the year is not the current one, it is
         necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
         purpose of calculating the expiry date).  With drafts it is normally sufficient to
         specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>IETF</area>

    <workgroup>BFCPBIS Working Group</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.
         If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>BFCP</keyword>

    <keyword>WebSocket</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>The WebSocket protocol enables two-way realtime communication
      between clients and servers. This document specifies a new
      WebSocket sub-protocol as a reliable transport mechanism between
      Binary Floor Control Protocol (BFCP) entities to enable usage of
      BFCP in new scenarios. </t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>The WebSocket <xref target="RFC6455"/> protocol enables
      two-way message exchange between clients and servers on top of a
      persistent TCP connection, optionally secured with Transport Layer Security (TLS) <xref
      target="RFC5246"/>. The initial protocol handshake makes use of
      Hypertext Transfer Protocol (HTTP) <xref target="RFC7230"/> semantics, allowing the WebSocket
      protocol to reuse existing HTTP infrastructure.</t>

      <t>The Binary Floor Control Protocol (BFCP) is a protocol to
      coordinate access to shared resources in a conference. It is
      defined in <xref target="I-D.ietf-bfcpbis-rfc4582bis"/> and is
      used between floor participants and floor control servers, and
      between floor chairs (i.e., moderators) and floor control
      servers.</t>

      <t>Modern web browsers include a WebSocket client stack
      complying with the WebSocket API <xref target="WS-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 <xref
      target="I-D.ietf-bfcpbis-rfc4582bis"/> and <xref
      target="I-D.ietf-bfcpbis-rfc4583bis"/> to enable the
      usage of BFCP in these scenarios.</t>

      <t>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 <xref target="I-D.ietf-bfcpbis-rfc4583bis"/> or the
      procedure described in RFC5018 <xref target="RFC5018"/>). <xref
      target="I-D.ietf-bfcpbis-rfc4582bis"/> defines two transports
      for BFCP: TCP and UDP. This specification defines a new
      WebSocket sub-protocol (as defined in Section 1.9 in <xref
      target="RFC6455"/>) 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 <xref
          target="I-D.ietf-bfcpbis-rfc4582bis"/> for sending BFCP over unreliable 
          transports are not applicable. </t>

    </section>

    <section anchor="terminology" title="Terminology">
      <t>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 <xref target="RFC2119"/>.</t>

      <section anchor="definitions" title="Definitions">
        <t><list hangIndent="6" style="hanging">
            <t hangText="BFCP WebSocket Client:">Any BFCP entity capable
            of opening outbound connections to WebSocket servers and
            communicating using the WebSocket BFCP sub-protocol as
            defined by this document.</t>

            <t hangText="BFCP WebSocket Server:">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.</t>
          </list></t>
      </section>
    </section>

    <section anchor="the_websocket_protocol"
             title="The WebSocket Protocol">
      <t>The WebSocket protocol <xref target="RFC6455"/> is a
      transport layer on top of TCP (optionally secured with TLS <xref
      target="RFC5246"/>) 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.</t>

      <t>The WebSocket connection handshake is based on HTTP <xref
      target="RFC7230"/> 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.</t>

      <t>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. These message units can
      contain either UTF-8 text or binary data, and can be split into
      multiple WebSocket text/binary transport frames as needed by the
      WebSocket stack. <list style="empty">
          <t>The <xref target="WS-API">WebSocket API</xref> for web
          browsers only defines callbacks to be invoked upon receipt
          of an entire message unit, regardless of whether it was
          received in a single WebSocket frame or split across
          multiple frames.</t>
        </list></t>
    </section>

    <section anchor="the_websocket_bfcp_subprotocol"
             title="The WebSocket BFCP Sub-Protocol">
      <t>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.</t>

      <section anchor="handshake" title="Handshake">
        <t>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
        <xref target="RFC6455"/>. 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.</t>

        <t>Below is an example of a WebSocket handshake in which the
        Client requests the WebSocket BFCP sub-protocol support from
        the Server:<figure>
            <artwork><![CDATA[
  GET / HTTP/1.1
  Host: bfcp-ws.example.com
  Upgrade: websocket
  Connection: Upgrade
  Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
  Origin: http://www.example.com
  Sec-WebSocket-Protocol: BFCP
  Sec-WebSocket-Version: 13
]]></artwork>
          </figure></t>

        <t>The handshake response from the Server accepting the
        WebSocket BFCP sub-protocol would look as follows:<figure>
            <artwork><![CDATA[
  HTTP/1.1 101 Switching Protocols
  Upgrade: websocket
  Connection: Upgrade
  Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
  Sec-WebSocket-Protocol: BFCP
]]></artwork>
          </figure></t>

        <t>Once the negotiation has been completed, the WebSocket
        connection is established and can be used for the transport of
        BFCP messages. The WebSocket messages transmitted over this
        connection MUST conform to the negotiated WebSocket
        sub-protocol.</t>
      </section>

      <section anchor="bfcp_encoding" title="BFCP Encoding">
        <t>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 <xref
        target="I-D.ietf-bfcpbis-rfc4582bis"/>. In addition, the
        encoding rules for reliable protocols defined in <xref
        target="I-D.ietf-bfcpbis-rfc4582bis"/> MUST be followed.</t>
        <t>While this specification assumes that BFCP encoding is only TLV binary, future documents may define other mechanisms like JSON serialization.</t>

      </section>
    </section>

    <section anchor="bfcp_websocket_transport"
             title="Transport Reliability">
      <t>WebSocket <xref target="RFC6455"/> 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 <xref
      target="I-D.ietf-bfcpbis-rfc4582bis"/> and <xref
      target="I-D.ietf-bfcpbis-rfc4583bis"/>.</t>

      <t>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.</t>

      <t>Each BFCP message MUST be carried within a single WebSocket
      message, and a WebSocket message MUST NOT contain more than one
      BFCP message.</t>
    </section>


<section anchor="sdp_con"
    title="SDP Considerations">
    
    <section anchor="updates_to_rfc_4583bis"
        title="Transport Negotiation">
      <t>Rules to generate an 'm' line for a BFCP stream are described
      in <xref target="I-D.ietf-bfcpbis-rfc4583bis"/>, Section 3</t>

      <t>New values are defined for the transport field: TCP/WS/BFCP
      and TCP/WSS/BFCP. <list style="empty">
          <t>TCP/WS/BFCP is used when BFCP runs on top of WS, which in
          turn runs on top of TCP.</t>

          <t>TCP/WSS/BFCP is used when BFCP runs on top of WSS, which
          in turn runs on top of TLS and TCP.</t>
        </list></t>
      
      <t>When TCP is used as the transport, the port field is set
      following the rules in Section 3 and Section 8.1 of <xref
      target="I-D.ietf-bfcpbis-rfc4583bis"/>. Depending on the value
      of the SDP 'setup' attribute defined in <xref target="RFC4145"/>, 
      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 <xref target="RFC4145"/></t>

      <t>Some web browsers do not allow non-secure WebSocket
      connections to be made. So, while the recommendation to use
      Secure WebSockets (i.e. TCP/WSS) is for security reasons, it is
      also to achieve maximum compatibility among clients.</t>
     </section> 

      <section anchor="attribute"
          title="SDP Media Attributes">
      <t><xref target="I-D.ietf-bfcpbis-sdp-ws-uri"/> defines  a new SDP attribute 
      to indicate the connection Uniform Resource Identifier (URI) for the WebSocket Client. 
      The SDP attribute 'ws-uri' defined in Section 3.1 of <xref target="I-D.ietf-bfcpbis-sdp-ws-uri"/> 
      MUST be used when BFCP runs on top of WS, which in  turn runs on top of TCP. The 
      SDP attribute 'wss-uri' defined in Section 3.2 of  <xref target="I-D.ietf-bfcpbis-sdp-ws-uri"/> 
      MUST be used when BFCP runs on top of  WSS, which in turn runs on top of TLS and TCP. 
      When the 'ws-uri' or 'wss-uri' attribute  is present in the media section of the SDP, 
      the IP and port information provided in the 'c' lines SHALL be ignored and the full URI 
      SHALL be used instead to open the WebSocket connection. The port provided in the 'm' 
      line SHALL be ignored too, 
      as the a=ws-uri or a=wss-uri SHALL provide port number when needed.</t>

    </section>
      
</section>

<section title="SDP Offer/Answer Procedures">
  <section anchor="general" title="General">
     <t> 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=ws-uri" or "a=wss-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 <xref target="I-D.ietf-bfcpbis-sdp-ws-uri"/>. Additionally, 
      the SDP Offer/Answer procedures  defined in Section 4 of  <xref target="I-D.ietf-bfcpbis-sdp-ws-uri"/> MUST 
      be followed for the "m=" line associated with a BFCP-over-WebSocket media stream.</t>    
   </section>
    <section anchor="example"  title="Example Usage of 'wss-uri' SDP Attribute">
        <t>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.</t>
        <t>
      <figure>
          <artwork><![CDATA[
Offer (browser):
m=application 9 TCP/WSS/BFCP *
a=setup:active
a=connection:new
a=floorctrl:c-only
m=audio 55000 RTP/AVP 0
m=video 55002 RTP/AVP 31

Answer (server):
m=application 50000 TCP/WSS/BFCP *
a=setup:passive
a=connection:new
a=wss-uri:wss://bfcp-ws.example.com?token=3170449312
a=floorctrl:s-only
a=confid:4321
a=userid:1234
a=floorid:1 m-stream:10
a=floorid:2 m-stream:11
m=audio 50002 RTP/AVP 0
a=label:10
m=video 50004 RTP/AVP 31
a=label:11
]]></artwork>
        </figure></t>
        <t>
          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=ws-uri" or "a=wss-uri" attribute 
          in the media section depending on whether the server wishes to use WebSocket or secure WebSocket. 
          This attribute MUST follow the syntax defined in Section 3. 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.
        </t>
    </section>
  </section>

    <section anchor="authentication" title="Authentication">
      <t>Section 9 of <xref target="I-D.ietf-bfcpbis-rfc4582bis"/>
      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 <xref target="WS-API"/>, so it is
      RECOMMENDED that standard Web-based methods for client and
      server authentication are used, as follows.</t>

      <t>When a BFCP WebSocket client connects to a BFCP WebSocket
      server, it SHOULD use TCP/WSS as its transport. The WebSocket
      client SHOULD inspect the TLS certificate offered by the server
      and verify that it is valid. <list style="empty">
          <t>Since the WebSocket API does not distinguish between
          certificate errors and other kinds of failure to establish a
          connection, it is expected that browser vendors will warn
          end users directly of any kind of problem with the server
          certificate.</t>
        </list></t>

      <t>A floor control server that receives a message over TCP/WS
      can request the use of TCP/WSS by generating an Error message,
      as described in Section 13.8 of <xref
      target="I-D.ietf-bfcpbis-rfc4582bis"/>, with an Error code with
      a value of 9 (use TLS).</t>

      <t>Prior to sending BFCP requests, a BFCP WebSocket client
      connects to a BFCP WebSocket server and performs the connection
      handshake. As described in <xref
      target="the_websocket_protocol"/> the handshake procedure
      involves a HTTP GET method request from the client and a
      response from the server including an HTTP 101 status code.</t>

      <t>In order to authorize the WebSocket connection, the BFCP
      WebSocket server MAY inspect any cookie <xref target="RFC6265"/>
      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 <xref
      target="RFC6455"/> covers this usage in Section 4.1: <list
          style="empty">
          <t>If the status code received from the server is not 101,
          the WebSocket client stack handles the response per HTTP
          <xref target="RFC7230"/> procedures, in particular the
          client might perform authentication if it receives 401
          status code.</t>
        </list></t>
    </section>

    <section anchor="security_considerations"
             title="Security Considerations">
      <t>Considerations from <xref
      target="I-D.ietf-bfcpbis-rfc4582bis"/>, <xref
      target="I-D.ietf-bfcpbis-rfc4583bis"/> and RFC5018 <xref
      target="RFC5018"/> apply.</t>

      <t>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 <xref target="RFC5246"/> over TCP).</t>
    </section>

    <section anchor="iana_considerations" title="IANA Considerations">
      <section title="Registration of the WebSocket BFCP Sub-Protocol">
        <t>This specification requests IANA to register the WebSocket
        BFCP sub-protocol under the "WebSocket Subprotocol Name"
        Registry with the following data:</t>

        <t><list style="hanging">
            <t hangText="Subprotocol Identifier:">bfcp</t>

            <t hangText="Subprotocol Common Name:">WebSocket Transport
            for BFCP (Binary Floor Control Protocol)</t>

            <t hangText="Subprotocol Definition:">RFC&rfc.number;</t>
          </list></t>
            <t>[[NOTE TO RFC EDITOR: Please change &rfc.number; to the number assigned to this specification, and remove this paragraph on publication.]]</t>

      </section>

      <section title="Registration of the 'TCP/WS/BFCP' and 'TCP/WSS/BFCP' SDP 'proto' Values">
        <t>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 <xref
        target="IANA_SDP_proto"/> below:<figure
            anchor="IANA_SDP_proto" align="center"
            title="Values for the SDP 'proto' Field">
            <artwork><![CDATA[
                 Value                    Reference
               ----------                -----------
              TCP/WS/BFCP                 RFCXXXX;
              TCP/WSS/BFCP                RFCXXXX;
]]></artwork>
          </figure></t>
          
          <t>[[NOTE TO RFC EDITOR: Please change &rfc.number; to the number assigned to this specification, and remove this paragraph on publication.]]</t>
      </section>
</section>

      <section anchor="acknowledgements" title="Acknowledgements">
        <t>The authors want to thank Robert Welbourn, from Acme Packet,
        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 and Paul Kyzivat.
        </t>
      </section>

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")
     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      &RFC2119;

      &RFC4145;

      &RFC6455;

      &RFC5018;
      
      &BFCPbis;
      
      <?rfc include="reference.I-D.ietf-bfcpbis-sdp-ws-uri"?>
      
    </references>

    <references title="Informative References">
      &RFC7230;
  
      &RFC5246;

      &RFC6265;

      &SDPBFCPbis;

      <reference anchor="WS-API">
        <front>
          <title>The WebSocket API</title>

          <author>
            <organization>W3C</organization>
          </author>

          <author fullname="Ian Hickson" initials="I." role="editor"
                  surname="Hickson">
            <organization>Google, Inc.</organization>
          </author>

          <date month="May" year="2012"/>
        </front>
      </reference>
    </references>
  </back>
</rfc>