idnits 2.17.1
draft-hammer-hostmeta-05.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
** You're using the IETF Trust Provisions' Section 6.b License Notice from
12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (See
https://trustee.ietf.org/license-info/)
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 (November 19, 2009) is 5272 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
== Outdated reference: A later version (-05) exists of
draft-nottingham-site-meta-03
** 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)
Summary: 3 errors (**), 0 flaws (~~), 4 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 November 19, 2009
5 Expires: May 23, 2010
7 host-meta: Web Host Metadata
8 draft-hammer-hostmeta-05
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 to IETF 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), its areas, and its working groups. Note that
22 other groups may also distribute working documents as Internet-
23 Drafts.
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 The list of current Internet-Drafts can be accessed at
31 http://www.ietf.org/ietf/1id-abstracts.txt.
33 The list of Internet-Draft Shadow Directories can be accessed at
34 http://www.ietf.org/shadow.html.
36 This Internet-Draft will expire on May 23, 2010.
38 Copyright Notice
40 Copyright (c) 2009 IETF Trust and the persons identified as the
41 document authors. All rights reserved.
43 This document is subject to BCP 78 and the IETF Trust's Legal
44 Provisions Relating to IETF Documents
45 (http://trustee.ietf.org/license-info) in effect on the date of
46 publication of this document. Please review these documents
47 carefully, as they describe your rights and restrictions with respect
48 to this document. Code Components extracted from this document must
49 include Simplified BSD License text as described in Section 4.e of
50 the Trust Legal Provisions and are provided without warranty as
51 described in the BSD License.
53 Table of Contents
55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
56 1.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 3
57 1.2. Namespace and Version . . . . . . . . . . . . . . . . . . 4
58 1.3. Notational Conventions . . . . . . . . . . . . . . . . . . 4
59 2. Metadata Scope . . . . . . . . . . . . . . . . . . . . . . . . 4
60 3. The host-meta Document Format . . . . . . . . . . . . . . . . 4
61 3.1. The 'hm:Host' Element . . . . . . . . . . . . . . . . . . 5
62 3.2. The 'Link' Element . . . . . . . . . . . . . . . . . . . . 5
63 3.2.1. Template Syntax . . . . . . . . . . . . . . . . . . . 6
64 4. Obtaining host-meta Documents . . . . . . . . . . . . . . . . 6
65 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7
66 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
67 6.1. The host-meta Well-Known URI . . . . . . . . . . . . . . . 8
68 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 8
69 Appendix B. Document History . . . . . . . . . . . . . . . . . . 8
70 7. Normative References . . . . . . . . . . . . . . . . . . . . . 9
71 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 10
73 1. Introduction
75 Web-based protocols often require the discovery of host policy or
76 metadata, where host is not a single resource but the entity
77 controlling the collection of resources identified by URIs with a
78 common host as defined by [RFC3986]. While these protocols have a
79 wide range of metadata needs, they often define metadata that is
80 concise, has simple syntax requirements, and can benefit from storing
81 its metadata in a common location used by other related protocols.
83 Because there is no URI or a resource available to describe a host,
84 many of the methods used for associating per-resource metadata (such
85 as HTTP headers) are not available. This often leads to the
86 overloading of the root HTTP resource (e.g. 'http://example.com/')
87 with host metadata that is not specific to the root resource (e.g. a
88 home page or web application), and which often has nothing to do it.
90 This memo registers the "well-known" URI suffix 'host-meta' in the
91 Well-Known URI Registry established by [I-D.nottingham-site-meta],
92 and specifies a simple, general-purpose metadata document for hosts,
93 to be used by multiple Web-based protocols.
95 Please discuss this draft on the apps-discuss@ietf.org [1] mailing
96 list.
98 1.1. Example
100 A simple host-meta document for the 'example.com' and
101 'www.example.com' hosts with a link providing host-wide copyright
102 information and a link template providing a URI for obtaining
103 resource-specific metadata for each resource within the host-meta
104 document scope:
106
107
110 example.com
111 www.example.com
113
115 Site License Policy
116
117
119 Resource Descriptor
120
122
124 1.2. Namespace and Version
126 The host-meta document uses the XRD 1.0 XML namespace URI
127 [W3C.REC-xml-names-19990114]:
129 http://docs.oasis-open.org/ns/xri/xrd-1.0
131 The XML namespace URI for the host-meta specific extension elements
132 defined in this specification is:
134 http://host-meta.net/ns/1.0
136 1.3. Notational Conventions
138 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
139 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
140 document are to be interpreted as described in [RFC2119].
142 This specification uses the namespace prefix "hm:" for the extension
143 Namespace URI identified in Section 1.2. Note that the choice of
144 namespace prefix is arbitrary and not semantically significant.
145 Element names without a namespace prefix belong to the XRD 1.0 XML
146 namespace identified in Section 1.2.
148 This document uses the Augmented Backus-Naur Form (ABNF) notation of
149 [RFC5234]. Additionally, the following rules are included from
150 [RFC3986]: reserved, unreserved, and host.
152 2. Metadata Scope
154 Each host-meta document describes one or more hosts. The scope MUST
155 be expressed explicitly within the document using the 'hm:Host'
156 elements (Section 3.1). The host-meta scope does not apply to any
157 other hostname (or sub-domain) not explicitly declared. For example,
158 'example.net', 'example.com', and 'www.example.com' all have
159 different and non-overlapping scopes.
161 3. The host-meta Document Format
163 The host-meta document uses the XRD 1.0 document format as defined by
164 [OASIS.XRD-1.0], which provides a simple and extensible XML-based
165 schema for describing resources. This memo defines additional
166 elements and processing rules needed to describe hosts. XRD elements
167 not explicitly mentioned in this memo are permitted and used as
168 defined in [OASIS.XRD-1.0].
170 The host-meta document root MUST be an 'XRD' element. The document
171 SHOULD NOT include a 'Subject' element, as at this time no URI is
172 available to identify hosts. The use of the 'Alias' element in host-
173 meta is undefined and NOT RECOMMENDED.
175 This memo defines the 'hm:Host' element (Section 3.1) for declaring
176 document scope. The subject (or "context resource" as defined by
177 [I-D.nottingham-http-link-header]) of the XRD 'Property' and 'Link'
178 elements are the hosts included in the document scope, with the
179 exception of 'Link' elements with a 'template' attribute for which
180 the subject are individual resources included in the document scope
181 as defined in Section 3.2.
183 3.1. The 'hm:Host' Element
185 The 'hm:Host" element is used to declare the scope of the host-meta
186 document and is defined as a child element of the root 'XRD' element.
187 The parent 'XRD' element MUST include one but MAY include more 'hm:
188 Host' elements (order does not matter). If a host-meta document
189 includes more than one 'hm:Host' element, it does not signify any
190 relationship between the individual hosts other than sharing the same
191 metadata.
193 The element value syntax ABNF:
195 Host-Element-Value = host
197 3.2. The 'Link' Element
199 The XRD 'Link' element, when used with the 'href' attribute, conveys
200 a link relation between the host (or hosts) described by the document
201 and a common target URI.
203 For example, the following link declares a common author for the
204 entire scope:
206
208 However, a 'Link' element with a 'template' attribute conveys
209 relations whose context are individual resources within the host-meta
210 document scope, and whose target is constructed by applying the
211 context URI to a template. The template string MAY contain a URI
212 string without any variables to represent a resource-level relation
213 that is identical for every individual resource.
215 For example, a blog with multiple authors can provide information
216 about each article's author by providing an endpoint with a parameter
217 set to the URI of each article. Each article has a unique author,
218 but all share the same pattern of where that information is located:
220
222 3.2.1. Template Syntax
224 This memo defines a simple template syntax for URI transformation. A
225 template is a string containing brace-enclosed ("{}") variable names
226 marking the parts of the string that are to be substituted by the
227 corresponding variable values.
229 Before substituting template variables, any value character other
230 than unreserved (as defined by [RFC3986]) MUST be percent-encoded per
231 [RFC3986].
233 This memo defines a single variable, 'uri', as the entire context
234 URI. Protocols MAY define additional relation-specific variables and
235 syntax rules, but SHOULD only do so for protocol-specific relation
236 types, and MUST NOT change the meaning of the 'uri' variable. If a
237 client is unable to successfully process a template (e.g. unknown
238 variable names, unknown or incompatible syntax) the parent 'Link'
239 element SHOULD be ignored.
241 The template syntax ABNF:
243 URI-Template = *( uri-char | variable )
244 variable = "{" var-name "}"
245 uri-char = ( reserved | unreserved )
246 var-name = "uri" | ( 1*var-char )
247 var-char = ALPHA / DIGIT / "." / "_"
249 For example:
251 Input: http://example.com/r?f=1
252 Template: http://example.org?q={uri}
253 Output: http://example.org?q=http%3A%2F%2Fexample.com%2Fr%3Ff%3D1
255 4. Obtaining host-meta Documents
257 The host-meta document is obtained by making an HTTP [RFC2616] GET
258 request to the host's port 80, or an HTTPS [RFC2818] GET request to
259 the host's port 443 for the '/.well-known/host-meta' path.
261 Servers MUST support at least one but SHOULD support both ports
262 unless restricted by other considerations. If both ports are
263 supported, they MUST serve the same document. Clients MAY attempt to
264 obtain the host-meta document from either port, and SHOULD attempt
265 the other port if the first fails, unless restricted by other
266 considerations.
268 For example, the following request is used to obtain the host-meta
269 document for the 'example.com' host:
271 GET /.well-known/host-meta HTTP/1.1
272 Host: example.com
274 If the server response indicates that the host-meta resource is
275 located elsewhere (a 301, 302, or 307 response status codes), the
276 client SHOULD try to obtain the resource from the location provided
277 in the response. This means that the host-meta document for one host
278 MAY be retrieved from a different host. Likewise, if the resource is
279 not available or does not exist (indicated respectively, by the 404
280 and 410 response status codes), the client SHOULD infer that metadata
281 is not available via this mechanism.
283 If a representation is successfully obtained, but is not in the
284 format described above, clients SHOULD infer that the path is being
285 used for other purposes, and not process it as a host-meta document.
286 To aid in this process, authorities using this mechanism SHOULD
287 correctly label host-meta responses with the "application/xrd+xml"
288 internet media type.
290 The scope declared within the host-meta document MUST match the
291 desired host.
293 5. Security Considerations
295 The metadata returned by the host-meta resource is presumed to be
296 under the control of the appropriate authority and representative of
297 all the resources described by it. If this resource is compromised
298 or otherwise under the control of another party, it may represent a
299 risk to the security of the server and data served by it, depending
300 on what protocols use it.
302 The host-meta scope is explicitly declared by the 'hm:Host' elements
303 listed in the document. Clients SHOULD evaluate the authority of a
304 host-meta document obtained from one host to describe any other host.
305 Protocols that change the scope from the one declared in the document
306 without careful consideration can incur security risks.
308 Protocols using host-meta templates SHOULD evaluate the construction
309 of their templates as well as any protocol-specific variables or
310 syntax to ensure that the templates cannot be abused by an attacker.
311 For example, a client can be tricked into following a malicious link
312 due to a poorly constructed template which produces unexpected
313 results when its variable values contain unexpected characters.
315 Protocols MAY restrict document retrieval to HTTPS based on their
316 security needs. Protocols utilizing host-meta documents obtained via
317 other methods not described in this memo SHOULD consider the security
318 and authority risks associated with such methods.
320 6. IANA Considerations
322 6.1. The host-meta Well-Known URI
324 This memo registers the 'host-meta' well-known URI in the Well-Known
325 URI Registry as defined by [I-D.nottingham-site-meta].
326 URI suffix: host-meta
327 Change controller: IETF
328 Specification document(s): [[ this document ]]
329 Related information: None
331 Appendix A. Acknowledgments
333 This memo was initially based on [I-D.nottingham-site-meta].
335 The author would like to acknowledge the contributions of everyone
336 who provided feedback and use cases for this memo; in particular,
337 Dirk Balfanz, DeWitt Clinton, Blaine Cook, Breno de Medeiros, Brad
338 Fitzpatrick, James Manger, Will Norris, Mark Nottingham, John Panzer,
339 and Drummond Reed.
341 Appendix B. Document History
343 [[ to be removed by the RFC editor before publication as an RFC ]]
345 -05
346 o Adjusted syntax to the latest XRD schema.
347 o Added note about using a link template without variables.
349 -04
350 o Corrected the example.
352 -03
353 o Changed scope to an entire host (per RFC 3986).
354 o Simplified template syntax to always percent-encode values and
355 vocabulary to a single 'uri' variable.
356 o Changed document retrieval to always use HTTP(S).
357 o Added security consideration about the use of templates.
358 o Explicitly defined the root element to be 'XRD'.
360 -02
361 o Changed Scope element syntax from attributes to URI-like string
362 value.
364 -01
365 o Editorial rewrite.
366 o Redefined scope as a scheme-authority pair.
367 o Added document structure section.
369 -00
370 o Initial draft.
372 7. Normative References
374 [I-D.nottingham-http-link-header]
375 Nottingham, M., "Web Linking",
376 draft-nottingham-http-link-header-06 (work in progress),
377 July 2009.
379 [I-D.nottingham-site-meta]
380 Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
381 URIs", draft-nottingham-site-meta-03 (work in progress),
382 September 2009.
384 [OASIS.XRD-1.0]
385 Hammer-Lahav, E. and W. Norris, "Extensible Resource
386 Descriptor (XRD) Version 1.0 (work in progress)", .
390 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
391 Requirement Levels", BCP 14, RFC 2119, March 1997.
393 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
394 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
395 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
397 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
399 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
400 Resource Identifier (URI): Generic Syntax", STD 66,
401 RFC 3986, January 2005.
403 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
404 Specifications: ABNF", STD 68, RFC 5234, January 2008.
406 [W3C.REC-P3P-20020416]
407 Marchiori, M., "The Platform for Privacy Preferences 1.0
408 (P3P1.0) Specification", World Wide Web Consortium
409 Recommendation REC-P3P-20020416, April 2002,
410 .
412 [W3C.REC-xml-names-19990114]
413 Hollander, D., Bray, T., and A. Layman, "Namespaces in
414 XML", World Wide Web Consortium FirstEdition REC-xml-
415 names-19990114, January 1999,
416 .
418 [1]
420 Author's Address
422 Eran Hammer-Lahav
423 Yahoo!
425 Email: eran@hueniverse.com
426 URI: http://hueniverse.com