idnits 2.17.1
draft-hammer-hostmeta-13.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 :
----------------------------------------------------------------------------
** The abstract seems to contain references ([1]), which it shouldn't.
Please replace those with straight textual mentions of the documents in
question.
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 (June 15, 2010) is 5061 days in the past. Is this
intentional?
Checking references for intended status: Proposed Standard
----------------------------------------------------------------------------
(See RFCs 3967 and 4897 for information about using normative references
to lower-maturity documents in RFCs)
** 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)
-- Possible downref: Non-RFC (?) normative reference: ref. '1'
Summary: 4 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--).
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: Standards Track June 15, 2010
5 Expires: December 17, 2010
7 Web Host Metadata
8 draft-hammer-hostmeta-13
10 Abstract
12 This memo describes a method for locating host metadata as well as
13 information about individual resources controlled by the host.
15 Editorial Note (to be removed by RFC Editor)
17 Please discuss this draft on the apps-discuss@ietf.org [1] mailing
18 list.
20 Status of this Memo
22 This Internet-Draft is submitted in full conformance with the
23 provisions of BCP 78 and BCP 79.
25 Internet-Drafts are working documents of the Internet Engineering
26 Task Force (IETF). Note that other groups may also distribute
27 working documents as Internet-Drafts. The list of current Internet-
28 Drafts is at http://datatracker.ietf.org/drafts/current/.
30 Internet-Drafts are draft documents valid for a maximum of six months
31 and may be updated, replaced, or obsoleted by other documents at any
32 time. It is inappropriate to use Internet-Drafts as reference
33 material or to cite them other than as "work in progress."
35 This Internet-Draft will expire on December 17, 2010.
37 Copyright Notice
39 Copyright (c) 2010 IETF Trust and the persons identified as the
40 document authors. All rights reserved.
42 This document is subject to BCP 78 and the IETF Trust's Legal
43 Provisions Relating to IETF Documents
44 (http://trustee.ietf.org/license-info) in effect on the date of
45 publication of this document. Please review these documents
46 carefully, as they describe your rights and restrictions with respect
47 to this document. Code Components extracted from this document must
48 include Simplified BSD License text as described in Section 4.e of
49 the Trust Legal Provisions and are provided without warranty as
50 described in the Simplified BSD License.
52 Table of Contents
54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
55 1.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 3
56 1.1.1. Processing Resource-Specific Information . . . . . . . 5
57 1.2. Notational Conventions . . . . . . . . . . . . . . . . . . 6
58 2. Obtaining host-meta Documents . . . . . . . . . . . . . . . . 6
59 3. The host-meta Document Format . . . . . . . . . . . . . . . . 7
60 3.1. The 'Link' Element . . . . . . . . . . . . . . . . . . . . 8
61 3.1.1. Template Syntax . . . . . . . . . . . . . . . . . . . 8
62 4. Processing host-meta Documents . . . . . . . . . . . . . . . . 9
63 4.1. Host-Wide Information . . . . . . . . . . . . . . . . . . 9
64 4.2. Resource-Specific Information . . . . . . . . . . . . . . 10
65 5. Security Considerations . . . . . . . . . . . . . . . . . . . 10
66 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
67 6.1. The 'host-meta' Well-Known URI . . . . . . . . . . . . . . 11
68 6.2. The 'lrdd' Relation Type . . . . . . . . . . . . . . . . . 11
69 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 12
70 Appendix B. Document History . . . . . . . . . . . . . . . . . . 12
71 7. Normative References . . . . . . . . . . . . . . . . . . . . . 14
72 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 15
74 1. Introduction
76 Web-based protocols often require the discovery of host policy or
77 metadata, where "host" is not a single resource but the entity
78 controlling the collection of resources identified by Uniform
79 Resource Identifiers (URI) with a common URI host [RFC3986].
81 While web protocols have a wide range of metadata needs, they often
82 use metadata that is concise, has simple syntax requirements, and can
83 benefit from storing their metadata in a common location used by
84 other related protocols.
86 Because there is no URI or representation available to describe a
87 host, many of the methods used for associating per-resource metadata
88 (such as HTTP headers) are not available. This often leads to the
89 overloading of the root HTTP resource (e.g. 'http://example.com/')
90 with host metadata that is not specific or relevant to the root
91 resource itself.
93 This memo registers the well-known URI suffix "host-meta" in the
94 Well-Known URI Registry established by [RFC5785], and specifies a
95 simple, general-purpose metadata document format for hosts, to be
96 used by multiple web-based protocols.
98 In addition, there are times when a host-wide scope for policy or
99 metadata is too coarse-grained. host-meta provides two mechanisms for
100 providing resource-specific information:
102 o Link Templates - links using a URI template instead of a fixed
103 target URI, providing a way to define generic rules for generating
104 resource-specific links by applying the individual resource URI to
105 the template.
107 o Link-based Resource Descriptor Documents (LRDD, pronounced 'lard')
108 - descriptor documents providing resource-specific information,
109 typically information that cannot be expressed using link
110 templates. LRDD documents are linked to using link templates with
111 the "lrdd" relation type.
113 1.1. Example
115 The following is a simple host-meta document including both host-wide
116 and resource-specific information for the 'example.com' host:
118
119
121
123 1.0
125
128
130
133
137
140
142 The host-wide information which applies to host in its entirety
143 provided by the document includes:
145 o A "http://protocol.example.net/version" host property with a value
146 of "1.0".
148 o A link to the host's copyright policy ("copyright").
150 The resource-specific information provided by the document includes:
152 o A link template for receiving real-time updates ("hub") about
153 individual resources. Since the template does not include a
154 template variable, the target URI is identical for all resources.
156 o A LRDD document link template ("lrdd") for obtaining additional
157 resource-specific information contained in a separate document for
158 each individual resource.
160 o A link template for finding information about the author of
161 individual resources ("author").
163 1.1.1. Processing Resource-Specific Information
165 When looking for information about the an individual resource, for
166 example, the resource identified by 'http://example.com/xy', the
167 resource URI is applied to the templates found, producing the
168 following links:
170
173
177
180 The LRDD document for 'http://example.com/xy' is obtained using an
181 HTTP "GET" request:
183
184
186 http://example.com/xy
188 red
190
193
195
197 Together, the information available about the individual resource
198 (presented as an XRD document for illustration purposes) is:
200
201
203 http://example.com/xy
205 red
207
210
213
216
219
221 Note that the order of links matters and is based on their original
222 order in the host-meta and LRDD documents. For example, the "hub"
223 link obtained from the host-meta link template has a higher priority
224 than the link found in the LRDD document because the host-meta link
225 appears before the "lrdd" link.
227 On the other hand, the "author" link found in the LRDD document has a
228 higher priority than the link found in the host-meta document because
229 it appears after the "lrdd" link.
231 1.2. Notational Conventions
233 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
234 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
235 document are to be interpreted as described in [RFC2119].
237 This document uses the Augmented Backus-Naur Form (ABNF) notation of
238 [RFC5234]. Additionally, the following rules are included from
239 [RFC3986]: reserved, unreserved, and pct-encoded.
241 2. Obtaining host-meta Documents
243 The client obtains the host-meta document for a given host by making
244 an HTTPS [RFC2818] GET request to the host's port 443 for the
245 "/.well-known/host-meta" path. If the request fails to produce a
246 valid host-meta document, the client makes an HTTP [RFC2616] GET
247 request to the host's port 80 for the "/.well-known/host-meta" path.
249 The server MUST support at least one but SHOULD support both ports.
250 If both ports are supported, they MUST serve the same document. The
251 client MAY attempt to obtain the host-meta document from either port,
252 SHOULD attempt using port 443 first, and SHOULD attempt the other
253 port if the first fails.
255 For example, the following request is used to obtain the host-meta
256 document for the 'example.com' host:
258 GET /.well-known/host-meta HTTP/1.1
259 Host: example.com
261 If the server response indicates that the host-meta resource is
262 located elsewhere (a 301, 302, or 307 response status code), the
263 client MUST try to obtain the resource from the location provided in
264 the response. This means that the host-meta document for one host
265 MAY be retrieved from another host. Likewise, if the resource is not
266 available or does not exist (e.g. a 404 or 410 response status codes)
267 at both ports, the client should infer that metadata is not available
268 via this mechanism.
270 The host-meta document SHOULD be server with the
271 "application/xrd+xml" media type. [[ media type registration pending
272 ]]
274 3. The host-meta Document Format
276 The host-meta document uses the XRD 1.0 document format as defined by
277 [OASIS.XRD-1.0], which provides a simple and extensible XML-based
278 schema for describing resources. This memo defines additional
279 processing rules needed to describe hosts. Documents MAY include any
280 XRD element not explicitly excluded.
282 The host-meta document root MUST be an "XRD" element. The document
283 SHOULD NOT include a "Subject" element, as at this time no URI is
284 available to identify hosts. The use of the "Alias" element in host-
285 meta is undefined and NOT RECOMMENDED.
287 The subject (or "context resource" as defined by
288 [I-D.nottingham-http-link-header]) of the XRD "Property" and "Link"
289 elements is the host described by the host-meta document. However,
290 the subject of "Link" elements with a "template" attribute is the
291 individual resource whose URI is applied to the link template as
292 described in Section 3.1.
294 3.1. The 'Link' Element
296 The XRD "Link" element, when used with the "href" attribute, conveys
297 a link relation between the host described by the document and a
298 common target URI.
300 For example, the following link declares a common copyright license
301 for the entire scope:
303
305 However, a "Link" element with a "template" attribute conveys a
306 relation whose context is an individual resource within the host-meta
307 document scope, and whose target is constructed by applying the
308 context resource URI to the template. The template string MAY
309 contain a URI string without any variables to represent a resource-
310 level relation that is identical for every individual resource.
312 For example, a blog with multiple authors can provide information
313 about each article's author by providing an endpoint with a parameter
314 set to the URI of each article. Each article has a unique author,
315 but all share the same pattern of where that information is located:
317
320 3.1.1. Template Syntax
322 This memo defines a simple template syntax for URI transformation. A
323 template is a string containing brace-enclosed ("{}") variable names
324 marking the parts of the string that are to be substituted by the
325 corresponding variable values.
327 Before substituting template variables, any value character other
328 than unreserved (as defined by [RFC3986]) MUST be percent-encoded per
329 [RFC3986].
331 This memo defines a single variable - "uri" - as the entire context
332 resource URI. Protocols MAY define additional relation-specific
333 variables and syntax rules, but SHOULD only do so for protocol-
334 specific relation types, and MUST NOT change the meaning of the "uri"
335 variable. If a client is unable to successfully process a template
336 (e.g. unknown variable names, unknown or incompatible syntax) the
337 parent "Link" element SHOULD be ignored.
339 The template syntax ABNF:
341 URI-Template = *( uri-char / variable )
342 variable = "{" var-name "}"
343 uri-char = ( reserved / unreserved / pct-encoded )
344 var-name = %x75.72.69 / ( 1*var-char ) ; "uri" or other names
345 var-char = ALPHA / DIGIT / "." / "_"
347 For example:
349 Input: http://example.com/r?f=1
350 Template: http://example.org/?q={uri}
351 Output: http://example.org/?q=http%3A%2F%2Fexample.com%2Fr%3Ff%3D1
353 4. Processing host-meta Documents
355 Once the host-meta document has been obtained, the client processes
356 its content based on the type of information desired: host-wide or
357 resource-specific.
359 Clients usually look for a link with a specific relation type or
360 other attributes. In such cases, the client does not need to process
361 the entire host-meta document and all linked LRDD documents, but
362 instead, process the various documents in their prescribed order
363 until the desired information is found.
365 Protocols using host-meta must indicate whether the information they
366 seek is host-wide or resource-specific. For example, "obtain the
367 first host-meta resource-specific link using the 'author' relation
368 type". If both types are used for the same purpose (e.g. first look
369 for resource-specific, then look for host-wide), the protocol must
370 specify the processing order.
372 4.1. Host-Wide Information
374 When looking for host-wide information, the client MUST ignore any
375 "Link" elements with a "template" attribute, as well as any link
376 using the "lrdd" relation type. All other elements are scoped as
377 host-wide.
379 4.2. Resource-Specific Information
381 Unlike host-wide information which is contained solely within the
382 host-meta document, resource-specific information is obtained from
383 host-meta link templates, as well as from linked LRDD documents.
385 When looking for resource-specific information, the client constructs
386 a resource descriptor by collecting and processing all the host-meta
387 link templates. For each link template:
389 1. The client applies the URI of the desired resource to the
390 template, producing a resource-specific link.
392 2. If the link's relation type is other than "lrdd", the client adds
393 the link to the resource descriptor in order.
395 3. If the link's relation type is "lrdd":
397 3.1 The client obtains the LRDD document by following the
398 scheme-specific rules for the LRDD document URI. If the
399 document URI scheme is "http" or "https", the document is
400 obtained via an HTTP "GET" request to the identified URI.
401 If the HTTP response status code is 301, 302, or 307, the
402 client MUST follow the redirection response and repeat the
403 request with the provided location.
405 3.2 The client adds any link found in the LRDD document to the
406 resource descriptor in order, except for any link using the
407 "lrdd" relation type (processing is limited to a single
408 level of inclusion). When adding links, the client SHOULD
409 retain any extension attributes and child elements if
410 present (e.g. or elements).
412 3.3 The client adds any resource properties found in the LRDD
413 document to the resource descriptor in order (e.g.
414 or child elements of the LRDD document root
415 element).
417 A detailed example is provided in Section 1.1.1.
419 5. Security Considerations
421 The metadata returned by the host-meta resource is presumed to be
422 under the control of the appropriate authority and representative of
423 all the resources described by it. If this resource is compromised
424 or otherwise under the control of another party, it may represent a
425 risk to the security of the server and data served by it, depending
426 on what protocols use it.
428 Protocols using host-meta templates SHOULD evaluate the construction
429 of their templates as well as any protocol-specific variables or
430 syntax to ensure that the templates cannot be abused by an attacker.
431 For example, a client can be tricked into following a malicious link
432 due to a poorly constructed template which produces unexpected
433 results when its variable values contain unexpected characters.
435 Protocols MAY restrict document retrieval to HTTPS based on their
436 security needs. Protocols utilizing host-meta documents obtained via
437 other methods not described in this memo SHOULD consider the security
438 and authority risks associated with such methods.
440 6. IANA Considerations
442 6.1. The 'host-meta' Well-Known URI
444 This memo registers the "host-meta" well-known URI in the Well-Known
445 URI Registry as defined by [RFC5785].
447 URI suffix: host-meta
449 Change controller: IETF
451 Specification document(s): [[ this document ]]
453 Related information: None
455 6.2. The 'lrdd' Relation Type
457 This specification registers the "lrdd" relation type in the Link
458 Relation Type Registry defined by [I-D.nottingham-http-link-header]:
460 Relation Name: lrdd
462 Description: "lrdd" (pronounced 'lard') is an acronym for Link-based
463 Resource Descriptor Document. It is used by the host-meta
464 document processor to locate resource-specific information about
465 individual resources. When used elsewhere (e.g. HTTP "Link"
466 header fields or HTML elements), it operates as an include
467 directive, identifying the location of additional links and other
468 metadata. Multiple links with the 'lrdd' relation indicate
469 multiple sources to include, not alternative sources of the same
470 information. An "application/xrd+xml" representation MUST be
471 available, and this media type MAY appear in a link's "type"
472 attribute. Additional representations MAY be available (using
473 HTTP content negotiation), in which case the link's 'type'
474 attribute SHOULD be omitted.
476 Reference: [[ This specification ]]
478 Appendix A. Acknowledgments
480 The author would like to acknowledge the contributions of everyone
481 who provided feedback and use cases for this memo; in particular,
482 Dirk Balfanz, DeWitt Clinton, Blaine Cook, Eve Maler, Breno de
483 Medeiros, Brad Fitzpatrick, James Manger, Will Norris, Mark
484 Nottingham, John Panzer, Drummond Reed, and Peter Saint-Andre.
486 Appendix B. Document History
488 [[ to be removed by the RFC editor before publication as an RFC ]]
490 -13
492 o Changed to standard track.
494 o Added note about host-meta media type.
496 -12
498 o Clarified use of media type, simplified processing flow.
500 -11
502 o Editorial clarifications.
504 -10
506 o Integrated LRDD into the memo, dropping the multiple sources and
507 using only host-meta for LRDD processing.
509 -09
511 o Removed the element due to lack of use cases (protocols
512 with signature requirements can define their own way of declaring
513 the document's subject for this purpose).
515 o Minor editorial changes.
517 o Changed following redirections to MUST.
519 o Updated references.
521 -08
523 o Fixed typo.
525 -07
527 o Minor editorial clarifications.
529 o Added XML schema for host-meta extension.
531 o Updated XRD reference to the latest draft (no normative changes).
533 -06
535 o Updated well-known reference to RFC 5785.
537 o Minor editorial changes.
539 o Made HTTPS a higher priority (SHOULD) over HTTP.
541 -05
543 o Adjusted syntax to the latest XRD schema.
545 o Added note about using a link template without variables.
547 -04
549 o Corrected the example.
551 -03
553 o Changed scope to an entire host (per RFC 3986).
555 o Simplified template syntax to always percent-encode values and
556 vocabulary to a single 'uri' variable.
558 o Changed document retrieval to always use HTTP(S).
560 o Added security consideration about the use of templates.
562 o Explicitly defined the root element to be 'XRD'.
564 -02
565 o Changed Scope element syntax from attributes to URI-like string
566 value.
568 -01
570 o Editorial rewrite.
572 o Redefined scope as a scheme-authority pair.
574 o Added document structure section.
576 -00
578 o Initial draft.
580 7. Normative References
582 [I-D.nottingham-http-link-header]
583 Nottingham, M., "Web Linking",
584 draft-nottingham-http-link-header-10 (work in progress),
585 May 2010.
587 [OASIS.XRD-1.0]
588 Hammer-Lahav, E. and W. Norris, "Extensible Resource
589 Descriptor (XRD) Version 1.0 (work in progress)", .
593 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
594 Requirement Levels", BCP 14, RFC 2119, March 1997.
596 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
597 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
598 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
600 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
602 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
603 Resource Identifier (URI): Generic Syntax", STD 66,
604 RFC 3986, January 2005.
606 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
607 Specifications: ABNF", STD 68, RFC 5234, January 2008.
609 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
610 Uniform Resource Identifiers (URIs)", RFC 5785,
611 April 2010.
613 [1]
615 Author's Address
617 Eran Hammer-Lahav
618 Yahoo!
620 Email: eran@hueniverse.com
621 URI: http://hueniverse.com