idnits 2.17.1 draft-hammer-hostmeta-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (May 24, 2010) is 5084 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 5785 (Obsoleted by RFC 8615) Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group E. Hammer-Lahav 3 Internet-Draft Yahoo! 4 Intended status: Informational May 24, 2010 5 Expires: November 25, 2010 7 host-meta: Web Host Metadata 8 draft-hammer-hostmeta-09 10 Abstract 12 This memo describes a method for locating host metadata for Web-based 13 protocols. 15 Status of this Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at http://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on November 25, 2010. 32 Copyright Notice 34 Copyright (c) 2010 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (http://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 50 1.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 1.2. Notational Conventions . . . . . . . . . . . . . . . . . . 4 52 2. The host-meta Document Format . . . . . . . . . . . . . . . . . 4 53 2.1. The 'Link' Element . . . . . . . . . . . . . . . . . . . . 4 54 2.1.1. Template Syntax . . . . . . . . . . . . . . . . . . . . 5 55 3. Obtaining host-meta Documents . . . . . . . . . . . . . . . . . 5 56 4. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 57 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7 58 5.1. The host-meta Well-Known URI . . . . . . . . . . . . . . . 7 59 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 7 60 Appendix B. Document History . . . . . . . . . . . . . . . . . . . 7 61 6. Normative References . . . . . . . . . . . . . . . . . . . . . 8 62 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 9 64 1. Introduction 66 Web-based protocols often require the discovery of host policy or 67 metadata, where host is not a single resource but the entity 68 controlling the collection of resources identified by Uniform 69 Resource Identifiers (URI) with a common URI host as defined by 70 [RFC3986]. While these protocols have a wide range of metadata 71 needs, they often define metadata that is concise, has simple syntax 72 requirements, and can benefit from storing its metadata in a common 73 location used by other related protocols. 75 Because there is no URI or resource available to describe a host, 76 many of the methods used for associating per-resource metadata (such 77 as HTTP headers) are not available. This often leads to the 78 overloading of the root HTTP resource (e.g. 'http://example.com/') 79 with host metadata that is not specific to the root resource, and 80 often has nothing to do it. 82 This memo registers the "well-known" URI suffix "host-meta" in the 83 Well-Known URI Registry established by [RFC5785], and specifies a 84 simple, general-purpose metadata document for hosts, to be used by 85 multiple Web-based protocols. 87 [[ Please discuss this draft on the apps-discuss@ietf.org [1] mailing 88 list. ]] 90 1.1. Example 92 The following is a simple host-meta document with a link providing 93 host-wide copyright information and a link template providing a URI 94 for obtaining resource-specific author information for each resource 95 within the host-meta document scope: 97 98 100 102 Site License Policy 103 104 106 Author Profile 107 108 110 1.2. Notational Conventions 112 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 113 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 114 document are to be interpreted as described in [RFC2119]. 116 This document uses the Augmented Backus-Naur Form (ABNF) notation of 117 [RFC5234]. Additionally, the following rules are included from 118 [RFC3986]: reserved, unreserved, and pct-encoded. 120 2. The host-meta Document Format 122 The host-meta document uses the XRD 1.0 document format as defined by 123 [OASIS.XRD-1.0], which provides a simple and extensible XML-based 124 schema for describing resources. This memo defines additional 125 processing rules needed to describe hosts. Documents MAY include any 126 XRD element not explicitly excluded. 128 The host-meta document root MUST be an "XRD" element. The document 129 SHOULD NOT include a "Subject" element, as at this time no URI is 130 available to identify hosts. The use of the "Alias" element in host- 131 meta is undefined and NOT RECOMMENDED. 133 The subject (or "context resource" as defined by 134 [I-D.nottingham-http-link-header]) of the XRD "Property" and "Link" 135 elements is the host described by the host-meta document. However, 136 the subject of "Link" elements with a "template" attribute is the 137 individual resource whose URI is applied to the link template as 138 described in Section 2.1. 140 2.1. The 'Link' Element 142 The XRD "Link" element, when used with the "href" attribute, conveys 143 a link relation between the host described by the document and a 144 common target URI. 146 For example, the following link declares a common author for the 147 entire scope: 149 151 However, a "Link" element with a "template" attribute conveys a 152 relation whose context is an individual resource within the host-meta 153 document scope, and whose target is constructed by applying the 154 context resource URI to the template. The template string MAY 155 contain a URI string without any variables to represent a resource- 156 level relation that is identical for every individual resource. 158 For example, a blog with multiple authors can provide information 159 about each article's author by providing an endpoint with a parameter 160 set to the URI of each article. Each article has a unique author, 161 but all share the same pattern of where that information is located: 163 166 2.1.1. Template Syntax 168 This memo defines a simple template syntax for URI transformation. A 169 template is a string containing brace-enclosed ("{}") variable names 170 marking the parts of the string that are to be substituted by the 171 corresponding variable values. 173 Before substituting template variables, any value character other 174 than unreserved (as defined by [RFC3986]) MUST be percent-encoded per 175 [RFC3986]. 177 This memo defines a single variable - "uri" - as the entire context 178 resource URI. Protocols MAY define additional relation-specific 179 variables and syntax rules, but SHOULD only do so for protocol- 180 specific relation types, and MUST NOT change the meaning of the "uri" 181 variable. If a client is unable to successfully process a template 182 (e.g. unknown variable names, unknown or incompatible syntax) the 183 parent "Link" element SHOULD be ignored. 185 The template syntax ABNF: 187 URI-Template = *( uri-char / variable ) 188 variable = "{" var-name "}" 189 uri-char = ( reserved / unreserved / pct-encoded ) 190 var-name = %x75.72.69 / ( 1*var-char ) ; "uri" or other names 191 var-char = ALPHA / DIGIT / "." / "_" 193 For example: 195 Input: http://example.com/r?f=1 196 Template: http://example.org/?q={uri} 197 Output: http://example.org/?q=http%3A%2F%2Fexample.com%2Fr%3Ff%3D1 199 3. Obtaining host-meta Documents 201 Clients obtain the host-meta document for a given host by making an 202 HTTPS [RFC2818] GET request to the host's port 443 for the 203 "/.well-known/host-meta" path. If the request fails to produce a 204 valid host-meta document, clients make an HTTP [RFC2616] GET request 205 to the host's port 80 for the "/.well-known/host-meta" path. 207 Servers MUST support at least one but SHOULD support both ports. If 208 both ports are supported, they MUST serve the same document. Clients 209 MAY attempt to obtain the host-meta document from either port, SHOULD 210 attempt using port 443 first, and SHOULD attempt the other port if 211 the first fails. 213 For example, the following request is used to obtain the host-meta 214 document for the 'example.com' host: 216 GET /.well-known/host-meta HTTP/1.1 217 Host: example.com 219 If a representation is successfully obtained, but is not in the 220 format described above, clients should infer that the path is being 221 used for other purposes, and not process the response as a host-meta 222 document. To aid in this process, authorities using this mechanism 223 SHOULD correctly label host-meta responses with the 224 "application/xrd+xml" internet media type. 226 If the server response indicates that the host-meta resource is 227 located elsewhere (a 301, 302, or 307 response status code), the 228 client MUST try to obtain the resource from the location provided in 229 the response. This means that the host-meta document for one host 230 MAY be retrieved from a another host. Likewise, if the resource is 231 not available or does not exist (e.g. a 404 or 410 response status 232 codes) at both ports, the client should infer that metadata is not 233 available via this mechanism. 235 4. Security Considerations 237 The metadata returned by the host-meta resource is presumed to be 238 under the control of the appropriate authority and representative of 239 all the resources described by it. If this resource is compromised 240 or otherwise under the control of another party, it may represent a 241 risk to the security of the server and data served by it, depending 242 on what protocols use it. 244 Protocols using host-meta templates SHOULD evaluate the construction 245 of their templates as well as any protocol-specific variables or 246 syntax to ensure that the templates cannot be abused by an attacker. 247 For example, a client can be tricked into following a malicious link 248 due to a poorly constructed template which produces unexpected 249 results when its variable values contain unexpected characters. 251 Protocols MAY restrict document retrieval to HTTPS based on their 252 security needs. Protocols utilizing host-meta documents obtained via 253 other methods not described in this memo SHOULD consider the security 254 and authority risks associated with such methods. 256 5. IANA Considerations 258 5.1. The host-meta Well-Known URI 260 This memo registers the 'host-meta' well-known URI in the Well-Known 261 URI Registry as defined by [RFC5785]. 262 URI suffix: host-meta 263 Change controller: IETF 264 Specification document(s): [[ this document ]] 265 Related information: None 267 Appendix A. Acknowledgments 269 The author would like to acknowledge the contributions of everyone 270 who provided feedback and use cases for this memo; in particular, 271 Dirk Balfanz, DeWitt Clinton, Blaine Cook, Eve Maler, Breno de 272 Medeiros, Brad Fitzpatrick, James Manger, Will Norris, Mark 273 Nottingham, John Panzer, Drummond Reed, and Peter Saint-Andre. 275 Appendix B. Document History 277 [[ to be removed by the RFC editor before publication as an RFC ]] 279 -09 280 o Removed the element due to lack of use cases (protocols 281 with signature requirements can define their own way of declaring 282 the document's subject for this purpose). 283 o Minor editorial changes. 284 o Changed following redirections to MUST. 285 o Updated references. 287 -08 288 o Fixed typo. 290 -07 291 o Minor editorial clarifications. 292 o Added XML schema for host-meta extension. 293 o Updated XRD reference to the latest draft (no normative changes). 295 -06 296 o Updated well-known reference to RFC 5785. 297 o Minor editorial changes. 298 o Made HTTPS a higher priority (SHOULD) over HTTP. 300 -05 301 o Adjusted syntax to the latest XRD schema. 302 o Added note about using a link template without variables. 304 -04 305 o Corrected the example. 307 -03 308 o Changed scope to an entire host (per RFC 3986). 309 o Simplified template syntax to always percent-encode values and 310 vocabulary to a single 'uri' variable. 311 o Changed document retrieval to always use HTTP(S). 312 o Added security consideration about the use of templates. 313 o Explicitly defined the root element to be 'XRD'. 315 -02 316 o Changed Scope element syntax from attributes to URI-like string 317 value. 319 -01 320 o Editorial rewrite. 321 o Redefined scope as a scheme-authority pair. 322 o Added document structure section. 324 -00 325 o Initial draft. 327 6. Normative References 329 [I-D.nottingham-http-link-header] 330 Nottingham, M., "Web Linking", 331 draft-nottingham-http-link-header-10 (work in progress), 332 May 2010. 334 [OASIS.XRD-1.0] 335 Hammer-Lahav, E. and W. Norris, "Extensible Resource 336 Descriptor (XRD) Version 1.0 (work in progress)", . 340 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 341 Requirement Levels", BCP 14, RFC 2119, March 1997. 343 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 344 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 345 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 347 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 349 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 350 Resource Identifier (URI): Generic Syntax", STD 66, 351 RFC 3986, January 2005. 353 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 354 Specifications: ABNF", STD 68, RFC 5234, January 2008. 356 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known 357 Uniform Resource Identifiers (URIs)", RFC 5785, 358 April 2010. 360 [1] 362 Author's Address 364 Eran Hammer-Lahav 365 Yahoo! 367 Email: eran@hueniverse.com 368 URI: http://hueniverse.com