idnits 2.17.1 draft-wilde-sunset-header-04.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 (November 12, 2017) is 2350 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 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 6982 (Obsoleted by RFC 7942) -- Obsolete informational reference (is this intentional?): RFC 7234 (Obsoleted by RFC 9111) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group E. Wilde 3 Internet-Draft CA Technologies 4 Intended status: Standards Track November 12, 2017 5 Expires: May 16, 2018 7 The Sunset HTTP Header 8 draft-wilde-sunset-header-04 10 Abstract 12 This specification defines the Sunset HTTP response header field, 13 which indicates that a URI is likely to become unresponsive at a 14 specified point in the future. It also defines a sunset link 15 relation type that allows linking to resources providing information 16 about an upcoming resource or service sunset. 18 Note to Readers 20 This draft should be discussed on the ART mailing list 21 (). 23 Online access to all versions and files is available on GitHub 24 (). 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at https://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on May 16, 2018. 43 Copyright Notice 45 Copyright (c) 2017 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (https://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.1. Temporary Resources . . . . . . . . . . . . . . . . . . . 3 62 1.2. Migration . . . . . . . . . . . . . . . . . . . . . . . . 3 63 1.3. Retention . . . . . . . . . . . . . . . . . . . . . . . . 3 64 1.4. Deprecation . . . . . . . . . . . . . . . . . . . . . . . 3 65 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 66 3. The Sunset HTTP Response Header . . . . . . . . . . . . . . . 4 67 4. Sunset and Caching . . . . . . . . . . . . . . . . . . . . . 4 68 5. The Sunset Link Relation Type . . . . . . . . . . . . . . . . 5 69 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 70 6.1. The Sunset Response Header . . . . . . . . . . . . . . . 6 71 6.2. The Sunset Link Relation Type . . . . . . . . . . . . . . 6 72 7. Implementation Status . . . . . . . . . . . . . . . . . . . . 6 73 8. Security Considerations . . . . . . . . . . . . . . . . . . . 7 74 9. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 75 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 76 10.1. Normative References . . . . . . . . . . . . . . . . . . 8 77 10.2. Informative References . . . . . . . . . . . . . . . . . 9 78 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 9 79 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 81 1. Introduction 83 As a general rule, URIs should be stable and persistent, so that 84 applications can use them as stable and persistent identifiers for 85 resources. However, there are many scenarios where for a variety of 86 reasons, URIs have a limited lifetime. In some of these scenarios, 87 this limited lifetime is known in advance. In this case, it can be 88 useful for clients if resources make this information about their 89 limited lifetime known. This specification defines the Sunset HTTP 90 response header field, which indicates that a URI is likely to become 91 unresponsive at a specified point in the future. 93 This specification also defines a link relation type "sunset" that 94 allows to provide information about a resource's or a service's 95 sunset policy, and/or upcoming sunsets, and/or possible mitigation 96 scenarios for resource/service users. This specification does not 97 place any constraints on the nature of the linked resource, which can 98 be targeted at humans, at machines, or a combination of both. 100 Possible scenarios for known lifetimes of resources include, but are 101 not limited to the following scenarios. 103 1.1. Temporary Resources 105 Some resources may have a limited lifetime by definition. For 106 example, a pending order represented by a resource may already list 107 all the details of the order, but may only exist for a limited time 108 unless it is confirmed and only then becomes permanent. In such a 109 case, the service managing the pending order can make this limited 110 lifetime explicit, allowing clients to understand that the pending 111 order, unless confirmed, will disappear at some point in time. 113 1.2. Migration 115 If resources are changing identity because a service migrates them, 116 then this may be known in advance. While it may not yet be 117 appropriate to use HTTP redirect status codes (3xx), it may be 118 interesting for clients to learn about the service's plan to take 119 down the original resource. 121 1.3. Retention 123 There are many cases where regulation or legislation require that 124 resources are kept available for a certain amount of time. However, 125 in many cases there also is a requirement for those resources to be 126 permanently deleted after some period of time. Since the deletion of 127 the resource in this scenario is governed by well-defined rules, it 128 could be made explicit for clients interacting with the resource. 130 1.4. Deprecation 132 For Web APIs one standard scenario is that an API or specific subsets 133 of an API may get deprecated. If this is planned in advance, then 134 for the time before the actual deprecation is rolled out, the 135 resources that will be affected by the deprecation can make the date 136 of their deprecation known. This allows consumers of the API to be 137 notified of the upcoming deprecation. 139 2. Terminology 141 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 142 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 143 document are to be interpreted as described in RFC 2119 [RFC2119]. 145 3. The Sunset HTTP Response Header 147 The Sunset HTTP response header field allows a server to communicate 148 the fact that a resource is expected to become unresponsive at a 149 specific point in time. It provides information for clients which 150 they can use to control their usage of the resource. 152 The Sunset header contains a single timestamp which advertises the 153 point in time when the resource is expected to become unresponsive. 154 The Sunset value is an HTTP-date timestamp, as defined in 155 Section 7.1.1.1 of [RFC7231], and SHOULD be a timestamp in the 156 future. 158 Timestamps in the past SHOULD be considered to mean the present time, 159 meaning that the resource is expected to become unavailable at any 160 point in time. 162 Sunset = HTTP-date 164 For example 166 Sunset: Sat, 31 Dec 2018 23:59:59 GMT 168 Clients SHOULD treat Sunset timestamps as hints: It is not guaranteed 169 that the resource will in fact be available until that time, and will 170 not be available after that time. However, since this information is 171 provided by the resource itself, it does have some credibility. 173 After the Sunset time has arrived, it is likely that interactions 174 with the resource will result in client-side errors (HTTP 4xx status 175 codes), redirect responses (HTTP 3xx status codes), or the client 176 might not be able to interact with the resource at all. The Sunset 177 header does not expose any information about which of those behaviors 178 can be expected. 180 Clients not interpreting an existing Sunset header field can operate 181 as usual and simply may experience the resource becoming unavailable 182 without getting any notification about it beforehand. 184 4. Sunset and Caching 186 It should be noted that the Sunset HTTP response header field serves 187 a different purpose than HTTP caching [RFC7234]. HTTP caching is 188 concerned with making resource representations (i.e., represented 189 resource state) reusable, so that they can be more efficiently used. 190 This is achieved by using header fields that allow clients and 191 intermediaries to better understand when a resource representation 192 can be reused, or when resource state (and thus the representation) 193 may have changed. 195 The Sunset header field is not concerned with resource state at all. 196 It only signals that a resource is expected to become unavailable at 197 a specific point in time. There are no assumptions about if, when, 198 or how often a resource may change state in the meantime. 200 For these reasons, the Sunset header field and HTTP caching should be 201 seen as complementary, and not as overlapping in scope and 202 functionality. 204 5. The Sunset Link Relation Type 206 The Sunset HTTP header field indicates the upcoming retirement of a 207 resource or a service. In addition, resource may want to make 208 information available that provides additional information about how 209 retirement will be handled for resources or services. This 210 information can be broadly described by the following three topics: 212 Sunset policy: The policy for which resources and in which way 213 sunsets may occur may be published as part of service's 214 description. Sunsets may only/mostly affect a subset of a 215 service's resources, and may be exposed according to a certain 216 policy (e.g., one week in advance). 218 Upcoming sunset: There may be additional information about an 219 upcoming sunset, which can be published as a resource that can be 220 consumed by those looking for this additional information. 222 Sunset mitigation: There may be information about possible 223 mitigation/migration strategies, such as possible ways how 224 resource users can switch to alternative resources/services. 226 Any information regarding the above issues (and possibly additional 227 ones) can be made available through a URI that then can be linked to 228 using the sunset link relation type. This specification places no 229 constraints on the scope or the type of the linked resource. The 230 scope can be for a resource or for a service. The type is determined 231 by the media type of the linked resource, and can be targeted at 232 humans, at machines, or a combination of both. 234 6. IANA Considerations 235 6.1. The Sunset Response Header 237 The Sunset response header should be added to the permanent registry 238 of message header fields (see [RFC3864]), taking into account the 239 guidelines given by HTTP/1.1 [RFC7231]. 241 Header Field Name: Sunset 243 Applicable Protocol: Hypertext Transfer Protocol (HTTP) 245 Status: Standard 247 Author/Change controller: IETF 249 Specification document(s): RFC XXXX 251 6.2. The Sunset Link Relation Type 253 The sunset link relation type should be added to the permanent 254 registry of link relation types according to Section 4.2 of RFC 8288 255 [RFC8288]: 257 Relation Name: sunset 259 Description: Linking to a resource providing information about a 260 resource's or service's retirement policy and/or information. 262 Reference: RFC XXXX 264 7. Implementation Status 266 Note to RFC Editor: Please remove this section before publication. 268 This section records the status of known implementations of the 269 protocol defined by this specification at the time of posting of this 270 Internet-Draft, and is based on a proposal described in RFC 6982 271 [RFC6982]. The description of implementations in this section is 272 intended to assist the IETF in its decision processes in progressing 273 drafts to RFCs. Please note that the listing of any individual 274 implementation here does not imply endorsement by the IETF. 275 Furthermore, no effort has been spent to verify the information 276 presented here that was supplied by IETF contributors. This is not 277 intended as, and must not be construed to be, a catalog of available 278 implementations or their features. Readers are advised to note that 279 other implementations may exist. 281 According to RFC 6982, "this will allow reviewers and working groups 282 to assign due consideration to documents that have the benefit of 283 running code, which may serve as evidence of valuable experimentation 284 and feedback that have made the implemented protocols more mature. 285 It is up to the individual working groups to use this information as 286 they see fit". 288 Name: https://github.com/hskrasek/guzzle-sunset 290 Licensing: MIT 292 Organization: WeWork 294 Name: https://github.com/wework/faraday-sunset 296 Licensing: MIT 298 Description: A Ruby gem adding HTTP client middleware for Sunset 299 to Faraday 301 Organization: WeWork 303 Name: https://github.com/wework/rails-sunset 305 Licensing: MIT 307 Description: Create shortcuts for backend developers to use Sunset 308 (The Rails Way). 310 8. Security Considerations 312 The Sunset header field should be treated as a resource hint, meaning 313 that the resource is indicating its potential retirement. The 314 definitive test whether or not the resource in fact is available or 315 not will be to attempt to interact with it. Applications should 316 never treat an advertised Sunset date as a definitive prediction that 317 is going to happen at the specified point in time. The Sunset 318 indication may have been inserted by an intermediary, or the 319 advertised date may get changed or withdrawn by the resource owner. 321 The main purpose of the Sunset header field is to signal intent, so 322 that applications using resources may get a warning ahead of time and 323 can react accordingly. What an appropriate reaction is (such as 324 switching to a different resource or service), what it will be based 325 on (such as machine-readable formats that allow the switching to be 326 done automatically), and when it will happen (such as ahead of the 327 advertised date or only when the resource in fact becomes 328 unavailable) is outside the scope of this specification. 330 9. Example 332 Assuming that a resource has been created in an archive that for 333 management or compliance reasons only stores resources for two years, 334 and permanently deletes them afterwards, then the Sunset header field 335 can be used to expose this information. If such a resource has been 336 created on November 11, 2014, then the following header field can be 337 included in responses: 339 Sunset: Fri, 11 Nov 2018 11:11:11 GMT 341 This allows clients that are aware of the Sunset header field to 342 understand that the resource likely will become unavailable at the 343 specified point in time. Clients can decide to ignore this 344 information, adjust their own behavior accordingly, or alert 345 applications or users about this timestamp. 347 Even though the Sunset header information is made available by the 348 resource itself, there is no guarantee that the resource indeed will 349 become unavailable, and if so, how the response will look like for 350 requests made after that timestamp. In case of the archive used as 351 an example here, the resource indeed may be permanently deleted, and 352 requests for the URI after the Sunset timestamp may receive a "410 353 Gone" HTTP response. (This is assuming that the archive keeps track 354 of the URIs that it had previously assigned; if not, the response may 355 be a more generic "404 Not Found".) 357 10. References 359 10.1. Normative References 361 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 362 Requirement Levels", RFC 2119, March 1997. 364 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 365 Procedures for Message Header Fields", BCP 90, RFC 3864, 366 September 2004. 368 [RFC7231] Fielding, R. and J. Reschke, "Hypertext Transfer Protocol 369 (HTTP/1.1): Semantics and Content", RFC 7231, June 2014. 371 [RFC8288] Nottingham, M., "Web Linking", RFC 8288, 372 DOI 10.17487/RFC8288, October 2017, 373 . 375 10.2. Informative References 377 [RFC6982] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 378 Code: The Implementation Status Section", RFC 6982, July 379 2013. 381 [RFC7234] Fielding, R., Nottingham, M., and J. Reschke, "Hypertext 382 Transfer Protocol (HTTP/1.1): Caching", RFC 7234, June 383 2014. 385 Appendix A. Acknowledgements 387 Thanks for comments and suggestions provided by Phil Sturgeon and 388 Asbjoern Ulsberg. 390 Author's Address 392 Erik Wilde 393 CA Technologies 395 Email: erik.wilde@dret.net 396 URI: http://dret.net/netdret/