idnits 2.17.1
draft-hammer-hostmeta-07.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 11, 2010) is 5099 days in the past. Is this
intentional?
Checking references for intended status: Informational
----------------------------------------------------------------------------
== Outdated reference: A later version (-10) exists of
draft-nottingham-http-link-header-06
** 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 (~~), 3 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 11, 2010
5 Expires: November 12, 2010
7 host-meta: Web Host Metadata
8 draft-hammer-hostmeta-07
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 12, 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. Namespace and Version . . . . . . . . . . . . . . . . . . 4
52 1.3. Notational Conventions . . . . . . . . . . . . . . . . . . 4
53 2. Metadata Scope . . . . . . . . . . . . . . . . . . . . . . . . 5
54 3. The host-meta Document Format . . . . . . . . . . . . . . . . 5
55 3.1. The 'hm:Host' Element . . . . . . . . . . . . . . . . . . 5
56 3.2. The 'Link' Element . . . . . . . . . . . . . . . . . . . . 6
57 3.2.1. Template Syntax . . . . . . . . . . . . . . . . . . . 6
58 4. Obtaining host-meta Documents . . . . . . . . . . . . . . . . 7
59 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8
60 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
61 6.1. The host-meta Well-Known URI . . . . . . . . . . . . . . . 8
62 Appendix A. host-meta XML Schema . . . . . . . . . . . . . . . . 9
63 Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . . 9
64 Appendix C. Document History . . . . . . . . . . . . . . . . . . 9
65 7. Normative References . . . . . . . . . . . . . . . . . . . . . 10
66 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 11
68 1. Introduction
70 Web-based protocols often require the discovery of host policy or
71 metadata, where host is not a single resource but the entity
72 controlling the collection of resources identified by Universal
73 Resource Identifiers (URI) with a common host as defined by
74 [RFC3986]. While these protocols have a wide range of metadata
75 needs, they often define metadata that is concise, has simple syntax
76 requirements, and can benefit from storing its metadata in a common
77 location used by other related protocols.
79 Because there is no URI or resource available to describe a host,
80 many of the methods used for associating per-resource metadata (such
81 as HTTP headers) are not available. This often leads to the
82 overloading of the root HTTP resource (e.g. 'http://example.com/')
83 with host metadata that is not specific to the root resource, and
84 often has nothing to do it.
86 This memo registers the "well-known" URI suffix "host-meta" in the
87 Well-Known URI Registry established by [RFC5785], and specifies a
88 simple, general-purpose metadata document for hosts, to be used by
89 multiple Web-based protocols.
91 [[ Please discuss this draft on the apps-discuss@ietf.org [1] mailing
92 list. ]]
94 1.1. Example
96 The following is a simple host-meta document for the 'example.com'
97 and 'www.example.com' hosts with a link providing host-wide copyright
98 information and a link template providing a URI for obtaining
99 resource-specific author information for each resource within the
100 host-meta document scope:
102
103
106 example.com
107 www.example.com
109
111 Site License Policy
112
113
115 Author Profile
116
117
119 1.2. Namespace and Version
121 The host-meta document uses the XRD 1.0 XML namespace URI
122 [W3C.REC-xml-names-19990114]:
124 http://docs.oasis-open.org/ns/xri/xrd-1.0
126 The XML namespace URI for the host-meta specific extension elements
127 defined in this specification is:
129 http://host-meta.net/ns/1.0
131 1.3. Notational Conventions
133 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
134 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
135 document are to be interpreted as described in [RFC2119].
137 Examples in this specification uses the namespace prefix "hm:" for
138 the extension Namespace URI identified in Section 1.2. The "hm:"
139 namespace prefix is arbitrary and not is semantically significant.
140 Element names without a namespace prefix belong to the XRD 1.0 XML
141 namespace identified in Section 1.2.
143 This document uses the Augmented Backus-Naur Form (ABNF) notation of
144 [RFC5234]. Additionally, the following rules are included from
145 [RFC3986]: reserved, unreserved, and host.
147 2. Metadata Scope
149 Each host-meta document describes one or more hosts, where a host is
150 not a single resource but the entity controlling the collection of
151 resources identified by URIs with a common host as defined by
152 [RFC3986], across all ports and schemes.
154 The scope MUST be expressed explicitly within the document using the
155 "hm:Host" element as described in Section 3.1. The host-meta scope
156 does not apply to any other hostname (or sub-domain) not explicitly
157 declared. For example, 'example.net', 'example.com', and
158 'www.example.com' all have different and non-overlapping scopes.
160 3. The host-meta Document Format
162 The host-meta document uses the XRD 1.0 document format as defined by
163 [OASIS.XRD-1.0], which provides a simple and extensible XML-based
164 schema for describing resources. This memo defines additional
165 elements and processing rules needed to describe hosts. Documents
166 MAY include any XRD element not explicitly excluded.
168 The host-meta document root MUST be an "XRD" element. The document
169 SHOULD NOT include a "Subject" element, as at this time no URI is
170 available to identify hosts. The use of the "Alias" element in host-
171 meta is undefined and NOT RECOMMENDED.
173 This memo defines the "hm:Host" element for declaring document scope.
174 The subject (or "context resource" as defined by
175 [I-D.nottingham-http-link-header]) of the XRD "Property" and "Link"
176 elements consists of the hosts included in the document scope.
177 However, the subject of "Link" elements with a "template" attribute
178 is the individual resources (included in the document scope) applied
179 to the link template as described in Section 3.2.
181 3.1. The 'hm:Host' Element
183 The 'hm:Host" element is used to declare the scope of the host-meta
184 document and is defined as a child element of the root "XRD" element.
185 The parent "XRD" element MUST include one but MAY include more
186 "hm:Host" elements (order does not matter). If a host-meta document
187 includes more than one "hm:Host" element, it does not signify any
188 relationship between the individual hosts other than sharing the same
189 metadata included in the document.
191 The element value syntax ABNF:
193 Host-Element-Value = host
195 3.2. The 'Link' Element
197 The XRD "Link" element, when used with the "href" attribute, conveys
198 a link relation between the hosts described by the document and a
199 common target URI.
201 For example, the following link declares a common author for the
202 entire scope:
204
206 However, a "Link" element with a "template" attribute conveys
207 relations whose context are the individual resources within the host-
208 meta document scope, and whose target is constructed by applying each
209 context resource URI to the template. The template string MAY
210 contain a URI string without any variables to represent a resource-
211 level relation that is identical for every individual resource.
213 For example, a blog with multiple authors can provide information
214 about each article's author by providing an endpoint with a parameter
215 set to the URI of each article. Each article has a unique author,
216 but all share the same pattern of where that information is located:
218
220 3.2.1. Template Syntax
222 This memo defines a simple template syntax for URI transformation. A
223 template is a string containing brace-enclosed ("{}") variable names
224 marking the parts of the string that are to be substituted by the
225 corresponding variable values.
227 Before substituting template variables, any value character other
228 than unreserved (as defined by [RFC3986]) MUST be percent-encoded per
229 [RFC3986].
231 This memo defines a single variable - "uri" - as the entire context
232 resource URI. Protocols MAY define additional relation-specific
233 variables and syntax rules, but SHOULD only do so for protocol-
234 specific relation types, and MUST NOT change the meaning of the "uri"
235 variable. If a client is unable to successfully process a template
236 (e.g. unknown variable names, unknown or incompatible syntax) the
237 parent "Link" element SHOULD be ignored.
239 The template syntax ABNF:
241 URI-Template = *( uri-char | variable )
242 variable = "{" var-name "}"
243 uri-char = ( reserved | unreserved )
244 var-name = "uri" | ( 1*var-char )
245 var-char = ALPHA / DIGIT / "." / "_"
247 For example:
249 Input: http://example.com/r?f=1
250 Template: http://example.org?q={uri}
251 Output: http://example.org?q=http%3A%2F%2Fexample.com%2Fr%3Ff%3D1
253 4. Obtaining host-meta Documents
255 Clients obtain the host-meta document for a given host by making an
256 HTTPS [RFC2818] GET request to the host's port 443 for the
257 "/.well-known/host-meta" path. If the request fails to produce a
258 valid host-meta document, clients make an HTTP [RFC2616] GET request
259 to the host's port 80 for the "/.well-known/host-meta" path.
261 Servers MUST support at least one but SHOULD support both ports. If
262 both ports are supported, they MUST serve the same document. Clients
263 MAY attempt to obtain the host-meta document from either port, SHOULD
264 attempt using port 443 first, and SHOULD attempt the other port if
265 the first fails.
267 For example, the following request is used to obtain the host-meta
268 document for the 'example.com' host:
270 GET /.well-known/host-meta HTTP/1.1
271 Host: example.com
273 If a representation is successfully obtained, but is not in the
274 format described above, clients should infer that the path is being
275 used for other purposes, and not process the response as a host-meta
276 document. To aid in this process, authorities using this mechanism
277 SHOULD correctly label host-meta responses with the
278 "application/xrd+xml" internet media type.
280 If the server response indicates that the host-meta resource is
281 located elsewhere (a 301, 302, or 307 response status code), the
282 client SHOULD try to obtain the resource from the location provided
283 in the response. This means that the host-meta document for one host
284 MAY be retrieved from a another host. Likewise, if the resource is
285 not available or does not exist (indicated respectively, by the 404
286 and 410 response status codes) at both ports, the client should infer
287 that metadata is not available via this mechanism.
289 The scope declared within the host-meta document MUST match the
290 desired host. Clients MUST NOT use host-meta documents when the
291 desired host (used to obtain the document) is not listed in the
292 document.
294 5. Security Considerations
296 The metadata returned by the host-meta resource is presumed to be
297 under the control of the appropriate authority and representative of
298 all the resources described by it. If this resource is compromised
299 or otherwise under the control of another party, it may represent a
300 risk to the security of the server and data served by it, depending
301 on what protocols use it.
303 The host-meta scope is explicitly declared by the "hm:Host" elements
304 listed in the document. Clients SHOULD evaluate the authority of a
305 host-meta document obtained from one host to describe another host.
306 Protocols that change the scope from the one declared in the document
307 without careful consideration can incur security risks.
309 Protocols using host-meta templates SHOULD evaluate the construction
310 of their templates as well as any protocol-specific variables or
311 syntax to ensure that the templates cannot be abused by an attacker.
312 For example, a client can be tricked into following a malicious link
313 due to a poorly constructed template which produces unexpected
314 results when its variable values contain unexpected characters.
316 Protocols MAY restrict document retrieval to HTTPS based on their
317 security needs. Protocols utilizing host-meta documents obtained via
318 other methods not described in this memo SHOULD consider the security
319 and authority risks associated with such methods.
321 6. IANA Considerations
323 6.1. The host-meta Well-Known URI
325 This memo registers the 'host-meta' well-known URI in the Well-Known
326 URI Registry as defined by [RFC5785].
327 URI suffix: host-meta
328 Change controller: IETF
329 Specification document(s): [[ this document ]]
330 Related information: None
332 Appendix A. host-meta XML Schema
334 The following is the XML schema for the host-meta XRD extension
335 elements:
337
338
346
348
349
350
351
352
353
354
356
358 Appendix B. Acknowledgments
360 The author would like to acknowledge the contributions of everyone
361 who provided feedback and use cases for this memo; in particular,
362 Dirk Balfanz, DeWitt Clinton, Blaine Cook, Eve Maler, Breno de
363 Medeiros, Brad Fitzpatrick, James Manger, Will Norris, Mark
364 Nottingham, John Panzer, Drummond Reed, and Peter Saint-Andre.
366 Appendix C. Document History
368 [[ to be removed by the RFC editor before publication as an RFC ]]
370 -07
371 o Minor editorial clarifications.
372 o Added XML schema for host-meta extension.
373 o Updated XRD reference to the latest draft (no normative changes).
375 -06
376 o Updated well-known reference to RFC 5785.
377 o Minor editorial changes.
378 o Made HTTPS a higher priority (SHOULD) over HTTP.
380 -05
381 o Adjusted syntax to the latest XRD schema.
382 o Added note about using a link template without variables.
384 -04
385 o Corrected the example.
387 -03
388 o Changed scope to an entire host (per RFC 3986).
389 o Simplified template syntax to always percent-encode values and
390 vocabulary to a single 'uri' variable.
391 o Changed document retrieval to always use HTTP(S).
392 o Added security consideration about the use of templates.
393 o Explicitly defined the root element to be 'XRD'.
395 -02
396 o Changed Scope element syntax from attributes to URI-like string
397 value.
399 -01
400 o Editorial rewrite.
401 o Redefined scope as a scheme-authority pair.
402 o Added document structure section.
404 -00
405 o Initial draft.
407 7. Normative References
409 [I-D.nottingham-http-link-header]
410 Nottingham, M., "Web Linking",
411 draft-nottingham-http-link-header-06 (work in progress),
412 July 2009.
414 [OASIS.XRD-1.0]
415 Hammer-Lahav, E. and W. Norris, "Extensible Resource
416 Descriptor (XRD) Version 1.0 (work in progress)", .
420 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
421 Requirement Levels", BCP 14, RFC 2119, March 1997.
423 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
424 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
425 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
427 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
429 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
430 Resource Identifier (URI): Generic Syntax", STD 66,
431 RFC 3986, January 2005.
433 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
434 Specifications: ABNF", STD 68, RFC 5234, January 2008.
436 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
437 Uniform Resource Identifiers (URIs)", RFC 5785,
438 April 2010.
440 [W3C.REC-P3P-20020416]
441 Marchiori, M., "The Platform for Privacy Preferences 1.0
442 (P3P1.0) Specification", World Wide Web Consortium
443 Recommendation REC-P3P-20020416, April 2002,
444 .
446 [W3C.REC-xml-names-19990114]
447 Hollander, D., Layman, A., and T. Bray, "Namespaces in
448 XML", World Wide Web Consortium FirstEdition REC-xml-
449 names-19990114, January 1999,
450 .
452 [1]
454 Author's Address
456 Eran Hammer-Lahav
457 Yahoo!
459 Email: eran@hueniverse.com
460 URI: http://hueniverse.com