RFC 8833
Application-Layer Protocol Negotiation (ALPN) for WebRTC
Application-Layer Protocol Negotiation (ALPN) for WebRTC β¨
Okay bestie, let's get into RFC 8833 ππ Here's the title block tea: it's by M. Thomson at Mozilla, it's a Standards Track doc, and it dropped in January 2021 πΈ. It's got ISSN 2070-1721 and it's part of the IETF's Request for Comments series π¦.
This is part 1 of 2, so stay tuned for the rest π«Ά
Abstract β¨
Okay so this doc defines two ALPN labels for WebRTC (Web Real-Time Communication) π
The first one is "webrtc", which is regular WebRTC: a DTLS session that sets up keys for SRTP (Secure Real-time Transport Protocol), or sets up data channels using SCTP (Stream Control Transmission Protocol) over DTLS π₯
The second one is "c-webrtc", and it's giving confidential vibes π It describes the exact same protocol, but the peers also agree to keep the media confidential by not sharing it with other apps. Main character energy, literally π
Status of This Memo β¨
This is an Internet Standards Track document π
It's a product of the Internet Engineering Task Force (IETF) π§ It represents the consensus of the IETF community, it got public review, and the Internet Engineering Steering Group (IESG) approved it for publication π If you want more on Internet Standards, check out Section 2 of RFC 7841 π
For info on the current status, any errata, and how to give feedback, go to https://www.rfc-editor.org/info/rfc8833 π¦
Copyright Notice β¨
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved π
This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stand on the publication date π Read these carefully, because they describe your rights and restrictions. Code Components pulled out of this doc must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as the Simplified BSD License says π«Ά
Table of Contents β¨
1. Introduction
1.1. Conventions
2. ALPN Labels for WebRTC
3. Media Confidentiality
4. Security Considerations
5. IANA Considerations
6. References
6.1. Normative References
6.2. Informative References
Author's Address
1. Introduction πΈ
Okay so WebRTC [RFC8825] uses Datagram Transport Layer Security (DTLS) [RFC6347] to secure all peer-to-peer communications π It's literally the backbone of everything π
Identifying WebRTC usage with Application-Layer Protocol Negotiation (ALPN) [RFC7301] lets an endpoint positively identify WebRTC traffic and tell it apart from other DTLS uses π¦ Lowkey genius.
Different WebRTC uses can be advertised, and behavior can be constrained to whatever fits a given use π Specifically, this makes it possible to identify sessions that need confidentiality protection from the application that handles signaling for the session π«Ά
1.1. Conventions β¨
Here are the key words. "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" are to be read as described in BCP 14 [RFC2119] [RFC8174], but only when they show up in all capitals, just like here π
2. ALPN Labels for WebRTC β¨
These are the identifiers defined for use in ALPN π
webrtc: The DTLS session sets up keys for the Secure Real-time Transport Protocol (SRTP), known as DTLS-SRTP, as described in [RFC5764] π The DTLS record layer is used for WebRTC data channels [RFC8831] π
c-webrtc: The DTLS session is used for confidential WebRTC, where peers agree to keep the media confidential, as described in Section 3 π«Ά The confidentiality protections make sure media is protected from other applications, but they do not extend to messages on data channels π
Both identifiers describe the same basic protocol: a DTLS session that provides keys for an SRTP session, together with WebRTC data channels π Either SRTP or data channels could be absent πΈ The data channels send the Stream Control Transmission Protocol (SCTP) [RFC4960] over the DTLS record layer, which can be multiplexed with SRTP on the same UDP flow π¦ WebRTC requires Interactive Connectivity Establishment (ICE) [RFC8445] to set up the UDP flow, but the identifier doesn't cover that part π§
A more thorough definition of what WebRTC entails is in [RFC8835] β¨
Honestly, there's no functional difference between the two identifiers, except that an endpoint negotiating "c-webrtc" makes a promise to preserve the confidentiality of the media it receives π
A peer that isn't sure whether it needs confidentiality can use either identifier π
A peer in the client role MUST offer both identifiers if it isn't aware of a need for confidentiality π A peer in the server role SHOULD select "webrtc" if it doesn't prefer either one π
An endpoint that requires media confidentiality might end up negotiating a session with a peer that doesn't support this spec π An endpoint MUST abort a session if it requires confidentiality but doesn't successfully negotiate "c-webrtc" π« A peer that's willing to accept "webrtc" SHOULD assume that a peer which doesn't support this spec has negotiated "webrtc", unless signaling provides other info π However, a peer MUST NOT assume "c-webrtc" has been negotiated unless it was explicitly negotiated π«Ά
3. Media Confidentiality π
Private communications in WebRTC depend on keeping control (that is, signaling) capabilities separate from access to media [RFC8827] π That way an application can set up a session that is end-to-end confidential, where the ends are user agents (or browsers) and not the signaling application π¦ This lets an application manage signaling for a session without having access to the media exchanged in it π§
Without some form of indication that's securely bound to the session, a WebRTC endpoint can't properly tell apart a session that needs this confidentiality protection from one that doesn't π The ALPN identifier provides that signal β¨
A browser is REQUIRED to enforce this confidentiality protection using isolation controls similar to those used in content cross-origin protections (see the "Origin" section of [HTML5]) π‘οΈ These protections make sure media is protected from applications, which can't read or modify the contents of a protected media flow π Media produced from a session using the "c-webrtc" identifier MUST only be displayed to users π
The promise to apply confidentiality protections does not apply to data sent over data channels π Confidential data depends on having data sources and consumers that are exclusively browser- or user-based πΈ No mechanisms currently exist to take advantage of data confidentiality, though some use cases suggest it could be useful, for example confidential peer-to-peer file transfer π Alternative labels might be provided in the future to support these use cases π
This mechanism explicitly does NOT define a specific authentication method π A WebRTC endpoint that accepts a session with this ALPN identifier MUST respect confidentiality no matter what identity is attributed to a peer π
RTP middleboxes and entities that forward media or data can't promise to maintain confidentiality π¬ Any entity that forwards content, or records content for later access by entities other than the authenticated peer, MUST NOT offer or accept a session with the "c-webrtc" identifier π«
4. Security Considerations π
Confidential communications depend on more than just an agreement from browsers π₯
Information isn't confidential if it's displayed to people other than the ones it's intended for π Peer authentication [RFC8827] is necessary to make sure data is only sent to the intended peer π«Ά
This is not a digital rights management mechanism π A user isn't prevented from using other mechanisms to record or forward media πΉ So, for example, screen-recording devices, tape recorders, portable cameras, or a cunning arrangement of mirrors could each be used to record or redistribute media once it's delivered πͺ Similarly, if media is visible or audible (or otherwise accessible) to others nearby, there are no technical measures that protect its confidentiality π
The only guarantee this mechanism and the browser that implements it provide is that the media was delivered to the user who was authenticated π Individual users will still need to judge for themselves how their peer intends to respect the confidentiality of any information provided π§
On a shared computing platform like a browser, other entities with access to that platform (that is, web applications) might be able to access information that would compromise the confidentiality of communications π± Implementations MAY choose to limit concurrent access to input devices during confidential communications sessions π€
For instance, another application that can access a microphone might be able to sample confidential audio playing through speakers π This is true even when acoustic echo cancellation, which tries to prevent it, is used π€ Similarly, an application with access to a video camera might be able to use reflections to get all or part of a confidential video stream πΈ
5. IANA Considerations π§
The following two entries were added to the "TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs" registry established by [RFC7301] π
webrtc:
The "webrtc" label identifies mixed media and data communications using SRTP and data channels πΈ
Protocol: WebRTC Media and Data
Identification Sequence: 0x77 0x65 0x62 0x72 0x74 0x63 ("webrtc")
Specification: RFC 8833 (this document)
c-webrtc:
The "c-webrtc" label identifies WebRTC with a promise to protect media confidentiality π
Protocol: Confidential WebRTC Media and Data
Identification Sequence: 0x63 0x2d 0x77 0x65 0x62 0x72 0x74 0x63
("c-webrtc")
Specification: RFC 8833 (this document)
6. References π
Part 2 has the references, bestie, so hang tight π«Άπ
6.1. Normative References β¨
okay bestie, these are the references this spec needs to be read properly ππ if you skip any of them you're gonna be lost, no cap π
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
- [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)", RFC 5764, DOI 10.17487/RFC5764, May 2010, <https://www.rfc-editor.org/info/rfc5764>.
- [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, January 2012, <https://www.rfc-editor.org/info/rfc6347>.
- [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, "Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, July 2014, <https://www.rfc-editor.org/info/rfc7301>.
- [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
- [RFC8827] Rescorla, E., "WebRTC Security Architecture", RFC 8827, DOI 10.17487/RFC8827, January 2021, <https://www.rfc-editor.org/info/rfc8827>.
- [RFC8831] Jesup, R., Loreto, S., and M. TΓΌxen, "WebRTC Data Channels", RFC 8831, DOI 10.17487/RFC8831, January 2021, <https://www.rfc-editor.org/info/rfc8831>.
6.2. Informative References π§
these ones are extra reading for when you want the deep dive π«Ά they're not required to get the main vibe, but they're iconic if you wanna go down the rabbit hole π³οΈπ
- [HTML5] WHATWG, "HTML - Living Standard", Section 7.5, January 2021, <https://html.spec.whatwg.org/#origin>.
- [RFC4960] Stewart, R., Ed., "Stream Control Transmission Protocol", RFC 4960, DOI 10.17487/RFC4960, September 2007, <https://www.rfc-editor.org/info/rfc4960>.
- [RFC8445] Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal", RFC 8445, DOI 10.17487/RFC8445, July 2018, <https://www.rfc-editor.org/info/rfc8445>.
- [RFC8825] Alvestrand, H., "Overview: Real-Time Protocols for Browser-Based Applications", RFC 8825, DOI 10.17487/RFC8825, January 2021, <https://www.rfc-editor.org/info/rfc8825>.
- [RFC8835] Alvestrand, H., "Transports for WebRTC", RFC 8835, DOI 10.17487/RFC8835, January 2021, <https://www.rfc-editor.org/info/rfc8835>.
Author's Address π
Martin Thomson Mozilla
Email: martin.thomson@gmail.com π
π¦ where this page comes from
- ietf: rfc8833 2021-01
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms