idnits 2.17.00 (12 Aug 2021)
/tmp/idnits18427/draft-ietf-httpbis-alt-svc-00.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 date (March 28, 2014) is 2975 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)
== Outdated reference: draft-ietf-httpbis-p1-messaging has been published
as RFC 7230
-- Possible downref: Non-RFC (?) normative reference: ref. 'HTTP-p6'
== Outdated reference: draft-ietf-tls-applayerprotoneg has been published
as RFC 7301
== Outdated reference: draft-ietf-httpbis-p2-semantics has been published
as RFC 7231
== Outdated reference: draft-ietf-httpbis-http2 has been published as RFC
7540
-- Obsolete informational reference (is this intentional?): RFC 5246
(Obsoleted by RFC 8446)
Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 3 comments (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
2 HTTPbis Working Group M. Nottingham
3 Internet-Draft Akamai
4 Intended status: Standards Track P. McManus
5 Expires: September 29, 2014 Mozilla
6 J. Reschke
7 greenbytes
8 March 28, 2014
10 HTTP Alternative Services
11 draft-ietf-httpbis-alt-svc-00
13 Abstract
15 This document specifies "alternative services" for HTTP, which allow
16 an origin's resources to be authoritatively available at a separate
17 network location, possibly accessed with a different protocol
18 configuration.
20 Editorial Note (To be removed by RFC Editor)
22 Discussion of this draft takes place on the HTTPBIS working group
23 mailing list (ietf-http-wg@w3.org), which is archived at
24 .
26 Working Group information can be found at
27 ; that specific to HTTP/2 are at
28 .
30 The changes in this draft are summarized in Appendix A.
32 Status of This Memo
34 This Internet-Draft is submitted in full conformance with the
35 provisions of BCP 78 and BCP 79.
37 Internet-Drafts are working documents of the Internet Engineering
38 Task Force (IETF). Note that other groups may also distribute
39 working documents as Internet-Drafts. The list of current Internet-
40 Drafts is at http://datatracker.ietf.org/drafts/current/.
42 Internet-Drafts are draft documents valid for a maximum of six months
43 and may be updated, replaced, or obsoleted by other documents at any
44 time. It is inappropriate to use Internet-Drafts as reference
45 material or to cite them other than as "work in progress."
47 This Internet-Draft will expire on September 29, 2014.
49 Copyright Notice
51 Copyright (c) 2014 IETF Trust and the persons identified as the
52 document authors. All rights reserved.
54 This document is subject to BCP 78 and the IETF Trust's Legal
55 Provisions Relating to IETF Documents
56 (http://trustee.ietf.org/license-info) in effect on the date of
57 publication of this document. Please review these documents
58 carefully, as they describe your rights and restrictions with respect
59 to this document. Code Components extracted from this document must
60 include Simplified BSD License text as described in Section 4.e of
61 the Trust Legal Provisions and are provided without warranty as
62 described in the Simplified BSD License.
64 Table of Contents
66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
67 1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 3
68 2. Alternative Services Concepts . . . . . . . . . . . . . . . . 4
69 2.1. Host Authentication . . . . . . . . . . . . . . . . . . . 5
70 2.2. Alternative Service Caching . . . . . . . . . . . . . . . 6
71 2.3. Requiring Server Name Indication . . . . . . . . . . . . . 6
72 2.4. Using Alternative Services . . . . . . . . . . . . . . . . 6
73 3. The Alt-Svc HTTP Header Field . . . . . . . . . . . . . . . . 7
74 3.1. Caching Alt-Svc Header Field Values . . . . . . . . . . . 8
75 4. The Service HTTP Header Field . . . . . . . . . . . . . . . . 9
76 5. The 4NN Not Authoritative HTTP Status Code . . . . . . . . . . 9
77 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
78 6.1. The Alt-Svc Message Header Field . . . . . . . . . . . . . 10
79 6.2. The Service Message Header Field . . . . . . . . . . . . . 10
80 6.3. The 4NN Not Authoritative HTTP Status Code . . . . . . . . 10
81 7. Security Considerations . . . . . . . . . . . . . . . . . . . 11
82 7.1. Changing Ports . . . . . . . . . . . . . . . . . . . . . . 11
83 7.2. Changing Hosts . . . . . . . . . . . . . . . . . . . . . . 11
84 7.3. Changing Protocols . . . . . . . . . . . . . . . . . . . . 12
85 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12
86 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
87 9.1. Normative References . . . . . . . . . . . . . . . . . . . 12
88 9.2. Informative References . . . . . . . . . . . . . . . . . . 13
89 Appendix A. Change Log (to be removed by RFC Editor before
90 publication) . . . . . . . . . . . . . . . . . . . . 14
91 A.1. Since draft-nottingham-httpbis-alt-svc-05 . . . . . . . . 14
93 1. Introduction
95 HTTP [HTTP-p1] conflates the identification of resources with their
96 location. In other words, "http://" (and "https://") URLs are used
97 to both name and find things to interact with.
99 In some cases, it is desirable to separate these aspects; to be able
100 to keep the same identifier for a resource, but interact with it
101 using a different location on the network.
103 For example:
105 o An origin server might wish to redirect a client to an alternative
106 when it needs to go down for maintenance, or it has found an
107 alternative in a location that is more local to the client.
109 o An origin server might wish to offer access to its resources using
110 a new protocol (such as HTTP/2, see [HTTP2]) or one using improved
111 security (such as TLS, see [RFC5246]).
113 o An origin server might wish to segment its clients into groups of
114 capabilities, such as those supporting Server Name Indication
115 (SNI, see Section 3 of [RFC6066]) and those not supporting it, for
116 operational purposes.
118 This specification defines a new concept in HTTP, "Alternative
119 Services", that allows a resource to nominate additional means of
120 interacting with it on the network. It defines a general framework
121 for this in Section 2, along with a specific mechanism for
122 discovering them using HTTP header fields in Section 3.
124 It also introduces a new status code in Section 5, so that origin
125 servers (or their nominated alternatives) can indicate that they are
126 not authoritative for a given origin, in cases where the wrong
127 location is used.
129 1.1. Notational Conventions
131 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
132 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
133 document are to be interpreted as described in [RFC2119].
135 This document uses the Augmented BNF defined in [RFC5234] along with
136 the "OWS", "DIGIT", "DQUOTE", "parameter", "uri-host", "port" and
137 "delta-second" rules from [HTTP-p1], and uses the "#rule" extension
138 defined in Section 7 of that document.
140 2. Alternative Services Concepts
142 This specification defines a new concept in HTTP, the "alternative
143 service". When an origin (see [RFC6454]) has resources that are
144 accessible through a different protocol / host / port combination, it
145 is said to have an alternative service.
147 An alternative service can be used to interact with the resources on
148 an origin server at a separate location on the network, possibly
149 using a different protocol configuration. Alternative services are
150 considered authoritative for an origin's resources, in the sense of
151 [HTTP-p1], Section 9.1.
153 For example, an origin:
155 ("http", "www.example.com", "80")
157 might declare that its resources are also accessible at the
158 alternative service:
160 ("h2", "new.example.com", "81")
162 By their nature, alternative services are explicitly at the
163 granularity of an origin; i.e., they cannot be selectively applied to
164 resources within an origin.
166 Alternative services do not replace or change the origin for any
167 given resource; in general, they are not visible to the software
168 "above" the access mechanism. The alternative service is essentially
169 alternative routing information that can also be used to reach the
170 origin in the same way that DNS CNAME or SRV records define routing
171 information at the name resolution level. Each origin maps to a set
172 of these routes - the default route is derived from origin itself and
173 the other routes are introduced based on alternative-protocol
174 information.
176 Furthermore, it is important to note that the first member of an
177 alternative service tuple is different from the "scheme" component of
178 an origin; it is more specific, identifying not only the major
179 version of the protocol being used, but potentially communication
180 options for that protocol.
182 This means that clients using an alternative service will change the
183 host, port and protocol that they are using to fetch resources, but
184 these changes MUST NOT be propagated to the application that is using
185 HTTP; from that standpoint, the URI being accessed and all
186 information derived from it (scheme, host, port) are the same as
187 before.
189 Importantly, this includes its security context; in particular, when
190 TLS [RFC5246] is in use, the alternative server will need to present
191 a certificate for the origin's host name, not that of the
192 alternative. Likewise, the Host header field is still derived from
193 the origin, not the alternative service (just as it would if a CNAME
194 were being used).
196 The changes MAY, however, be made visible in debugging tools,
197 consoles, etc.
199 Formally, an alternative service is identified by the combination of:
201 o An ALPN protocol, as per [I-D.ietf-tls-applayerprotoneg]
203 o A host, as per [RFC3986]
205 o A port, as per [RFC3986]
207 Additionally, each alternative service MUST have:
209 o A freshness lifetime, expressed in seconds; see Section 2.2
211 There are many ways that a client could discover the alternative
212 service(s) associated with an origin.
214 2.1. Host Authentication
216 Clients MUST NOT use alternative services with a host other than the
217 origin's without strong server authentication; this mitigates the
218 attack described in Section 7.2. One way to achieve this is for the
219 alternative to use TLS with a certificate that is valid for that
220 origin.
222 For example, if the origin's host is "www.example.com" and an
223 alternative is offered on "other.example.com" with the "h2" protocol,
224 and the certificate offered is valid for "www.example.com", the
225 client can use the alternative. However, if "other.example.com" is
226 offered with the "h2c" protocol, the client cannot use it, because
227 there is no mechanism in that protocol to establish strong server
228 authentication.
230 Furthermore, this means that the HTTP Host header field and the SNI
231 information provided in TLS by the client will be that of the origin,
232 not the alternative.
234 2.2. Alternative Service Caching
236 Mechanisms for discovering alternative services can associate a
237 freshness lifetime with them; for example, the Alt-Svc header field
238 uses the "ma" parameter.
240 Clients MAY choose to use an alternative service instead of the
241 origin at any time when it is considered fresh; see Section 2.4 for
242 specific recommendations.
244 Clients with existing connections to alternative services are not
245 required to fall back to the origin when its freshness lifetime ends;
246 i.e., the caching mechanism is intended for limiting how long an
247 alternative service can be used for establishing new requests, not
248 limiting the use of existing ones.
250 To mitigate risks associated with caching compromised values (see
251 Section 7.2 for details), user agents SHOULD examine cached
252 alternative services when they detect a change in network
253 configuration, and remove any that could be compromised (for example,
254 those whose association with the trust root is questionable). UAs
255 that do not have a means of detecting network changes SHOULD place an
256 upper bound on their lifetime.
258 2.3. Requiring Server Name Indication
260 A client must only use a TLS-based alternative service if the client
261 also supports TLS Server Name Indication (SNI) ([RFC6066], Section
262 3). This supports the conservation of IP addresses on the
263 alternative service host.
265 2.4. Using Alternative Services
267 By their nature, alternative services are optional; clients are not
268 required to use them. However, it is advantageous for clients to
269 behave in a predictable way when they are used by servers (e.g., for
270 load balancing).
272 Therefore, if a client becomes aware of an alternative service, the
273 client SHOULD use that alternative service for all requests to the
274 associated origin as soon as it is available, provided that the
275 security properties of the alternative service protocol are
276 desirable, as compared to the existing connection.
278 When a client uses an alternate service, it MUST emit the Service
279 header field (Section 4) on every request using that alternate
280 service.
282 The client is not required to block requests; the origin's connection
283 can be used until the alternative connection is established.
284 However, if the security properties of the existing connection are
285 weak (e.g. cleartext HTTP/1.1) then it might make sense to block
286 until the new connection is fully available in order to avoid
287 information leakage.
289 Furthermore, if the connection to the alternative service fails or is
290 unresponsive, the client MAY fall back to using the origin. Note,
291 however, that this could be the basis of a downgrade attack, thus
292 losing any enhanced security properties of the alternative service.
294 3. The Alt-Svc HTTP Header Field
296 An HTTP(S) origin server can advertise the availability of
297 alternative services (see Section 2) to clients by adding an Alt-Svc
298 header field to responses.
300 Alt-Svc = 1#( alternative *( OWS ";" OWS parameter ) )
301 alternative = DQUOTE protocol-id DQUOTE "=" port
302 protocol-id =
304 For example:
306 Alt-Svc: "http2"=8000
308 This indicates that the "http2" protocol on the same host using the
309 indicated port (in this case, 8000).
311 Alt-Svc MAY occur in any HTTP response message, regardless of the
312 status code.
314 Alt-Svc does not allow advertisement of alternative services on other
315 hosts, to protect against various header-based attacks.
317 It can, however, have multiple values:
319 Alt-Svc: "h2c"=8000, "h2"=443
321 The value(s) advertised by Alt-Svc can be used by clients to open a
322 new connection to one or more alternative services immediately, or
323 simultaneously with subsequent requests on the same connection.
325 Intermediaries MUST NOT change or append Alt-Svc values.
327 Finally, note that while it may be technically possible to put
328 content other than printable ASCII in a HTTP header field, some
329 implementations only support ASCII (or a superset of it) in header
330 field values. Therefore, this field SHOULD NOT be used to convey
331 protocol identifiers that are not printable ASCII, or those that
332 contain quote characters.
334 [[syntax: The header field syntax is both misleading (use of double
335 quotes although not a quoted string) and incomplete (does not support
336 all values). Alternate proposal in .]]
339 3.1. Caching Alt-Svc Header Field Values
341 When an alternative service is advertised using Alt-Svc, it is
342 considered fresh for 24 hours from generation of the message. This
343 can be modified with the 'ma' (max-age) parameter;
345 Alt-Svc: "h2"=443;ma=3600
347 which indicates the number of seconds since the response was
348 generated the alternative service is considered fresh for.
350 ma = delta-seconds
352 See Section 4.2.3 of [HTTP-p6] for details of determining response
353 age.
355 For example, a response:
357 HTTP/1.1 200 OK
358 Content-Type: text/html
359 Cache-Control: 600
360 Age: 30
361 Alt-Svc: "h2c"=8000; ma=60
363 indicates that an alternative service is available and usable for the
364 next 60 seconds. However, the response has already been cached for
365 30 seconds (as per the Age header field value), so therefore the
366 alternative service is only fresh for the 30 seconds from when this
367 response was received, minus estimated transit time.
369 When an Alt-Svc response header field is received from an origin, its
370 value invalidates and replaces all cached alternative services for
371 that origin.
373 See Section 2.2 for general requirements on caching alternative
374 services.
376 Note that the freshness lifetime for HTTP caching (here, 600 seconds)
377 does not affect caching of Alt-Svc values.
379 4. The Service HTTP Header Field
381 The Service HTTP header field is used in requests to indicate the
382 identity of the alternate service in use, just as the Host header
383 field identifies the host and port of the origin.
385 Service = uri-host [ ":" port ]
387 Service is intended to allow alternate services to detect loops,
388 differentiate traffic for purposes of load balancing, and generally
389 to ensure that it is possible to identify the intended destination of
390 traffic, since introducing this information after a protocol is in
391 use has proven to be problematic.
393 When using an Alternate Service, clients MUST include a Service
394 header in all requests.
396 For example:
398 GET /thing
399 Host: origin.example.com
400 Service: alternate.example.net
401 User-Agent: Example/1.0
403 5. The 4NN Not Authoritative HTTP Status Code
405 The 4NN (Not Authoritative) status code indicates that the current
406 origin server (usually, but not always an alternative service; see
407 Section 2) is not authoritative for the requested resource, in the
408 sense of [HTTP-p1], Section 9.1.
410 Clients receiving 4NN (Not Authoritative) from an alternative service
411 MUST remove the corresponding entry from its alternative service
412 cache (see Section 2.2) for that origin. Regardless of the
413 idempotency of the request method, they MAY retry the request, either
414 at another alternative server, or at the origin.
416 4NN (Not Authoritative) MAY carry an Alt-Svc header field.
418 This status code MUST NOT be generated by proxies.
420 A 4NN response is cacheable by default; i.e., unless otherwise
421 indicated by the method definition or explicit cache controls (see
422 Section 4.2.2 of [HTTP-p6]).
424 [[code: We should decide on the status code before Last Call.]]
426 6. IANA Considerations
428 6.1. The Alt-Svc Message Header Field
430 This document registers Alt-Svc in the Permanent Message Header
431 Registry [RFC3864].
433 o Header Field Name: Alt-Svc
435 o Application Protocol: http
437 o Status: standard
439 o Author/Change Controller: IETF
441 o Specification Document: [this document]
443 o Related Information:
445 6.2. The Service Message Header Field
447 This document registers Alt-Svc in the Permanent Message Header
448 Registry [RFC3864].
450 o Header Field Name: Service
452 o Application Protocol: http
454 o Status: standard
456 o Author/Change Controller: IETF
458 o Specification Document: [this document]
460 o Related Information:
462 6.3. The 4NN Not Authoritative HTTP Status Code
464 This document registers the 4NN (Not Authoritative) HTTP Status code
465 ([HTTP-p2], Section 8.2).
467 o Status Code: 4NN
469 o Short Description: Not Authoritative
471 o Specification: [this document], Section 5
473 7. Security Considerations
475 Identified security considerations should be enumerated in the
476 appropriate documents depending on which proposals are accepted.
477 Those listed below are generic to all uses of alternative services;
478 more specific ones might be necessary.
480 7.1. Changing Ports
482 Using an alternative service implies accessing an origin's resources
483 on an alternative port, at a minimum. An attacker that can inject
484 alternative services and listen at the advertised port is therefore
485 able to hijack an origin.
487 For example, an attacker that can add HTTP response header fields can
488 redirect traffic to a different port on the same host using the Alt-
489 Svc header field; if that port is under the attacker's control, they
490 can thus masquerade as the HTTP server.
492 This risk can be mitigated by restricting the ability to advertise
493 alternative services, and restricting who can open a port for
494 listening on that host.
496 7.2. Changing Hosts
498 When the host is changed due to the use of an alternative service, it
499 presents an opportunity for attackers to hijack communication to an
500 origin.
502 For example, if an attacker can convince a user agent to send all
503 traffic for "innocent.example.org" to "evil.example.com" by
504 successfully associating it as an alternative service, they can
505 masquerade as that origin. This can be done locally (see mitigations
506 above) or remotely (e.g., by an intermediary as a man-in-the-middle
507 attack).
509 This is the reason for the requirement in Section 2.1 that any
510 alternative service with a host different to the origin's be strongly
511 authenticated with the origin's identity; i.e., presenting a
512 certificate for the origin proves that the alternative service is
513 authorized to serve traffic for the origin.
515 However, this authorization is only as strong as the method used to
516 authenticate the alternative service. In particular, there are well-
517 known exploits to make an attacker's certificate appear as
518 legitimate.
520 Alternative services could be used to persist such an attack; for
521 example, an intermediary could man-in-the-middle TLS-protected
522 communication to a target, and then direct all traffic to an
523 alternative service with a large freshness lifetime, so that the user
524 agent still directs traffic to the attacker even when not using the
525 intermediary.
527 As a result, there is a requirement in Section 2.2 to examine cached
528 alternative services when a network change is detected.
530 7.3. Changing Protocols
532 When the ALPN protocol is changed due to the use of an alternative
533 service, the security properties of the new connection to the origin
534 can be different from that of the "normal" connection to the origin,
535 because the protocol identifier itself implies this.
537 For example, if a "https://" URI had a protocol advertised that does
538 not use some form of end-to-end encryption (most likely, TLS), it
539 violates the expectations for security that the URI scheme implies.
541 Therefore, clients cannot blindly use alternative services, but
542 instead evaluate the option(s) presented to assure that security
543 requirements and expectations (of specifications, implementations and
544 end users) are met.
546 8. Acknowledgements
548 Thanks to Eliot Lear, Stephen Farrell, Guy Podjarny, Stephen Ludin,
549 Erik Nygren, Paul Hoffman, Adam Langley, Will Chan and Richard Barnes
550 for their feedback and suggestions.
552 The Alt-Svc header field was influenced by the design of the
553 Alternative-Protocol header field in SPDY.
555 9. References
557 9.1. Normative References
559 [HTTP-p1] Fielding, R., Ed. and J. Reschke,
560 Ed., "Hypertext Transfer Protocol
561 (HTTP/1.1): Message Syntax and
562 Routing",
563 draft-ietf-httpbis-p1-messaging-26
564 (work in progress), February 2014.
566 [HTTP-p6] Fielding, R., Ed., Nottingham, M.,
567 Ed., and J. Reschke, Ed., "Hypertext
568 Transfer Protocol (HTTP/1.1):
570 Caching",
571 draft-ietf-httpbis-p6-cache-26 (work
572 in progress), February 2014.
574 [I-D.ietf-tls-applayerprotoneg] Friedl, S., Popov, A., Langley, A.,
575 and S. Emile, "Transport Layer
576 Security (TLS) Application Layer
577 Protocol Negotiation Extension",
578 draft-ietf-tls-applayerprotoneg-05
579 (work in progress), March 2014.
581 [RFC2119] Bradner, S., "Key words for use in
582 RFCs to Indicate Requirement
583 Levels", BCP 14, RFC 2119,
584 March 1997.
586 [RFC3986] Berners-Lee, T., Fielding, R., and
587 L. Masinter, "Uniform Resource
588 Identifier (URI): Generic Syntax",
589 STD 66, RFC 3986, January 2005.
591 [RFC5234] Crocker, D. and P. Overell,
592 "Augmented BNF for Syntax
593 Specifications: ABNF", STD 68,
594 RFC 5234, January 2008.
596 [RFC6066] Eastlake, D., "Transport Layer
597 Security (TLS) Extensions: Extension
598 Definitions", RFC 6066,
599 January 2011.
601 [RFC6454] Barth, A., "The Web Origin Concept",
602 RFC 6454, December 2011.
604 9.2. Informative References
606 [HTTP-p2] Fielding, R., Ed. and J. Reschke,
607 Ed., "Hypertext Transfer Protocol
608 (HTTP/1.1): Semantics and Content",
609 draft-ietf-httpbis-p2-semantics-26
610 (work in progress), February 2014.
612 [HTTP2] Belshe, M., Peon, R., and M.
613 Thomson, Ed., "Hypertext Transfer
614 Protocol version 2",
615 draft-ietf-httpbis-http2-10 (work in
616 progress), February 2014.
618 [RFC3864] Klyne, G., Nottingham, M., and J.
619 Mogul, "Registration Procedures for
620 Message Header Fields", BCP 90,
621 RFC 3864, September 2004.
623 [RFC5246] Dierks, T. and E. Rescorla, "The
624 Transport Layer Security (TLS)
625 Protocol Version 1.2", RFC 5246,
626 August 2008.
628 Appendix A. Change Log (to be removed by RFC Editor before publication)
630 A.1. Since draft-nottingham-httpbis-alt-svc-05
632 This is the first version after adoption of
633 draft-nottingham-httpbis-alt-svc-05 as Working Group work item. It
634 only contains editorial changes.
636 Authors' Addresses
638 Mark Nottingham
639 Akamai
641 EMail: mnot@mnot.net
642 URI: http://www.mnot.net/
644 Patrick McManus
645 Mozilla
647 EMail: mcmanus@ducksong.com
648 URI: https://mozillians.org/u/pmcmanus/
650 Julian F. Reschke
651 greenbytes GmbH
653 EMail: julian.reschke@greenbytes.de
654 URI: http://greenbytes.de/tech/webdav/