Network Working Group D. Cridland Request for Comments: 5524 Isode Limited Category: Standards Track May 2009
Extended URLFETCH for Binary and Converted Parts
Status of This Memo
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
Copyright (c) 2009 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 in effect on the date of publication of this document (http://trustee.ietf.org/license-info). Please review these documents carefully, as they describe your rights and restrictions with respect to this document.
The URLFETCH command defined as part of URLAUTH provides a mechanism for third parties to gain access to data held within messages in a user's private store; however, this data is sent verbatim, which is not suitable for a number of applications. This memo specifies a method for obtaining data in forms suitable for non-mail applications.
Although [URLAUTH] provides a URLFETCH command that can be used to dereference a URL and return the body-part data, it does so by returning the encoded form, without sufficient metadata to decode. This is suitable for use in mail applications such as [BURL], where the encoded form is suitable, but not where access to the actual content is required, such as in [STREAMING].
This memo specifies a mechanism that returns additional metadata about the part, such as its [MEDIATYPE] type, as well as removes any content transfer encoding that was used on the body part.
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 [KEYWORDS].
Protocol examples are line-wrapped for clarity. Protocol strings are prefixed with C: and S: for client and server respectively, and elided data is represented by [...]. Implementors should note these notations are for editorial clarity only.
The URLFETCH command is extended by the provision of optional parameters. The extended URLFETCH command is distinct by enclosing each URL and associated parameters in a parenthesized list. Cases where there is an absence of any parameters or where the URL is sent unenclosed cause the command to behave precisely as specified in [URLAUTH].
Similarly, if the URL is invalid, the command will behave precisely as specified in [URLAUTH] and return a simple NIL.
Available parameters are:
BODYPARTSTRUCTURE Provide a BODYPARTSTRUCTURE.
BODYPARTSTRUCTURE is defined in [CONVERT] and provides metadata useful for processing applications, such as the type of data.
BINARY Provide the data without any Content-Transfer-Encoding.
In particular, this means that the data MAY contain NUL octets and not be formed from textual lines. Data containing NUL octets MUST be transferred using the literal8 syntax defined in [BINARY].
BODY Provide the data as-is.
This will provide the same data as the unextended [URLAUTH] as a metadata item.
Metadata items MUST NOT appear more than once per URL requested, and clients MUST NOT request both BINARY and BODY.
In order to carry any requested metadata and provide additional information to the consumer, the URLFETCH response is similarly extended.
Following the URL itself, servers will include a series of parenthesized metadata elements. Defined metadata elements are as follows:
Cridland Standards Track [Page 3]
RFC 5524 URLFETCH Binary May 2009
BODYPARTSTRUCTURE The BODYPARTSTRUCTURE provides information about the data contained in the response, as it has been returned. It will reflect any conversions or decoding that have taken place. In particular, this will show an identity encoding if BINARY is also requested.
BINARY The BINARY item provides the content, without any content transfer encoding applied. If this is not possible (for example, the content transfer encoding is unknown to the server), then this MAY contain NIL. Servers MUST understand all identity content transfer encodings defined in [MIME], as well as the transformation encodings "Base64" [BASE64] and "Quoted-Printable" [MIME].
BODY The BODY item provides the content as found in the message, with any content transfer encoding still applied. Requesting only the BODY will provide equivalent functionality to the unextended [URLAUTH], however, using the extended syntax described herein.
Note that unlike [CONVERT], BODYPARTSTRUCTURE is not appended with the part specifier, as this is implicit in the URL.
Implementors are directed to the security considerations within [IMAP], [URLAUTH], and [BINARY].
The ability of the holder of a URL to be able to fetch metadata about the content pointed to by the URL as well as the content itself allows a potential attacker to discover more about the content than was previously possible, including its original filename and user- supplied description.
The additional value of this information to an attacker is marginal, and applies only to those URLs for which the attacker does not have direct access, such as those produced by [URLAUTH]. Implementors are therefore directed to the security considerations present in [URLAUTH].
Comments were received on this idea and/or document from Neil Cook, Philip Guenther, Alexey Melnikov, Ken Murchison, and others. Whether in agreement or dissent, the comments have refined and otherwise influenced this document.