<?xml version="1.0" encoding="US-ASCII"?>
<!-- used v2 -->

<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc toc="yes" ?>
<?rfc rfcedstyle="yes" ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" []>

<!-- [rfced] FYI, we have used xml2rfc v2 (available from
     http://xml.resource.org) to convert this document to text. -->


<rfc number="7065" category="std" ipr="trust200902" submissionType="IETF" consensus="yes">
	<front>
		<title abbrev="TURN URIs">Traversal Using Relays around NAT (TURN) Uniform Resource Identifiers</title>

		<author fullname="Marc Petit-Huguenin" initials="M." surname="Petit-Huguenin">
			<organization>Impedance Mismatch</organization>

			<address>
				<email>petithug@acm.org</email>
			</address>
		</author>

		<author fullname="Suhas Nandakumar" initials="S." surname="Nandakumar">
			<organization>Cisco Systems</organization>

			<address>
				<postal>
					<street>170 West Tasman Drive</street>
					<city>San Jose</city>
					<region>CA</region>
					<code>95134</code>
					<country>US</country>
				</postal>

				<email>snandaku@cisco.com</email>
			</address>
		</author>

		<author fullname="Gonzalo Salgueiro" initials="G." surname="Salgueiro">
			<organization>Cisco Systems</organization>

			<address>
				<postal>
					<street>7200-12 Kit Creek Road</street>
					<city>Research Triangle Park</city>
					<region>NC</region>
					<code>27709</code>
					<country>US</country>
				</postal>

				<email>gsalguei@cisco.com</email>
			</address>
		</author>

		<author fullname="Paul E. Jones" initials="P." surname="Jones">
			<organization>Cisco Systems</organization>

			<address>
				<postal>
					<street>7025 Kit Creek Road</street>
					<city>Research Triangle Park</city>
					<region>NC</region>
					<code>27709</code>
					<country>US</country>
				</postal>

				<email>paulej@packetizer.com</email>
			</address>
		</author>

		<date month="November" year="2013"/>
		<area>TSV</area>
		<workgroup>BEHAVE</workgroup>

<!-- [rfced] Please insert any keywords (beyond those that appear in 
the title) for use on http://www.rfc-editor.org/search/rfc_search.php. -->

		<abstract>
			<t>
				This document specifies the syntax of Uniform Resource Identifier (URI) schemes for the Traversal Using Relays around NAT (TURN) protocol.
				It defines two URI schemes to
				provision the TURN Resolution
				Mechanism (RFC 5928).
			</t>
		</abstract>
	</front>

	<middle>
		<section anchor="section.intro" title="Introduction">
			<t>This document specifies the syntax and semantics of the Uniform Resource Identifier (URI) scheme for the Traversal Using Relays around NAT (TURN) protocol.</t>

			<t>
				The TURN protocol is a specification allowing hosts behind NAT to control the operation of a relay server.
				The relay server allows hosts to exchange packets with its peers.
				The peers themselves may also be behind NATs.
				<xref target="RFC5766">RFC 5766</xref> defines the specifics of the TURN protocol.
			</t>

			<t>
				The "turn" and "turns" URI schemes are used to designate a TURN server (also known as a relay) on Internet hosts accessible using the TURN protocol.
				With the advent of standards such as WebRTC <xref target="WEBRTC"/>, we anticipate a plethora of endpoints and web applications to be able to identify and communicate with such a TURN server to carry out the TURN protocol.


   This implies that endpoints and/or applications must be provisioned
   with the appropriate configuration to identify the TURN server.

  Having an inconsistent syntax adds ambiguity and can result in
non-interoperable solutions and
  implementation limitations.  The "turn" and "turns" URI schemes help
  alleviate most of these issues by providing a consistent way to
  describe, configure, and exchange the information identifying a TURN
  server.
		
			</t>

			<t>
<xref target="RFC5928"/> defines a resolution mechanism to convert a secure flag, a host name or IP address, a potentially empty port, and a potentially empty transport to a list of IP address, port, and TURN transport tuples.</t>

			<t>To simplify the provisioning of TURN clients, this document defines the "turn" and "turns" URI schemes that can carry the four components needed for the resolution mechanism.</t>
		</section>

		<section anchor="section.terminology" title="Terminology">
			<t>
				The key words "MUST", "MUST NOT", "REQUIRED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="RFC2119"/> when they appear in ALL CAPS.
				When these words are not in ALL CAPS (such as "should" or "Should"), they have their usual English meanings, and are not to be interpreted as RFC 2119 key words.
			</t>
		</section>

		<section anchor="section.definition" title="Definitions of the &quot;turn&quot; and &quot;turns&quot; URI">
			<section anchor="section.definition.syntax" title="URI Scheme Syntax">
				<t>The &quot;turn&quot; and &quot;turns&quot; URIs have the following formal ABNF syntax <xref target="RFC5234"/>:</t>

				<figure>
					<artwork type="abnf"><![CDATA[
turnURI       = scheme ":" host [ ":" port ]
                [ "?transport=" transport ]
scheme        = "turn" / "turns"
transport     = "udp" / "tcp" / transport-ext
transport-ext = 1*unreserved]]>
					</artwork>
				</figure>

				<t>
					&lt;host&gt; and &lt;port&gt; are specified in <xref target="RFC3986"/>.
					While these two ABNF productions are defined in <xref target="RFC3986"/> as components of the generic hierarchical URI, this does not imply that the "turn" and "turns" schemes are hierarchical URIs.
					Developers MUST NOT use a generic hierarchical URI parser to parse a "turn" or "turns" URI.
				</t>

				<t>
					The &lt;host&gt;, &lt;port&gt;, and &lt;transport&gt; components are passed without modification to the <xref target="RFC5928"/> algorithm.
					&lt;secure&gt; is set to false if &lt;scheme&gt; is equal to "turn", and set to true if &lt;scheme&gt; is equal to "turns" and passed to the <xref target="RFC5928"/> algorithm with the other components.
				</t>
			</section>

			<section anchor="section.definition.semantics" title="URI Scheme Semantics">
				<t>
					The "turn" and "turns" URI schemes are used to designate a TURN server (also known as a relay) on Internet hosts accessible using the TURN protocol.
					The TURN protocol supports sending messages over UDP, TCP, or TLS-over-TCP.
					The "turns" URI scheme MUST be used when TURN is run over TLS-over-TCP (or, in the future, DTLS-over-UDP), and the "turn" scheme MUST be used otherwise.
				</t>

				<t>The required &lt;host&gt; part of the "turn" URI denotes the TURN server host.</t>

				<t>
					As specified in <xref target="RFC5766"/> and <xref target="RFC5928"/>, the &lt;port&gt; part, if present, denotes the port on which the TURN server is awaiting connection requests.
					If it is absent, the default port is 3478 for both UDP and TCP.
					The default port for TURN over TLS is 5349.
				</t>
			</section>
		</section>

		<section anchor="section.security" title="Security Considerations">
			<t>
				Security considerations for the resolution mechanism are discussed in Section 5 of <xref target="RFC5928"/>.
				Note that this section contains normative text defining authentication procedures to be followed by turn clients when TLS is used.
			</t>

			<t>The "turn" and "turns" URI schemes do not introduce any specific security issues beyond the security considerations discussed in <xref target="RFC3986"/>.</t>

			<t>
				Although a "turn" or "turns" URI does not itself include the username or password that will be used to authenticate the TURN client, in certain environments, such as WebRTC, the username and password will almost certainly be provisioned remotely by an external agent at the same time as a "turns" URI is sent to that client.
				Thus, in such situations, if the
				username and password were received in
				the clear, there would be little or no benefit to using a "turns" URI.
				For this reason, a TURN client MUST ensure that the username, password, "turns" URI, and any other security-relevant parameters are received with equivalent security before using the "turns" URI.
				Receiving those parameters over another TLS session can provide the appropriate level of security, if both TLS sessions are similarly parameterised, e.g.,  with commensurate strength ciphersuites.
			</t>
		</section>

		<section anchor="section.iana" title="IANA Considerations">
			<t>This section contains the registration information
for the "turn" and "turns" URI Schemes (in accordance with <xref
target="RFC4395"/>).</t> 

			<section title="&quot;turn&quot; URI Registration">
				<t>URI scheme name: turn</t>
				<t>Status: permanent</t>
				<t>URI scheme syntax: See <xref target="section.definition.syntax"/>.</t>
				<t>URI scheme semantics: See <xref target="section.definition.semantics"/>.</t>
				<t>Encoding considerations: There are no encoding considerations beyond those in <xref target="RFC3986"/>.</t>
				<t>Applications/protocols that use this URI scheme name:</t>
				<t>
					<list>
						<t>The "turn" URI scheme is intended to be used by applications with a need to identify a TURN server to be used for NAT traversal.</t>
					</list>
				</t>
				<t>Interoperability considerations: N/A</t>
				<t>Security considerations: See <xref target="section.security"/>.</t>
				<t>Contact: Marc Petit-Huguenin &lt;petithug@acm.org&gt;</t>
				<t>Author/Change controller: The IESG</t>
				<t>References: RFC 7065</t>
			</section>

			<section title="&quot;turns&quot; URI Registration">
				<t>URI scheme name: turns</t>
				<t>Status: permanent</t>
				<t>URI scheme syntax: See <xref target="section.definition.syntax"/>.</t>
				<t>URI scheme semantics: See <xref target="section.definition.semantics"/>.</t>
				<t>Encoding considerations: There are no encoding considerations beyond those in <xref target="RFC3986"/>.</t>
				<t>Applications/protocols that use this URI scheme name:</t>
				<t>
					<list>
						<t>The "turns" URI scheme is intended to be used by applications with a need to identify a TURN server to be used for NAT traversal over a secure connection.</t>
					</list>
				</t>

				<t>Interoperability considerations: N/A</t>
				<t>Security considerations: See <xref target="section.security"/>.</t>
				<t>Contact: Marc Petit-Huguenin &lt;petithug@acm.org&gt;</t>
				<t>Author/Change controller: The IESG</t>
				<t>References: RFC 7065</t>
			</section>
		</section>

		<section anchor="section.acknowledgements" title="Acknowledgements">
			<t>Thanks to Margaret Wasserman, Magnus
			Westerlund, Juergen Schoenwaelder, Sean
			Turner, Ted Hardie, Dave Thaler, Alfred
			E. Heggestad, Eilon Yardeni, Dan Wing, Alfred
			Hoenes, and Jim Kleck for the comments,
			suggestions, and questions that helped improve
"Traversal Using Relays around NAT (TURN) Uniform Resource
			Identifiers" by M. Petit-Huguenin
			(October 2011).
			</t>
<!-- draft-petithuguenin-behave-turn-uri-bis -->

			<t>Many thanks to Cullen Jennings for his
			detailed review and thoughtful comments on
			"URI Scheme for Traversal Using Relays around
			NAT (TURN) Protocol" by S. Nandakumar, et al. (October 2011).</t>
<!-- draft-nandakumar-rtcweb-turn-uri-00 -->

			<t>Thanks to Bjoern Hoehrmann, Dan Wing, Russ Housley, S. Moonesamy, Graham Klyne, Harald Alvestrand, Hadriel Kaplan, Tina Tsou, Spencer Dawkins, Ted Lemon, Barry Leiba, Pete Resnick, and Stephen Farrell for the comments, suggestions, and questions that helped improve this document.</t>

			<t>
				The authors would also like to express their gratitude to Dan Wing for his assistance in shepherding this document.
				We also want to thank Gonzalo
				Camarillo, the Real-time Applications
				and Infrastructure Area Director, for
sponsoring this document as well as his careful reviews.
			</t>
		</section>
	</middle>

	<back>
		<references title="Normative References">
			<reference anchor="RFC2119">
	
	<front>
	<title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
	<author fullname="Scott Bradner" initials="S." surname="Bradner">
	<organization>Harvard University</organization>
	<address>
	<postal>
	<street>1350 Mass. Ave.</street>
	<street>Cambridge</street>
	<street>MA 02138</street>
</postal>
	<phone>- +1 617 495 3864</phone>
	<email>sob@harvard.edu</email>
</address>
</author>
	<date month="March" year="1997"/>
	<area>General</area>
	<keyword>keyword</keyword>
	<abstract>
	<t>
	   In many standards track documents several words are used to signify
	   the requirements in the specification.  These words are often
	   capitalized.  This document defines these words as they should be
	   interpreted in IETF documents.  Authors who follow these guidelines
	   should incorporate this phrase near the beginning of their document:
	
	<list>
	<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
	      RFC 2119.
	</t>
</list>
</t>
	<t>
	   Note that the force of these words is modified by the requirement
	   level of the document in which they are used.
	</t>
</abstract>
</front>
	
	<seriesInfo name="BCP" value="14"/>
	<seriesInfo name="RFC" value="2119"/>
	<format octets="4723" target="ftp://ftp.isi.edu/in-notes/rfc2119.txt" type="TXT"/>
	<format octets="17491" target="http://xml.resource.org/public/rfc/html/rfc2119.html" type="HTML"/>
	<format octets="5777" target="http://xml.resource.org/public/rfc/xml/rfc2119.xml" type="XML"/>
	</reference>

			<reference anchor="RFC3986">
	
	<front>
	<title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
	<author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
	<organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
	<address>
	<postal>
	<street>Massachusetts Institute of Technology</street>
	<street>77 Massachusetts Avenue</street>
	<city>Cambridge</city>
	<region>MA</region>
	<code>02139</code>
	<country>USA</country>
</postal>
	<phone>+1-617-253-5702</phone>
	<facsimile>+1-617-258-5999</facsimile>
	<email>timbl@w3.org</email>
	<uri>http://www.w3.org/People/Berners-Lee/</uri>
</address>
</author>
	<author fullname="Roy T. Fielding" initials="R." surname="Fielding">
	<organization abbrev="Day Software">Day Software</organization>
	<address>
	<postal>
	<street>5251 California Ave., Suite 110</street>
	<city>Irvine</city>
	<region>CA</region>
	<code>92617</code>
	<country>USA</country>
</postal>
	<phone>+1-949-679-2960</phone>
	<facsimile>+1-949-679-2972</facsimile>
	<email>fielding@gbiv.com</email>
	<uri>http://roy.gbiv.com/</uri>
</address>
</author>
	<author fullname="Larry Masinter" initials="L." surname="Masinter">
	<organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
	<address>
	<postal>
	<street>345 Park Ave</street>
	<city>San Jose</city>
	<region>CA</region>
	<code>95110</code>
	<country>USA</country>
</postal>
	<phone>+1-408-536-3024</phone>
	<email>LMM@acm.org</email>
	<uri>http://larry.masinter.net/</uri>
</address>
</author>
	<date month="January" year="2005"/>
	<area>Applications</area>
	<keyword>uniform resource identifier</keyword>
	<keyword>URI</keyword>
	<keyword>URL</keyword>
	<keyword>URN</keyword>
	<keyword>WWW</keyword>
	<keyword>resource</keyword>
	<abstract>
	<t>
	A Uniform Resource Identifier (URI) is a compact sequence of characters
	that identifies an abstract or physical resource.  This specification
	defines the generic URI syntax and a process for resolving URI references
	that might be in relative form, along with guidelines and security
	considerations for the use of URIs on the Internet.
	The URI syntax defines a grammar that is a superset of all valid URIs,
	allowing an implementation to parse the common components of a URI
	reference without knowing the scheme-specific requirements of every
	possible identifier.  This specification does not define a generative
	grammar for URIs; that task is performed by the individual
	specifications of each URI scheme.
	</t>
</abstract>
</front>
	
	<seriesInfo name="STD" value="66"/>
	<seriesInfo name="RFC" value="3986"/>
	<format octets="141811" target="ftp://ftp.isi.edu/in-notes/rfc3986.txt" type="TXT"/>
	<format octets="213584" target="http://xml.resource.org/public/rfc/html/rfc3986.html" type="HTML"/>
	<format octets="163534" target="http://xml.resource.org/public/rfc/xml/rfc3986.xml" type="XML"/>
	</reference>

			<reference anchor="RFC5234">
	
	<front>
	<title>Augmented BNF for Syntax Specifications: ABNF</title>
	<author fullname="D. Crocker" initials="D." surname="Crocker">
	<organization/>
</author>
	<author fullname="P. Overell" initials="P." surname="Overell">
	<organization/>
</author>
	<date month="January" year="2008"/>
</front>
	
	<seriesInfo name="STD" value="68"/>
	<seriesInfo name="RFC" value="5234"/>
	<format octets="26359" target="ftp://ftp.isi.edu/in-notes/rfc5234.txt" type="TXT"/>
	</reference>

			<reference anchor="RFC5766">
	
	<front>
	<title>Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)</title>
	<author fullname="R. Mahy" initials="R." surname="Mahy">
	<organization/>
</author>
	<author fullname="P. Matthews" initials="P." surname="Matthews">
	<organization/>
</author>
	<author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
	<organization/>
</author>
	<date month="April" year="2010"/>
</front>
	
	<seriesInfo name="RFC" value="5766"/>
	<format octets="172112" target="ftp://ftp.isi.edu/in-notes/rfc5766.txt" type="TXT"/>
	</reference>

			<reference anchor="RFC5928">
	
	<front>
	<title>Traversal Using Relays around NAT (TURN) Resolution Mechanism</title>
	<author fullname="M. Petit-Huguenin" initials="M." surname="Petit-Huguenin">
	<organization/>
</author>
	<date month="August" year="2010"/>
</front>
	
	<seriesInfo name="RFC" value="5928"/>
	<format octets="23993" target="ftp://ftp.isi.edu/in-notes/rfc5928.txt" type="TXT"/>
	</reference>

		</references>

		<references title="Informative References">
			<reference anchor="RFC4395">
	
	<front>
	<title>Guidelines and Registration Procedures for New URI Schemes</title>
	<author fullname="T. Hansen" initials="T." surname="Hansen">
	<organization/>
</author>
	<author fullname="T. Hardie" initials="T." surname="Hardie">
	<organization/>
</author>
	<author fullname="L. Masinter" initials="L." surname="Masinter">
	<organization/>
</author>
	<date month="February" year="2006"/>
</front>
	
	<seriesInfo name="BCP" value="35"/>
	<seriesInfo name="RFC" value="4395"/>
	<format octets="31933" target="ftp://ftp.isi.edu/in-notes/rfc4395.txt" type="TXT"/>
	</reference>


			<reference anchor="WEBRTC" target="http://www.w3.org/TR/2012/WD-webrtc-20120821">
				<front>
					<title>WebRTC 1.0: Real-time Communication Between Browsers</title>

					<author fullname="Adam Bergkvist" initials="A." surname="Bergkvist">
						<organization/>
					</author>

					<author fullname="Daniel C. Burnett" initials="D." surname="Burnett">
						<organization/>
					</author>

					<author fullname="Cullen Jennings" initials="C." surname="Jennings">
						<organization/>
					</author>

					<author fullname="Anant Narayanan" initials="A." surname="Narayanan">
						<organization/>
					</author>

					<date day="21" month="August" year="2012"/>
				</front>

				<seriesInfo name="World Wide Web Consortium WD" value="WD-webrtc-20120821"/>
				<format target="http://www.w3.org/TR/2012/WD-webrtc-20120821" type="HTML"/>
			</reference>


		</references>

		<section anchor="section.examples" title="Examples">
			<t>
				<xref target="example.1"/> shows how the &lt;secure&gt;, &lt;port&gt;, and &lt;transport&gt; components are populated from various URIs.
				For all these examples, the &lt;host&gt; component is populated with "example.org".
			</t>

			<texttable anchor="example.1">
				<ttcol>URI</ttcol>
				<ttcol>&lt;secure&gt;</ttcol>
				<ttcol>&lt;port&gt;</ttcol>
				<ttcol>&lt;transport&gt;</ttcol>
				<c>turn:example.org</c> <c>false</c> <c/> <c/>
				<c>turns:example.org</c> <c>true</c> <c/> <c/>
				<c>turn:example.org:8000</c> <c>false</c> <c>8000</c> <c/>
				<c>turn:example.org?transport=udp</c> <c>false</c> <c/> <c>UDP</c>
				<c>turn:example.org?transport=tcp</c> <c>false</c> <c/> <c>TCP</c>
				<c>turns:example.org?transport=tcp</c> <c>true</c> <c/> <c>TLS</c>
			</texttable>
		</section>

		<section title="Design Notes">
			<t>
				<list style="symbols">
					<t>
						One recurring comment
						was to stop using the
						suffix "s" on the URI scheme, and to move the secure option to a parameter (e.g. ";proto=tls").
						We decided against this idea because the STUN URI does not have a ";proto=" parameter and we would have lost the symmetry between the TURN and STUN URIs.

					</t>

					<t>Following the advice of Section 2.2
of RFC 4395, and because the TURN URI does not describe a hierarchical structure, the TURN URIs are opaque URIs.</t>

					<t>
						&lt;password&gt; is not used in the URIs because it is deprecated <xref target="RFC3986"/>.
						&lt;username&gt; and &lt;auth&gt; are not used in the URIs because they do not guide the resolution mechanism.
					</t>

					<t>As discussed at IETF 72 in Dublin, there are no generic parameters in the URI to prevent compatibility issues.</t>
				</list>
			</t>
		</section>

	</back>
</rfc>
