RFC 8833

Application-Layer Protocol Negotiation (ALPN) for WebRTC

πŸ“… published January 2021, from ietf

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 (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 😭


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 πŸ•³οΈπŸŒˆ


Author's Address πŸ’…

Martin Thomson Mozilla

Email: martin.thomson@gmail.com πŸ’Œ

πŸ“¦ where this page comes from