One document matched: draft-ietf-rtcweb-stun-consent-freshness-05.xml
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc='yes'?>
<?rfc tocdepth="3"?>
<?rfc compact="yes"?>
<?rfc tocdepth="yes"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline ="yes"?>
<?rfc subcompact="no"?>
<?rfc tocompact="yes"?>
<rfc category="std" docName="draft-ietf-rtcweb-stun-consent-freshness-05"
ipr="trust200902">
<front>
<title abbrev="STUN Usage for Consent Freshness">STUN Usage for Consent
Freshness</title>
<author fullname="Muthu Arul Mozhi Perumal" initials="M." surname="Perumal">
<organization>Ericsson</organization>
<address>
<postal>
<street>Mahadevapura</street>
<city>Bangalore</city>
<region>Karnataka</region>
<code>560048</code>
<country>India</country>
</postal>
<email>muthu.arul@gmail.com</email>
</address>
</author>
<author fullname="Dan Wing" initials="D" surname="Wing">
<organization>Cisco Systems</organization>
<address>
<postal>
<street>821 Alder Drive</street>
<city>Milpitas</city>
<region>California</region>
<code>95035</code>
<country>USA</country>
</postal>
<email>dwing@cisco.com</email>
</address>
</author>
<author fullname="Ram Mohan Ravindranath" initials="R"
surname="Ravindranath">
<organization>Cisco Systems</organization>
<address>
<postal>
<street>Cessna Business Park</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="Tirumaleswar Reddy" initials="T." surname="Reddy">
<organization>Cisco Systems</organization>
<address>
<postal>
<street>Cessna Business Park, Varthur Hobli</street>
<street>Sarjapur Marathalli Outer Ring Road</street>
<city>Bangalore</city>
<region>Karnataka</region>
<code>560103</code>
<country>India</country>
</postal>
<email>tireddy@cisco.com</email>
</address>
</author>
<author fullname="Martin Thomson" initials="M." surname="Thomson">
<organization>Mozilla</organization>
<address>
<postal>
<street>Suite 300</street>
<street>650 Castro Street</street>
<city>Mountain View</city>
<region>California</region>
<code>94041</code>
<country>US</country>
</postal>
<email>martin.thomson@gmail.com</email>
</address>
</author>
<date />
<area>RAI</area>
<workgroup>RTCWEB</workgroup>
<abstract>
<t>To prevent sending excessive traffic to an endpoint, periodic consent
needs to be obtained from that remote endpoint.</t>
<t>This document describes a consent mechanism using a new STUN usage.
This same mechanism can also determine connection loss ("liveness") with
a remote peer.</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>To prevent attacks on peers, RTP endpoints have to ensure the remote
peer wants to receive traffic. This is performed both when the session
is first established to the remote peer using ICE connectivity checks,
and periodically for the duration of the session using the procedures
defined in this document.</t>
<t>When a session is first established, WebRTC implementations are
required to perform STUN connectivity checks as part of <xref
target="RFC5245">ICE</xref>. That initial consent is not described
further in this document and it is assumed that ICE is being used for
that initial consent.</t>
<t>Related to consent is loss of connectivity ("liveness"). Many
applications want notification of connection loss to take appropriate
actions (e.g., alert the user, try switching to a different
interface).</t>
<t>This document describes a new STUN usage with exchange of request and
response messages to verify the remote peer's consent to receive traffic,
and the absence of which for a period of time indicates a loss of liveness.</t>
<t>WebRTC endpoints are required to support full ICE as specified in section 3.4 of <xref target="I-D.ietf-rtcweb-transports"/>. However, when WebRTC endpoints interwork with other endpoints that support only ICE-lite (e.g. gateways) those endpoints will not generate consent checks, but just respond to consent checks they receive.</t>
</section>
<section anchor="sec-term" 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"></xref>.</t>
<t><list style="hanging">
<t hangText="Consent:">It is the mechanism of obtaining
permission to send traffic to a certain transport address.
This is the initial consent to send traffic, which is
obtained by ICE or a TCP handshake.</t>
<t hangText="Consent Freshness:">Permission to continue sending
traffic to a certain transport address. This is performed by the
procedure described in this document.</t>
<t hangText="Session Liveness:">Detecting loss of connectivity to a
certain transport address. This is performed by the procedure
described in this document.</t>
<t hangText="Transport Address:">The remote peer's IP address and
(UDP or TCP) port number.</t>
</list></t>
</section>
<section title="Design Considerations">
<t>Although ICE requires periodic keepalive traffic to keep NAT bindings
alive (Section 10 of <xref target="RFC5245"></xref>, <xref
target="RFC6263"></xref>), those keepalives are sent as STUN Indications
which are send-and-forget, and do not evoke a response. A response is
necessary both for consent to continue sending traffic, as well as to
verify session liveness. Thus, we need a request/response mechanism for
consent freshness. ICE can be used for that mechanism because ICE
already requires ICE agents continue listening for ICE messages, as
described in section 10 of <xref target="RFC5245"></xref>.</t>
</section>
<section title="Solution">
<t>There are two ways consent to send traffic is revoked: expiration
of consent and immediate revocation of consent, which are discussed in
the following sections.</t>
<section title="Expiration of Consent">
<t>A WebRTC browser performs a combined consent freshness and session
liveness test using STUN request/response as described below:</t>
<t>An endpoint MUST NOT send application data (e.g., RTP, RTCP,
SCTP, DTLS) on an ICE-initiated connection unless the receiving
endpoint consents to receive the data. After a successful ICE
connectivity check on a particular transport address, subsequent
consent MUST be obtained following the procedure described in
this document. The consent expires after a fixed amount of
time.</t>
<t>Explicit consent to send is obtained by sending an ICE
binding request to the remote peer's Transport Address and
receiving a matching, authenticated, non-error ICE binding
response from the remote peer's Transport
Address. These ICE binding requests and responses are
authenticated using the same short-term credentials as the
initial ICE exchange. Implementations MUST cease sending data
if their consent expires. To prevent expiry of consent, a STUN
binding request is sent every N milliseconds, where N SHOULD be
5000 milliseconds and MUST be randomized at least 20% above and
20% below that value (to prevent prevent network
synchronization). Using the value 5000 milliseconds and that
20% randomization range, N would be a value between 4000 and
6000. These STUN binding requests for consent are not
re-transmitted. Each STUN binding request for consent
re-calculates a new random value N and a
new <xref target="RFC4086">cryptographically-random</xref> STUN
transaction ID.</t>
<t>The initial Consent to send traffic is obtained by ICE. Consent
expires after 30 seconds. That is, if a valid STUN
binding response corresponding to one of the STUN requests sent
in the last 30 seconds has not been received from the remote peer's Transport Address, the endpoint MUST cease transmission on that 5-tuple.</t>
<!--
<t>Although receiving authenticated ICE packets is sufficient for consent,
it is still RECOMMENDED to send messages to keep NAT or firewall
bindings alive (see Section 10 of <xref target="RFC5245"></xref> and
<xref target="RFC6263"></xref>).</t>
-->
<t>To meet the security needs of consent, an untrusted
application (e.g., JavaScript) MUST NOT be able to obtain or control
the STUN transaction ID, because that enables spoofing STUN responses,
falsifying consent.</t>
<t>While TCP affords some protection from off-path attackers
(<xref target="RFC5961"></xref>, <xref target="RFC4953"></xref>),
there is still a risk an attacker could cause a TCP sender to send
packets forever by spoofing ACKs. To prevent such an attack, consent
checks MUST be performed over all WebRTC-initiated transport
connections, including TCP. In this way, an off-path attacker
spoofing TCP segments can not cause a TCP sender to send packets
longer than the consent timer (30 seconds).</t>
<t>An endpoint that is not sending any application traffic does not
need to obtain consent which can slightly conserve its resources.
However, the endpoint needs to ensure its NAT or firewall mappings
persist which can be done using keepalive or other techniques
(see Section 10 of <xref target="RFC5245"></xref> and
see <xref target="RFC6263"></xref>). If the endpoint wants to send
application traffic, it needs to first obtain consent if its consent
has expired.</t>
</section>
<section title="Immediate Revocation of Consent">
<t>The previous section explained how consent expires due to a
timeout. In some cases it is useful to signal a connection is
terminated, rather than relying on a timeout. This is done by
immediately revoking consent.</t>
<t>Consent for sending traffic on the media or data channel is
immediately revoked by receipt of a an authenticated message
that closes the connection (e.g., a TLS fatal alert) or
receipt of a valid and authenticated STUN response with error
code Forbidden (403).</t>
<t>Receipt of an unauthenticated message that closes a
connection (e.g., TCP FIN) does not indicate revocation of
consent. Thus, an endpoint receiving an unauthenticated
end-of-session message SHOULD continue sending media (over
connectionless transport) or attempt to re-establish the
connection (over connection-oriented transport) until consent
expires or it receives an authenticated message revoking
consent.</t>
<t>Note that an authenticated SRTCP BYE does not terminate
consent; it only indicates the associated SRTP source
has quit.</t>
</section>
</section>
<!--
<t>Consent freshness serves as a circuit breaker (so that if the
path or remote peer fails the WebRTC browser stops sending all
traffic to that remote peer), determining session liveness
serves the purpose of notifying the application of connectivity
failure so that the application can take appropriate action. For
the rest of the document, peer is the sink for the traffic
originated from the sender for that flow (5 tuple). If a browser
uses different 5 tuple for each stream(Audio, video e.t.c) then
it has to do consent for each flow. Consent has to be done for
each component of a media stream when they use different
tuple. For example if RTCP uses different port then consent has
to be done for that as well. </t>
<t>Every Tc seconds, the WebRTC browser sends a STUN Binding Request to
the peer. This request MUST use a new, cryptographically random
Transaction ID <xref target="RFC4086"></xref>, and is formatted as for
an <xref target="RFC5245">ICE connectivity check</xref>. A valid STUN
Binding Response is also formatted as for an <xref target="RFC5245">ICE
connectivity check</xref>. The STUN Binding Request and STUN Binding
Response are validated as for an <xref target="RFC5245">ICE connectivity
check</xref>. The difference from ICE connectivity check is that there is no exponential back off for retransmissions.</t>
<t>If a valid STUN Binding Response is received, the consent timer is
reset to the time of receiving the response and fires again Tc seconds later. Multiple response on the same Transaction ID MUST reset the Tc timer.</t>
<t>If a valid STUN Binding Response is not received after Tret milliseconds, the
STUN Binding Request is retransmitted (with the same Transaction ID and
all other fields). As long as a valid STUN Binding Response is not
received, this retransmission is repeated every Tret milliseconds until Tf seconds
have elapsed or a valid response is received. If no valid response is
received after Tf seconds, the WebRTC browser MUST quit transmitting
traffic to this remote peer. The streams that are being sent on a flow(5 tuple) for which a consent has failed will be stopped. Considering the default value of Tf=15 seconds, this means transmission will stop after 30 consent check
packets have resulted in no response.</t>
<t>Liveness timer: If no packets have been received on the local port in
Tr seconds, the WebRTC browser MUST inform the JavaScript that
connectivity has been lost. The JavaScript application will use this
notification however it desires (e.g., cease transmitting to the remote
peer, provide a notification to the user, etc.). Note the definition of
a received packet is liberal, and includes an SRTP packet that fails
authentication, a STUN Binding Request with an invalid USERNAME or
PASSWORD, or any other packet.</t>
</section>
-->
<section anchor="liveness" title="Connection Liveness">
<t>A connection is considered "live" if packets are received from a
remote endpoint within an application-dependent period. An application
can request a notification when there are no packets received for a
certain period (configurable).</t>
<t>Similarly, if packets haven't been received within a certain period,
an application can request a consent check (heartbeat) be generated.
These two time intervals might be controlled by the same configuration
item.</t>
<t>Sending consent checks (heartbeats) at a high rate could allow a
malicious application to generate congestion, so applications MUST NOT
be able to send heartbeats at an average rate of more than 1 per second.</t>
</section>
<section anchor="DSCP-consent"
title="DiffServ Treatment for Consent packets">
<t>It is RECOMMENDED that STUN consent checks use the same Diffserv
Codepoint markings as the ICE connectivity checks described in section
7.1.2.4 of <xref target="RFC5245"></xref> for a given 5-tuple.</t>
<t>Note: It is possible that different Diffserv Codepoints are used by
different media over the same transport address <xref
target="I-D.ietf-tsvwg-rtcweb-qos"></xref>. Such a case is outside the
scope of this document.</t>
</section>
<section title="W3C API Implications">
<t>For the consent freshness and liveness test the W3C specification
should provide APIs as described below: <list style="numbers">
<t>Ability for the browser to notify the JavaScript that consent freshness
has failed for a 5-tuple and the browser has stopped transmitting on that
5-tuple.</t>
<t>Ability for the JavaScript to start and stop liveness test and
set the liveness test interval.</t>
<t>Ability for the browser to notify the JavaScript that a liveness
test has failed for a media stream.</t>
</list></t>
</section>
<section title="Security Considerations">
<t>This document describes a security mechanism.</t>
<t>The security considerations discussed in <xref
target="RFC5245"></xref> should also be taken into account.</t>
<t>SRTP is encrypted and authenticated with symmetric keys; that is,
both sender and receiver know the keys. With two party sessions, receipt
of an authenticated packet from the single remote party is a strong
assurance the packet came from that party. However, when a session
involves more than two parties, all of whom know each others keys, any
of those parties could have sent (or spoofed) the packet. Such shared
key distributions are possible with some <xref
target="RFC3830">MIKEY</xref> modes, <xref target="RFC4568">Security
Descriptions</xref>, and <xref
target="I-D.ietf-avtcore-srtp-ekt">EKT</xref>. Thus, in such shared
keying distributions, receipt of an authenticated SRTP packet is not
sufficient to verify consent.</t>
</section>
<section anchor="sec.iana-considerations" title="IANA Considerations">
<t>This document does not require any action from IANA.</t>
</section>
<section title="Acknowledgement">
<t>Thanks to Eric Rescorla, Harald Alvestrand, Bernard Aboba, Magnus
Westerland, Cullen Jennings, Christer Holmberg and Simon Perreault for their valuable
inputs and comments.</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include="reference.RFC.2119"?>
<?rfc include="reference.RFC.5245"?>
<?rfc include="reference.RFC.4086"?>
<?rfc include="reference.RFC.6263"?>
</references>
<references title="Informative References">
<?rfc include="reference.RFC.3830"?>
<?rfc include="reference.RFC.4568"?>
<?rfc include="reference.I-D.ietf-tsvwg-rtcweb-qos"?>
<?rfc include="reference.I-D.ietf-avtcore-srtp-ekt"?>
<?rfc include="reference.I-D.ietf-rtcweb-transports"?>
<?rfc include="reference.RFC.5961"?>
<?rfc include="reference.RFC.4953"?>
</references>
</back>
</rfc>| PAFTECH AB 2003-2026 | 2026-04-24 02:57:39 |