INTERNET-DRAFT M. Yevstifeyev Intended Status: Standards Track May 20, 2011 Updates: 959, 1738 (if approved) Expires: November 21, 2011 The 'ftp' URI Scheme draft-yevstifeyev-ftp-uri-scheme-00 Abstract This document specifies the 'ftp' Uniform Resource Identifier (URI) scheme, that is used to refer to resources accessible via File Transfer Protocol (FTP). It updates RFC 959 and RFC 1738. Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/1id-abstracts.html The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html Copyright and License Notice Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must Yevstifeyev Expires November 21, 2011 [Page 1] INTERNET DRAFT The 'ftp' URI Scheme May 20, 2011 include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . 3 2. URI Scheme Specification . . . . . . . . . . . . . . . . . . . 3 2.1. URI Scheme Syntax . . . . . . . . . . . . . . . . . . . . . 3 2.2. URI Scheme Semantics . . . . . . . . . . . . . . . . . . . 3 2.2.1. The Part . . . . . . . . . . . . . . . . . 4 2.2.2. The Part . . . . . . . . . . . . . . . . . 5 2.2.3. The Part . . . . . . . . . . . . . . . . . . 5 2.2.3.1. A Note on Part . . . . . . . . . . 5 2.3. Encoding Considerations . . . . . . . . . . . . . . . . . . 5 3. Security Considerations . . . . . . . . . . . . . . . . . . . 6 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 5. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5.1. Normative References . . . . . . . . . . . . . . . . . . . 7 5.2. Informative References . . . . . . . . . . . . . . . . . . 7 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 9 1 Introduction File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one host to another over a TCP-based network. It has had a very long history; the protocol is rooted in the early 1970s, the times of ARPANET, with the first specification being RFC 114 [RFC0114]; however, the most current FTP specification is RFC 959 [RFC0959]. (Also visit Section 4 pf RFC 1123 [RFC1123] for "narrative" description of FTP.) Historically, there has been a Uniform Resource Identifier (URI) scheme for referencing resources accessible via FTP - 'ftp' URI scheme. The first mention of it appears in RFC 1630 [RFC1630] - pre- Standard Track RFC on URIs. Later, RFC 1738 [RFC1738], Section 3.2 specified this scheme on IETF Standards Track. Subsequently, RFC 1738 was formally obsoleted by RFC 4248 [RFC4248] and RFC 4266 [RFC4266]; in fact RFC 2396 [RFC2396] and its successor - RFC 3986 [RFC3986] - replaced and deprecated it (formally they both updated RFC 1738). Currently, almost all of URI schemes specified in RFC 1738 have been given a separate specification; one of the rare exceptions is the 'ftp' URI scheme. This document removes this uncertainty; it gives the 'ftp' URI scheme an official, Standard Yevstifeyev Expires November 21, 2011 [Page 2] INTERNET DRAFT The 'ftp' URI Scheme May 20, 2011 Track documentation. It updates RFC 959 [RFC0959] and RFC 1738 [RFC1738]. Please note that the 'ftp' and 'file' URI schemes are not the same, even though they both might refer to the resource on the local host. Generic URI syntax is described in RFC 3986 [RFC3986]; registration procedures for new URI schemes - in RFC 4395 [RFC4395]. 1.1 Terminology 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 [RFC2119]. 2. URI Scheme Specification 2.1. URI Scheme Syntax The 'ftp' URI takes the form of rule below, specified using Augmented Backus-Naur Form (ABNF) [RFC5234]: ftp-uri = "ftp:" ftp-hier-part ftp-hier-part = "//" [user-pass "@"] host-port [ftp-path] user-pass = user [":" pass] user = *usp-char pass = *usp-char usp-char = *(unreserved / pct-encoded / sub-delims) host-port = host [":" port] ftp-path = path-abempty [typecode-part] typecode-part = ";typecode=" typecode typecode = "a" / "i" / "d" where the , , , , and rules are defined in RFC 3986 [RFC3986], Appendix A. The semantics of each part are defined below, in Section 2.2. 2.2. URI Scheme Semantics The 'ftp' URI specifies either a FTP server for establishing a connection (when is omitted) or a resource on such FTP server (when is present). The application resolving the 'ftp' URI SHALL follow the following algorithm: o Request the password, if not supplied in the URI (per Section Yevstifeyev Expires November 21, 2011 [Page 3] INTERNET DRAFT The 'ftp' URI Scheme May 20, 2011 2.1.1); o Establish the Transmission Control Protocol (TCP) [RFC0793] connection to the resource identified by the on the port identified by the (or 21, if not supplied there); o Authenticate itself to the server, using either the credentials of the URI, those requested from the user or anonymous FTP [RFC1635]; o Perform a series of commands according to part (see Section 2.2.3). 'ftp' URIs may also be used for other operations; for instance, it is possible to update or remove a file on a remote file server. The mechanism for doing so is not specified in this document. Note: The 'ftp' URI scheme supports FTP over TCP only; such derivations as FTP over User Datagram Protocol (UDP) [RFC0768] are not supported by it. More detailed description of each URI's parts' semantics is below. 2.2.1. The Part The part of the 'ftp' URI specifies the user name that will be used for FTP authentication; part - the password. The user name and password SHALL be transmitted using the "USER" and "PASS" FTP commands, respectively, defined in RFC 959 [RFC0959]. The user name and password are delimited by the colon (":") character (ASCII [ASCII] character 0x3A). The part is OPTIONAL in 'ftp' URIs. Thus, if the whole part is omitted, the following "anonymous FTP" convention [RFC1635] SHALL be used: (1) the user name "anonymous"; and (2) the password that is an e-mail address [RFC5322] of the client is supplied. The part in the is OPTIONAL as well. Therefore, if there is a user name but no password supplied in the 'ftp' URI, it SHALL be requested from the user. The and parts of the URI is composed of the characters of ABNF production; any other characters SHALL be percent- encoded if occur in these parts. The rule includes characters allowed in RFC 3986 production, excluding the Yevstifeyev Expires November 21, 2011 [Page 4] INTERNET DRAFT The 'ftp' URI Scheme May 20, 2011 colon (":") character, whose use is explicitly specified above. RFC 3986 deprecated the use of "user:pass" pair in the part of URIs. However, for some historical reasons, the benefits of the use of such construction for denoting the user information are valuable enough to overlook this issue. 2.2.2. The Part The part specifies the FTP server the resource identified by a particular 'ftp' URI is located on. If the ":" is omitted, the port SHALL default to 21, as registered in [IANA-PORTREG]. 2.2.3. The Part The part, which is OPTIONAL, has the following non- normative syntax: //...//;type= where ";type=" is OPTIONAL as well. This part SHALL be interpreted as follows (in this algorithm productions from the aforementioned non-normative syntax are enclosed in angle brackets): (1) each of parts are consistently supplied as arguments to the CWD (change working directory) FTP command after establishing the FTP connection to the server identified by the part of the URI; (2a) if the is equal to "d", the NLST (name list) FTP command (see Section 4.1.3 of RFC 959 [RFC0959]) with as the argument is sent out; (2b) otherwise, the TYPE FTP command (see Section 3.1.1 of RFC 959 [RFC0959]) with the as an argument is performed; and (3) access the file identified by the in an appropriate way. 2.2.3.1. A Note on Part The part has rarely been seen in the wide development. It is not often used in 'ftp' URIs and is included in this specification for historical reasons. Thus, if the is omitted, the client program interpreting the URI SHOULD guess the appropriate mode to use. Yevstifeyev Expires November 21, 2011 [Page 5] INTERNET DRAFT The 'ftp' URI Scheme May 20, 2011 2.3. Encoding Considerations The 'ftp' URIs may contain characters form the Universal Character Set (UCS) [UCS], encoded using UTF-8 character encoding [RFC3629], as suggested by RFC 3986 [RFC3986]. Those octets that do not correspond to the characters in the unreserved set of RFC 3986 SHALL be percent- encoded. In fact, there are no other encoding considerations for 'ftp' URIs not discussed in Section 2 of RFC 3986. Please visit RFC 3536 [RFC3536] for definitions of the terms related to encoding and internalization. 3. Security Considerations Generic security considerations for URIs are discussed in Section 7 of RFC 3986 [RFC3986]. Security considerations for FTP are addressed in RFC 2577 [RFC2577]. RFC 2228 [RFC2228] and RFC 4217 [RFC4217] provided a bunch of ways for securing FTP. 4. IANA Considerations IANA is asked to update the registration of the 'ftp' URI scheme using the following template, per RFC 4395 [RFC4395]: o URI scheme name: ftp o Status: Permanent o URI scheme syntax: see Section 2.1 of RFC xxxx o URI scheme semantics: see Section 2.2 of RFC xxxx o URI scheme encoding considerations: see Section 2.3 of RFC xxxx o Protocols that use the scheme: File Transfer Protocol (FTP) [RFC0959] o Security considerations: see Section 3 of RFC xxxx o Contact: IESG o Author/Change controller: IETF o References: see Section 5 of RFC xxxx Yevstifeyev Expires November 21, 2011 [Page 6] INTERNET DRAFT The 'ftp' URI Scheme May 20, 2011 [RFC Editor: Please replace xxxx with assigned RFC number] 5. References 5.1. Normative References [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981. [RFC0959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 9, RFC 959, October 1985. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003. [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. [RFC5234] Crocker, D., Ed., and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008. 5.2. Informative References [ASCII] American National Standards Institute (ANSI), "Coded Character Set -- 7-bit American Standard Code for Information Interchange", ANSI X3.4, 1986. [IANA-PORTREG] Internet Assigned Numbers Authority (IANA), "Port Numbers". [RFC0114] Bhushan, A., "File Transfer Protocol", RFC 114, April 1971. [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980. [RFC1123] Braden, R., Ed., "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, October 1989. [RFC1630] Berners-Lee, T., "Universal Resource Identifiers in WWW: A Unifying Syntax for the Expression of Names and Addresses Yevstifeyev Expires November 21, 2011 [Page 7] INTERNET DRAFT The 'ftp' URI Scheme May 20, 2011 of Objects on the Network as used in the World-Wide Web", RFC 1630, June 1994. [RFC1635] Deutsch, P., Emtage, A., and A. Marine, "How to Use Anonymous FTP", FYI 24, RFC 1635, May 1994. [RFC1738] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, December 1994. Obsoleted by RFC4248, RFC4266. [RFC2228] Horowitz, M. and S. Lunt, "FTP Security Extensions", RFC 2228, October 1997. [RFC2396] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998. Obsoleted by RFC3986. [RFC2577] Allman, M. and S. Ostermann, "FTP Security Considerations", RFC 2577, May 1999. [RFC3536] Hoffman, P., "Terminology Used in Internationalization in the IETF", RFC 3536, May 2003. [RFC4217] Ford-Hutchinson, P., "Securing FTP with TLS", RFC 4217, October 2005. [RFC4248] Hoffman, P., "The telnet URI Scheme", RFC 4248, October 2005. [RFC4266] Hoffman, P., "The gopher URI Scheme", RFC 4266, November 2005. [RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and Registration Procedures for New URI Schemes", BCP 35, RFC 4395, February 2006. [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, October 2008. [UCS] International Organization for Standardization (ISO), "Information Technology - Universal Multiple-Octet Coded Character Set (UCS)", ISO/IEC Standard 10646, December 2003. Appendix A. Acknowledgments The authors of RFC 1738 were Tim Berners-Lee, Larry Masinter and Mark Yevstifeyev Expires November 21, 2011 [Page 8] INTERNET DRAFT The 'ftp' URI Scheme May 20, 2011 McCahill, who worked on the initial 'ftp' URI scheme definition. Another attempts to specify this URI scheme were undertaken by Paul Hoffman, {who else?}. Considerable input to this document was provided by {TBD}. Authors' Addresses Mykyta Yevstifeyev 8 Kuzovkov St., flat 25 Kotovsk Ukraine EMail: evnikita2@gmail.com Yevstifeyev Expires November 21, 2011 [Page 9]