idnits 2.17.00 (12 Aug 2021) /tmp/idnits22201/draft-murillo-whip-02.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 : ---------------------------------------------------------------------------- ** There are 21 instances of too long lines in the document, the longest one being 10 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHALL not' in this paragraph: A WHIP client receiving a 405 response for an HTTP PATCH request SHALL not send further request for ICE trickle or restart. If the WHIP client gathers additional candidates (via STUN/TURN) after the SDP offer is sent, it MUST send STUN request to the ICE candidates received from the media server as per [RFC8838] regardless if the HTTP PATCH is supported by either the WHIP client or the WHIP resource. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Protocol extensions are optionasl for bot WHIP clients and servers. WHIP clients MUST ignore any Link attribute with an unknown "rel" attribute value and WHIP servers MUST not require the usage of any of the extensions. -- The document date (June 09, 2021) is 339 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 8843 (Obsoleted by RFC 9143) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group S. Murillo 3 Internet-Draft A. Gouaillard 4 Intended status: Informational CoSMo Software 5 Expires: December 11, 2021 June 09, 2021 7 WebRTC-HTTP ingestion protocol (WHIP) 8 draft-murillo-whip-02 10 Abstract 12 While WebRTC has been very successful in a wide range of scenarios, 13 its adoption in the broadcasting/streaming industry is lagging 14 behind. Currently there is no standard protocol (like SIP or RTSP) 15 designed for ingesting media in a streaming service, and content 16 providers still rely heavily on protocols like RTMP for it. 18 These protocols are much older than webrtc and lack by default some 19 important security and resilience features provided by webrtc with 20 minimal delay. 22 The media codecs used in older protocols do not always match those 23 being used in WebRTC, mandating transcoding on the ingest node, 24 introducing delay and degrading media quality. This transcoding step 25 is always present in traditional streaming to support e.g. ABR, and 26 comes at no cost. However webrtc implements client-side ABR, also 27 called Network-Aware Encoding by e.g. Huavision, by means of 28 simulcast and SVC codecs, which otherwise alleviate the need for 29 server-side transcoding. Content protection and Privacy Enhancement 30 can be achieved with End-to-End Encryption, which preclude any 31 server-side media processing. 33 This document proposes a simple HTTP based protocol that will allow 34 WebRTC endpoints to ingest content into streaming services and/or 35 CDNs to fill this gap and facilitate deployment. 37 Status of This Memo 39 This Internet-Draft is submitted in full conformance with the 40 provisions of BCP 78 and BCP 79. 42 Internet-Drafts are working documents of the Internet Engineering 43 Task Force (IETF). Note that other groups may also distribute 44 working documents as Internet-Drafts. The list of current Internet- 45 Drafts is at https://datatracker.ietf.org/drafts/current/. 47 Internet-Drafts are draft documents valid for a maximum of six months 48 and may be updated, replaced, or obsoleted by other documents at any 49 time. It is inappropriate to use Internet-Drafts as reference 50 material or to cite them other than as "work in progress." 52 This Internet-Draft will expire on December 11, 2021. 54 Copyright Notice 56 Copyright (c) 2021 IETF Trust and the persons identified as the 57 document authors. All rights reserved. 59 This document is subject to BCP 78 and the IETF Trust's Legal 60 Provisions Relating to IETF Documents 61 (https://trustee.ietf.org/license-info) in effect on the date of 62 publication of this document. Please review these documents 63 carefully, as they describe your rights and restrictions with respect 64 to this document. Code Components extracted from this document must 65 include Simplified BSD License text as described in Section 4.e of 66 the Trust Legal Provisions and are provided without warranty as 67 described in the Simplified BSD License. 69 Table of Contents 71 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 72 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 73 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 74 4. Protocol Operation . . . . . . . . . . . . . . . . . . . . . 5 75 4.1. ICE and NAT support . . . . . . . . . . . . . . . . . . . 6 76 4.2. Webrtc constraints . . . . . . . . . . . . . . . . . . . 7 77 4.3. Load balancing and redirections . . . . . . . . . . . . . 7 78 4.4. STUN/TURN server configuration . . . . . . . . . . . . . 7 79 4.5. Authentication and authorization . . . . . . . . . . . . 8 80 4.6. Simulcast and scalable video coding . . . . . . . . . . . 8 81 4.7. Protocol extensions . . . . . . . . . . . . . . . . . . . 8 82 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 83 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 84 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 85 8. Normative References . . . . . . . . . . . . . . . . . . . . 9 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 88 1. Introduction 90 WebRTC intentionally does not specify a signaling transport protocol 91 at application level, while RTCWEB standardized the signalling 92 protocol itself (JSEP, SDP O/A) and everything that was going over 93 the wire (media, codec, encryption, ...). This flexibility has 94 allowed for implementing a wide range of services. However, those 95 services are typically standalone silos which don't require 96 interoperability with other services or leverage the existence of 97 tools that can communicate with them. 99 In the broadcasting/streaming world, the usage of hardware encoders 100 that would make it very simple to plug in (SDI) cables carrying raw 101 media, encoding it in place, and pushing it to any streaming service 102 or CDN ingest is ubiquitous. Having to implement a custom signalling 103 transport protocol for each different webrtc services has hindered 104 adoption. 106 While some standard signalling protocols are available that can be 107 integrated with WebRTC, like SIP or XMPP, they are not designed to be 108 used in broadcasting/streaming services, and there also is no sign of 109 adoption in that industry. RTSP, which is based on RTP and maybe the 110 closest in terms of features to webrtc, is not compatible with WebRTC 111 SDP offer/answer model. 113 In the specific case of ingest into a platform, some assumption can 114 be made about the server-side which simplifies the webrtc compliance 115 burden, as detailed in webrtc-gateway document 116 [I-D.draft-alvestrand-rtcweb-gateways]. 118 This document proposes a simple protocol for supporting WebRTC as 119 ingest method which is: 121 o Easy to implement, 123 o As easy to use as current RTMP URIs. 125 o Fully compliant with Webrtc and RTCWEB specs. 127 o Allow for both ingest in traditional media platforms for extension 128 and ingest in webrtc end-to-end platform for lowest possible 129 latency. 131 o Lowers the requirements on both hardware encoders and broadcasting 132 services to support webrtc. 134 o Usable both in web browsers and in native encoders. 136 2. Terminology 138 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 139 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 140 document are to be interpreted as described in [RFC2119]. 142 o WHIP client: WebRTC Media encoder or producer that acts as client 143 on the WHIP protocol and encodes and delivers the media to a 144 remote media server. 146 o WHIP endpoint: Ingest server receiving the initial WHIP request. 148 o WHIP endpoint URL: URL of the WHIP endpoint that will create the 149 WHIP resource 151 o Media Server: WebRTC media server that establishes the media 152 session with the WHIP client and receives the media produced by 153 it. 155 o WHIP resource: Allocated resource by the WHIP endpoint for an 156 ongoing ingest session that the WHIP client can send request for 157 altering the session (ICE operations or termination, for example). 159 o WHIP resource URL: URL allocated to a specific media session by 160 the WHIP endpoint which can be used to perform operations such 161 terminating the session or ICE restarts. 163 3. Overview 165 The WebRTC-HTTP ingest protocol (WHIP) uses an HTTP POST request to 166 perform a single shot SDP offer/answer so an ICE/DTLS session can be 167 established between the encoder/media producer and the broadcasting 168 ingestion endpoint. 170 Once the ICE/DTLS session is set up, the media will flow 171 unidirectionally from the encoder/media producer to the broadcasting 172 ingestion endpoint. In order to reduce complexity, no SDP 173 renegotiation is supported, so no tracks or streams can be added or 174 removed once the initial SDP O/A over HTTP is completed. 176 +-----------------+ +---------------+ +--------------+ +----------------+ 177 | WebRTC Producer | | WHIP endpoint | | Media Server | | WHIP Resource | 178 +---------+-------+ +-------+- -----+ +------+-------+ +--------|-------+ 179 | | | | 180 | | | | 181 |HTTP POST (SDP Offer) | | | 182 +------------------------>+ | | 183 |201 Created (SDP answer) | | | 184 +<------------------------+ | | 185 | ICE REQUEST | | 186 +----------------------------------------->+ | 187 | ICE RESPONSE | | 188 <------------------------------------------+ | 189 | DTLS SETUP | | 190 <==========================================> | 191 | RTP/RTCP FLOW | | 192 +------------------------------------------> | 193 | HTTP DELETE | 194 +------------------------------------------------------------>+ 195 | 200 OK | 196 <-------------------------------------------------------------x 198 WHIP session setup and teardown 200 4. Protocol Operation 202 In order to setup an ingestion session, the WHIP client will generate 203 an SDP offer according to the JSEP rules and do an HTTP POST request 204 to the WHIP endpoint configured URL. 206 The HTTP POST request will have a content type of application/sdp and 207 contain the SDP offer as body. The WHIP endpoint will generate an 208 SDP answer and return it on a 201 Accepted response with content type 209 of application/sdp and the SDP answer as body and a Location header 210 pointing to the newly created resource. 212 SDP offer SHOULD use the sendonly attribute and the SDP answer MUST 213 use the recvonly attribute. 215 Once a session is setup ICE consent freshness [RFC7675] will be used 216 to detect abrupt disconnection and DTLS teardown for session 217 termination by either side. 219 To explicitly terminate the session, the WHIP client MUST perform an 220 HTTP DELETE request to the resource url returned on the Location 221 header of the initial HTTP POST. Upon receiving the HTTP DELETE 222 request, the WHIP resource will be removed and the resources freed on 223 the media server, terminating the ICE and DTLS sessions. 225 A media server terminating a session MUST follow the procedures in 226 [RFC7675] section 5.2 for immediate revocation of consent. 228 The WHIP endpoints MUST return an HTTP 405 response for any HTTP GET, 229 HEAD or PUT requests on the resource URL in order to reserve its 230 usage for future versions of this protocol specification. 232 The WHIP resources MUST return an HTTP 405 response for any HTTP GET, 233 HEAD, POST or PUT requests on the resource URL in order to reserve 234 its usage for future versions of this protocol specification. 236 4.1. ICE and NAT support 238 In order to simplify the protocol, there is no support for exchanging 239 gathered trickle candidates from media server ICE candidates once the 240 SDP answer is sent. So in order to support the WHIP client behind 241 NAT, the WHIP media server SHOULD be publicly accessible. 243 The initial offer by the WHIP client MAY be sent after the full ICE 244 gathering is complete containing the full list of ICE candidates, or 245 only contain local candidates or even an empty list of candidates. 247 The WHIP endpoint SDP answer SHALL contain the full list of ICE 248 candidates publicly accessible of the media server. The media server 249 MAY use ICE lite, while the WHIP client MUST implement full ICE. 251 The WHIP client MAY perform trickle ICE or an ICE restarts [RFC8863] 252 by sending a HTTP PATCH request to the WHIP resource URL with a body 253 containing a SDP fragment with mime type "application/trickle-ice- 254 sdpfrag" as specified in [RFC8840] with the new ice candidate or ice 255 ufrag/pwd for ice restarts. A WHIP resource MAY not support either 256 trickle ICE (i.e. ICE lite media servers) or ICE restart, and it 257 MUST return a 405 Method Not Allowed for any HTTP PATCH request. 259 A WHIP client receiving a 405 response for an HTTP PATCH request 260 SHALL not send further request for ICE trickle or restart. If the 261 WHIP client gathers additional candidates (via STUN/TURN) after the 262 SDP offer is sent, it MUST send STUN request to the ICE candidates 263 received from the media server as per [RFC8838] regardless if the 264 HTTP PATCH is supported by either the WHIP client or the WHIP 265 resource. 267 4.2. Webrtc constraints 269 In order to reduce the complexity of implementing WHIP in both 270 clients and media servers, some restrictions regarding WebRTC usage 271 are made. 273 SDP bundle SHALL be used by both the WHIP client and the media 274 server. The SDP offer created by the WHIP client MUST include the 275 bundle-only attribute in all m-lines as per [RFC8843]. Also, RTCP 276 muxing SHALL be supported by both the WHIP client and the media 277 server. 279 Unlike [RFC5763] a WHIP client MAY use a setup attribute value of 280 setup:active in the SDP offer, in which case the WHIP endpoint MUST 281 use a setup attribute value of setup:passive in the SDP answer. 283 4.3. Load balancing and redirections 285 WHIP endpoints and media servers MAY not be colocated on the same 286 server so it is possible to load balance incoming requests to 287 different media servers. WHIP clients SHALL support HTTP redirection 288 via 307 Temporary Redirect response code. 290 In case of high load, the WHIP endpoints may return a 503 (Service 291 Unavailable) status code indicating that the server is currently 292 unable to handle the request due to a temporary overload or scheduled 293 maintenance, which will likely be alleviated after some delay. 295 The WHIP endpoint MAY send a Retry-After header field indicating the 296 minimum time that the user agent is asked to wait before issuing the 297 redirected request. 299 4.4. STUN/TURN server configuration 301 Configuration of the TURN or STUN servers used by the WHIP client is 302 out of the scope of this document. 304 It is RECOMMENDED that broadcasting server provides an HTTP interface 305 for provisioning the TUNR/STUN servers url and short term credentiasl 306 as in [I-D.draft-uberti-behave-turn-rest-00]. Note that the 307 authentication information or the url of this API are not related to 308 the WHIP enpoint URLs or authentication. 310 It could also be possilble to configure the STUN/TURN server URLS and 311 long term credentials provided by the either broadcasting service or 312 an external TURN provider. 314 4.5. Authentication and authorization 316 Authentication and authorization is supported by the Authorization 317 HTTP header with a bearer token as per [RFC6750]. 319 4.6. Simulcast and scalable video coding 321 Both simulcast and scalable video coding (including K-SVC modes) MAY 322 be supported by both media servers and WHIP clients and negotiated in 323 the SDP O/A. 325 If the client supports simulcast and wants to enable it for 326 publishing, it MUST negotiate the support in the SDP offer according 327 to the procedures in [RFC8853] section 5.3. A server accepting a 328 simulcast offer MUST create an answer accoding to the procedures 329 [RFC8853] section 5.3.2. 331 4.7. Protocol extensions 333 In order to support future extensions to be defined for the WHIP 334 protocol, a common procedure for registering and announcing the new 335 extensions is defined. 337 Protocol extensions supported by the WHIP server MUST be advertised 338 to the WHIP client on the 201 created response to initial HTTP POST 339 request to the WHIP enpoint by inserting one Link header for each 340 extension with the extension "rel" type attribute and the uri for the 341 HTTP resource that will be available for receiving request related to 342 that extension. 344 Protocol extensions are optionasl for bot WHIP clients and servers. 345 WHIP clients MUST ignore any Link attribute with an unknown "rel" 346 attribute value and WHIP servers MUST not require the usage of any of 347 the extensions. 349 Each protocol extension MUST register an unique "rel" attribute 350 values at IANA starting with the prefix: "urn:ietf:params:whip:". 352 For example, taking a potential extension of server to client 353 communication using server sent events as specified in 354 https://html.spec.whatwg.org/multipage/server-sent- 355 events.html#server-sent-events, the url for connecting to the server 356 side event resource for the published stream will be returned in the 357 initial HTTP "201 Created" response with a "Link" header an a "rel" 358 attribute of "urn:ietf:params:whip:server-sent-events". 360 The HTTP 201 response to the HTTP POST request would look like: 362 "HTTP/1.1 201 Created Content-Type: application/sdp Location: 363 https://whip.ietf.org/publications/213786HF Link: 364 ;rel="urn:ietf:params:whip:server-side-events " " 367 5. Security Considerations 369 HTTPS SHALL be used in order to preserve the WebRTC security model. 371 6. IANA Considerations 373 7. Acknowledgements 375 8. Normative References 377 [I-D.draft-alvestrand-rtcweb-gateways] 378 Alvestrand, H. and U. Rauschenbach, "WebRTC Gateways", 379 draft-alvestrand-rtcweb-gateways-02 (work in progress), 380 March 2015. 382 [I-D.draft-uberti-behave-turn-rest-00] 383 Uberti, J., "A REST API For Access To TURN Services", 384 draft-uberti-behave-turn-rest-00 (work in progress), July 385 2013. 387 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 388 Requirement Levels", BCP 14, RFC 2119, 389 DOI 10.17487/RFC2119, March 1997, 390 . 392 [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework 393 for Establishing a Secure Real-time Transport Protocol 394 (SRTP) Security Context Using Datagram Transport Layer 395 Security (DTLS)", RFC 5763, DOI 10.17487/RFC5763, May 396 2010, . 398 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 399 Framework: Bearer Token Usage", RFC 6750, 400 DOI 10.17487/RFC6750, October 2012, 401 . 403 [RFC7675] Perumal, M., Wing, D., Ravindranath, R., Reddy, T., and M. 404 Thomson, "Session Traversal Utilities for NAT (STUN) Usage 405 for Consent Freshness", RFC 7675, DOI 10.17487/RFC7675, 406 October 2015, . 408 [RFC8838] Ivov, E., Uberti, J., and P. Saint-Andre, "Trickle ICE: 409 Incremental Provisioning of Candidates for the Interactive 410 Connectivity Establishment (ICE) Protocol", RFC 8838, 411 DOI 10.17487/RFC8838, January 2021, 412 . 414 [RFC8840] Ivov, E., Stach, T., Marocco, E., and C. Holmberg, "A 415 Session Initiation Protocol (SIP) Usage for Incremental 416 Provisioning of Candidates for the Interactive 417 Connectivity Establishment (Trickle ICE)", RFC 8840, 418 DOI 10.17487/RFC8840, January 2021, 419 . 421 [RFC8843] Holmberg, C., Alvestrand, H., and C. Jennings, 422 "Negotiating Media Multiplexing Using the Session 423 Description Protocol (SDP)", RFC 8843, 424 DOI 10.17487/RFC8843, January 2021, 425 . 427 [RFC8853] Burman, B., Westerlund, M., Nandakumar, S., and M. Zanaty, 428 "Using Simulcast in Session Description Protocol (SDP) and 429 RTP Sessions", RFC 8853, DOI 10.17487/RFC8853, January 430 2021, . 432 [RFC8863] Holmberg, C. and J. Uberti, "Interactive Connectivity 433 Establishment Patiently Awaiting Connectivity (ICE PAC)", 434 RFC 8863, DOI 10.17487/RFC8863, January 2021, 435 . 437 Authors' Addresses 439 Sergio Garcia Murillo 440 CoSMo Software 442 Email: sergio.garcia.murillo@cosmosoftware.io 444 Alexandre Gouaillard 445 CoSMo Software 447 Email: alex.gouaillard@cosmosoftware.io