draft-ietf-rtcweb-stun-consent-freshness-09.txt   draft-ietf-rtcweb-stun-consent-freshness-10.txt 
RTCWEB M. Perumal RTCWEB M. Perumal
Internet-Draft Ericsson Internet-Draft Ericsson
Intended status: Standards Track D. Wing Intended status: Standards Track D. Wing
Expires: June 7, 2015 R. Ravindranath Expires: June 17, 2015 R. Ravindranath
T. Reddy T. Reddy
Cisco Systems Cisco Systems
M. Thomson M. Thomson
Mozilla Mozilla
December 4, 2014 December 14, 2014
STUN Usage for Consent Freshness STUN Usage for Consent Freshness
draft-ietf-rtcweb-stun-consent-freshness-09 draft-ietf-rtcweb-stun-consent-freshness-10
Abstract Abstract
To prevent sending excessive traffic to an endpoint, periodic consent To prevent sending excessive traffic to an endpoint, periodic consent
needs to be obtained from that remote endpoint. needs to be obtained from that remote endpoint.
This document describes a consent mechanism using a new Session This document describes a consent mechanism using a new Session
Traversal Utilities for NAT (STUN) usage. This same mechanism can Traversal Utilities for NAT (STUN) usage.
also determine connection loss ("liveness") with a remote peer.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on June 7, 2015. This Internet-Draft will expire on June 17, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 19 skipping to change at page 2, line 18
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Design Considerations . . . . . . . . . . . . . . . . . . . . 3 3. Design Considerations . . . . . . . . . . . . . . . . . . . . 3
4. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.1. Expiration of Consent . . . . . . . . . . . . . . . . . . 3 4.1. Expiration of Consent . . . . . . . . . . . . . . . . . . 3
4.2. Immediate Revocation of Consent . . . . . . . . . . . . . 5 4.2. Immediate Revocation of Consent . . . . . . . . . . . . . 5
5. Connection Liveness . . . . . . . . . . . . . . . . . . . . . 6 5. DiffServ Treatment for Consent . . . . . . . . . . . . . . . 6
6. DiffServ Treatment for Consent . . . . . . . . . . . . . . . 6 6. DTLS applicability . . . . . . . . . . . . . . . . . . . . . 6
7. API Recommendations . . . . . . . . . . . . . . . . . . . . . 6 7. API Recommendations . . . . . . . . . . . . . . . . . . . . . 6
8. Security Considerations . . . . . . . . . . . . . . . . . . . 7 8. Security Considerations . . . . . . . . . . . . . . . . . . . 6
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
10. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 7 10. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 7
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 7
11.1. Normative References . . . . . . . . . . . . . . . . . . 7 11.1. Normative References . . . . . . . . . . . . . . . . . . 7
11.2. Informative References . . . . . . . . . . . . . . . . . 8 11.2. Informative References . . . . . . . . . . . . . . . . . 7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8
1. Introduction 1. Introduction
To prevent attacks on peers, RTP endpoints have to ensure the remote To prevent attacks on peers, endpoints have to ensure the remote peer
peer is willing to receive traffic. This is performed both when the is willing to receive traffic. This is performed both when the
session is first established to the remote peer using Interactive session is first established to the remote peer using Interactive
Connectivity Establishment ICE [RFC5245] connectivity checks, and Connectivity Establishment ICE [RFC5245] connectivity checks, and
periodically for the duration of the session using the procedures periodically for the duration of the session using the procedures
defined in this document. defined in this document.
When a session is first established, ICE implementations obtain an When a session is first established, ICE implementations obtain an
initial consent to send by performing STUN connectivity checks. This initial consent to send by performing STUN connectivity checks. This
document describes a new STUN usage with exchange of request and document describes a new STUN usage with exchange of request and
response messages that verifies the remote peer's ongoing consent to response messages that verifies the remote peer's ongoing consent to
receive traffic. This consent expires after a period of time and receive traffic. This consent expires after a period of time and
needs to be continually renewed, which ensures that consent can be needs to be continually renewed, which ensures that consent can be
terminated. terminated.
This document defines what it takes to obtain, maintain, and lose This document defines what it takes to obtain, maintain, and lose
consent to send. Consent to send applies to a single 5-tuple. How consent to send. Consent to send applies to a single 5-tuple. How
applications react to changes in consent is not described in this applications react to changes in consent is not described in this
document. document.
This applies to full ICE implementations. An ICE-lite implementation Consent is obtained only by full ICE implementations. An ICE-lite
will not generate consent checks, but will just respond to consent implementation will not generate consent checks, but will just
checks it receives. ICE-lite implementation do not require any respond to consent checks it receives. No changes are required to
changes to respond to consent checks. ICE-lite implementations in order to respond to consent checks, as
they are processed as normal ICE connectivity checks.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
Consent: The mechanism of obtaining permission to send to a remote Consent: The mechanism of obtaining permission to send to a remote
transport address. Initial consent is obtained using ICE or a TCP transport address. Initial consent is obtained using ICE.
handshake.
Consent Freshness: Maintaining and renewing consent over time. Consent Freshness: Maintaining and renewing consent over time.
Session Liveness: Detecting loss of connectivity to a certain
transport address.
Transport Address: The remote peer's IP address and UDP or TCP port Transport Address: The remote peer's IP address and UDP or TCP port
number. number.
3. Design Considerations 3. Design Considerations
Although ICE requires periodic keepalive traffic to keep NAT bindings Although ICE requires periodic keepalive traffic to keep NAT bindings
alive (Section 10 of [RFC5245], [RFC6263]), those keepalives are sent alive (Section 10 of [RFC5245], [RFC6263]), those keepalives are sent
as STUN Indications which are send-and-forget, and do not evoke a as STUN Indications which are send-and-forget, and do not evoke a
response. A response is necessary both for consent to continue response. A response is necessary for consent to continue sending
sending traffic, as well as to verify session liveness. Thus, we traffic. Thus, we need a request/response mechanism for consent
need a request/response mechanism for consent freshness. ICE can be freshness. ICE can be used for that mechanism because ICE
used for that mechanism because ICE implementations are already implementations are already required to continue listening for ICE
required to continue listening for ICE messages, as described in messages, as described in section 10 of [RFC5245]. If consent is
section 10 of [RFC5245]. performed then there is no need to send keepalive messages.
4. Solution 4. Solution
There are two ways consent to send traffic is revoked: expiration of There are two ways consent to send traffic is revoked: expiration of
consent and immediate revocation of consent, which are discussed in consent and immediate revocation of consent, which are discussed in
the following sections. the following sections.
4.1. Expiration of Consent 4.1. Expiration of Consent
A WebRTC implementation [I-D.ietf-rtcweb-overview], which implements A WebRTC implementation [I-D.ietf-rtcweb-overview], which implements
full ICE, MUST perform a combined consent freshness and session full ICE, MUST perform consent freshness test using STUN request/
liveness test using STUN request/response as described below: response as described below:
An endpoint MUST NOT send data other than paced STUN connectivity An endpoint MUST NOT send data other than paced STUN connectivity
checks or responses toward any transport address unless the receiving checks or responses toward any transport address unless the receiving
endpoint consents to receive data. That is, no application data endpoint consents to receive data. That is, no application data
(e.g., RTP or DTLS) can be sent until consent is obtained. After a (e.g., RTP or DTLS) can be sent until consent is obtained. After a
successful ICE connectivity check on a particular transport address, successful ICE connectivity check on a particular transport address,
consent MUST be maintained following the procedure described in this consent MUST be maintained following the procedure described in this
document. document.
Explicit consent to send is obtained and maintained by sending an ICE Explicit consent to send is obtained and maintained by sending an
binding request to the remote peer's transport address and receiving STUN binding request to the remote peer's transport address and
a matching, authenticated, non-error ICE binding response from the receiving a matching, authenticated, non-error STUN binding response
remote peer's transport address. These ICE binding requests and from the remote peer's transport address. These STUN binding
responses are authenticated using the same short-term credentials as requests and responses are authenticated using the same short-term
the initial ICE exchange. credentials as the initial ICE exchange.
Note: Although TCP has its own consent mechanism (TCP Note: Although TCP has its own consent mechanism (TCP
acknowledgements), consent is necessary over a TCP connection acknowledgements), consent is necessary over a TCP connection
because it could be translated to a UDP connection (e.g., because it could be translated to a UDP connection (e.g.,
[RFC6062]). [RFC6062]).
Initial consent to send traffic is obtained using ICE. Consent Initial consent to send traffic is obtained using ICE. Consent
expires after 30 seconds. That is, if a valid STUN binding response expires after 30 seconds. That is, if a valid STUN binding response
corresponding to any STUN request sent in the last 30 seconds has not corresponding to any STUN request sent in the last 30 seconds has not
been received from the remote peer's transport address, the endpoint been received from the remote peer's transport address, the endpoint
MUST cease transmission on that 5-tuple. STUN consent responses MUST cease transmission on that 5-tuple. STUN consent responses
received after consent expiry do not re-establish consent, and may be received after consent expiry do not re-establish consent, and may be
discarded or cause an ICMP error. discarded or cause an ICMP error.
To prevent expiry of consent, a STUN binding request can be sent To prevent expiry of consent, a STUN binding request can be sent
periodically. To prevent synchronization of consent checks, each periodically. To prevent synchronization of consent checks, each
interval MUST be randomized from between 0.8 and 1.2 times the basic interval MUST be randomized from between 0.8 and 1.2 times the basic
period. Implementations SHOULD set a default interval of 5 seconds, period. Implementations SHOULD set a default interval of 5 seconds,
resulting in a period between checks of 4 to 6 seconds. resulting in a period between checks of 4 to 6 seconds.
Each STUN binding request for consent MUST use a new and Each STUN binding request for consent MUST use a new
cryptographically strong [RFC4086] STUN transaction ID. Each STUN cryptographically strong [RFC4086] STUN transaction ID. Each STUN
binding requests for consent is transmitted once only. Hence, the binding requests for consent is transmitted once only. Hence, the
sender cannot assume that it will receive a response for each consent sender cannot assume that it will receive a response for each consent
request, or that responses will be ordered, since there could be request, and a response might be for a previous request (rather than
unreliable or unordered transports on the path. Each STUN for the most recently sent request). Consent expiration causes
transaction ID is maintained until consent expires or a response is immediate termination of all outstanding STUN consent transactions.
received for either this transaction or a more recent transaction. Each STUN transaction is maintained until one of the following
criteria is fulfilled:
o A STUN response associated with the transaction is received; or
o A STUN response associated to a newer transaction is received.
To meet the security needs of consent, an untrusted application To meet the security needs of consent, an untrusted application
(e.g., JavaScript or signaling servers) MUST NOT be able to obtain or (e.g., JavaScript or signaling servers) MUST NOT be able to obtain or
control the STUN transaction ID, because that enables spoofing of control the STUN transaction ID, because that enables spoofing of
STUN responses, falsifying consent. STUN responses, falsifying consent.
During ICE restart consent checks MUST continue to be sent on To prevent attacks on the peer during ICE restart, an endpoint that
previously validated pair, and MUST be responded to on the previously continues to send traffic on the previously validated candidate pair
validated pair, until ICE restart completes. during ICE restart MUST continue to perform consent freshness on that
candidate pair as described earlier.
While TCP affords some protection from off-path attackers ([RFC5961], While TCP affords some protection from off-path attackers ([RFC5961],
[RFC4953]), there is still a risk an attacker could cause a TCP [RFC4953]), there is still a risk an attacker could cause a TCP
sender to send forever by spoofing ACKs. To prevent such an attack, sender to send forever by spoofing ACKs. To prevent such an attack,
consent checks MUST be performed over all transport connections, consent checks MUST be performed over all transport connections,
including TCP. In this way, an off-path attacker spoofing TCP including TCP. In this way, an off-path attacker spoofing TCP
segments can not cause a TCP sender to send once the consent timer segments can not cause a TCP sender to send once the consent timer
expires (30 seconds). expires (30 seconds).
An endpoint that is not sending any application data does not need to An endpoint that is not sending any application data does not need to
skipping to change at page 6, line 5 skipping to change at page 6, line 5
TCP FIN) does not indicate revocation of consent. Thus, an endpoint TCP FIN) does not indicate revocation of consent. Thus, an endpoint
receiving an unauthenticated end-of-session message SHOULD continue receiving an unauthenticated end-of-session message SHOULD continue
sending media (over connectionless transport) or attempt to re- sending media (over connectionless transport) or attempt to re-
establish the connection (over connection-oriented transport) until establish the connection (over connection-oriented transport) until
consent expires or it receives an authenticated message revoking consent expires or it receives an authenticated message revoking
consent. consent.
Note that an authenticated SRTCP BYE does not terminate consent; it Note that an authenticated SRTCP BYE does not terminate consent; it
only indicates the associated SRTP source has quit. only indicates the associated SRTP source has quit.
5. Connection Liveness 5. DiffServ Treatment for Consent
Regular consent checks have the side effect of indicating liveness
for the selected 5-tuple. This allows for the timely detection of
network faults. A connection is considered "live" if authenticated
messages are received from a remote endpoint within a given period.
To support this use case, an application MAY be provided a means to
request a notification when there are no authenticated messages
received for a certain period.
An application MAY also be provided a means to alter the basic
consent check period from the default value (the suggested value
being 5s) to any value up to 24 seconds. This ensures that
connectivity checks are not generated at an excessive rate and that
at least one consent check is sent every 30 seconds, allowing for the
maximal 1.2 times variation. Note that increasing the consent check
period increases the risk of packet loss causing consent expiration.
Sending consent checks (heartbeats) at a high rate could allow a
malicious application to generate congestion, so applications MUST
NOT send consent checks at an average rate of more than 1 per second.
6. DiffServ Treatment for Consent
It is RECOMMENDED that STUN consent checks use the same Diffserv It is RECOMMENDED that STUN consent checks use the same Diffserv
Codepoint markings as the ICE connectivity checks described in Codepoint markings as the ICE connectivity checks described in
Section 7.1.2.4 of [RFC5245] for a given 5-tuple. Section 7.1.2.4 of [RFC5245] for a given 5-tuple.
Note: It is possible that different Diffserv Codepoints are used by Note: It is possible that different Diffserv Codepoints are used by
different media over the same transport address different media over the same transport address
[I-D.ietf-tsvwg-rtcweb-qos]. Such a case is outside the scope of [I-D.ietf-tsvwg-rtcweb-qos]. Such a case is outside the scope of
this document. this document.
6. DTLS applicability
The DTLS applicability is identical to what is described in
Section 4.2 of [RFC7350].
7. API Recommendations 7. API Recommendations
The W3C specification MAY provide the following API points to provide The W3C specification MAY provide the following API points to provide
feedback and control over consent: feedback and control over consent:
1. Generate an event when consent has expired for a given 5-tuple, 1. Generate an event when consent has expired for a given 5-tuple,
meaning that transmission of data has ceased. This could meaning that transmission of data has ceased. This could
indicate what application data is affected, such as media or data indicate what application data is affected, such as media or data
channels. channels.
2. Ability to set the consent check interval from its default
(recommended: 5 seconds) to any value between 1 second and 24
seconds.
8. Security Considerations 8. Security Considerations
This document describes a security mechanism. This document describes a security mechanism.
The security considerations discussed in [RFC5245] should also be The security considerations discussed in [RFC5245] should also be
taken into account. taken into account.
SRTP is encrypted and authenticated with symmetric keys; that is, SRTP is encrypted and authenticated with symmetric keys; that is,
both sender and receiver know the keys. With two party sessions, both sender and receiver know the keys. With two party sessions,
receipt of an authenticated packet from the single remote party is a receipt of an authenticated packet from the single remote party is a
skipping to change at page 7, line 32 skipping to change at page 7, line 13
sufficient to verify consent. sufficient to verify consent.
9. IANA Considerations 9. IANA Considerations
This document does not require any action from IANA. This document does not require any action from IANA.
10. Acknowledgement 10. Acknowledgement
Thanks to Eric Rescorla, Harald Alvestrand, Bernard Aboba, Magnus Thanks to Eric Rescorla, Harald Alvestrand, Bernard Aboba, Magnus
Westerland, Cullen Jennings, Christer Holmberg, Simon Perreault, Paul Westerland, Cullen Jennings, Christer Holmberg, Simon Perreault, Paul
Kyzivat, Emil Ivov, and Jonathan Lennox for their valuable inputs and Kyzivat, Emil Ivov, Jonathan Lennox, Inaki Baz Castillo, Rajmohan
comments. Banavi and Christian Groves for their valuable inputs and comments.
Thanks to Christer Holmberg for doing a through review.
11. References 11. References
11.1. Normative References 11.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness
Requirements for Security", BCP 106, RFC 4086, June 2005. Requirements for Security", BCP 106, RFC 4086, June 2005.
[RFC5245] Rosenberg, J., "Interactive Connectivity Establishment [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment
(ICE): A Protocol for Network Address Translator (NAT) (ICE): A Protocol for Network Address Translator (NAT)
Traversal for Offer/Answer Protocols", RFC 5245, April Traversal for Offer/Answer Protocols", RFC 5245, April
2010. 2010.
[RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for
Keeping Alive the NAT Mappings Associated with RTP / RTP
Control Protocol (RTCP) Flows", RFC 6263, June 2011.
11.2. Informative References 11.2. Informative References
[I-D.ietf-avtcore-srtp-ekt] [I-D.ietf-avtcore-srtp-ekt]
Mattsson, J., McGrew, D., and D. Wing, "Encrypted Key Mattsson, J., McGrew, D., and D. Wing, "Encrypted Key
Transport for Secure RTP", draft-ietf-avtcore-srtp-ekt-03 Transport for Secure RTP", draft-ietf-avtcore-srtp-ekt-03
(work in progress), October 2014. (work in progress), October 2014.
[I-D.ietf-rtcweb-overview] [I-D.ietf-rtcweb-overview]
Alvestrand, H., "Overview: Real Time Protocols for Alvestrand, H., "Overview: Real Time Protocols for
Browser-based Applications", draft-ietf-rtcweb-overview-13 Browser-based Applications", draft-ietf-rtcweb-overview-13
skipping to change at page 8, line 42 skipping to change at page 8, line 24
4953, July 2007. 4953, July 2007.
[RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's [RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's
Robustness to Blind In-Window Attacks", RFC 5961, August Robustness to Blind In-Window Attacks", RFC 5961, August
2010. 2010.
[RFC6062] Perreault, S. and J. Rosenberg, "Traversal Using Relays [RFC6062] Perreault, S. and J. Rosenberg, "Traversal Using Relays
around NAT (TURN) Extensions for TCP Allocations", RFC around NAT (TURN) Extensions for TCP Allocations", RFC
6062, November 2010. 6062, November 2010.
[RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for [RFC7350] Petit-Huguenin, M. and G. Salgueiro, "Datagram Transport
Keeping Alive the NAT Mappings Associated with RTP / RTP Layer Security (DTLS) as Transport for Session Traversal
Control Protocol (RTCP) Flows", RFC 6263, June 2011. Utilities for NAT (STUN)", RFC 7350, August 2014.
Authors' Addresses Authors' Addresses
Muthu Arul Mozhi Perumal Muthu Arul Mozhi Perumal
Ericsson Ericsson
Ferns Icon Ferns Icon
Doddanekundi, Mahadevapura Doddanekundi, Mahadevapura
Bangalore, Karnataka 560037 Bangalore, Karnataka 560037
India India
Email: muthu.arul@gmail.com Email: muthu.arul@gmail.com
Dan Wing Dan Wing
 End of changes. 25 change blocks. 
76 lines changed or deleted 62 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/