idnits 2.17.1 draft-wilde-sunset-header-05.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 (May 7, 2018) is 2179 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) -- Looks like a reference, but probably isn't: '1' on line 398 ** 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 (==), 4 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 May 7, 2018 5 Expires: November 8, 2018 7 The Sunset HTTP Header 8 draft-wilde-sunset-header-05 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 November 8, 2018. 43 Copyright Notice 45 Copyright (c) 2018 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 . . . . . . . . . . . . . . . . . . . . . . . . . 4 66 3. The Sunset HTTP Response Header . . . . . . . . . . . . . . . 4 67 4. Sunset and Caching . . . . . . . . . . . . . . . . . . . . . 5 68 5. The Sunset Link Relation Type . . . . . . . . . . . . . . . . 5 69 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 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 10.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 9 79 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 9 80 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 82 1. Introduction 84 As a general rule, URIs should be stable and persistent, so that 85 applications can use them as stable and persistent identifiers for 86 resources. However, there are many scenarios where for a variety of 87 reasons, URIs have a limited lifetime. In some of these scenarios, 88 this limited lifetime is known in advance. In this case, it can be 89 useful for clients if resources make this information about their 90 limited lifetime known. This specification defines the Sunset HTTP 91 response header field, which indicates that a URI is likely to become 92 unresponsive at a specified point in the future. 94 This specification also defines a link relation type "sunset" that 95 allows to provide information about a resource's or a service's 96 sunset policy, and/or upcoming sunsets, and/or possible mitigation 97 scenarios for resource/service users. This specification does not 98 place any constraints on the nature of the linked resource, which can 99 be targeted at humans, at machines, or a combination of both. 101 Possible scenarios for known lifetimes of resources include, but are 102 not limited to the following scenarios. 104 1.1. Temporary Resources 106 Some resources may have a limited lifetime by definition. For 107 example, a pending order represented by a resource may already list 108 all the details of the order, but may only exist for a limited time 109 unless it is confirmed and only then becomes permanent. In such a 110 case, the service managing the pending order can make this limited 111 lifetime explicit, allowing clients to understand that the pending 112 order, unless confirmed, will disappear at some point in time. 114 1.2. Migration 116 If resources are changing identity because a service migrates them, 117 then this may be known in advance. While it may not yet be 118 appropriate to use HTTP redirect status codes (3xx), it may be 119 interesting for clients to learn about the service's plan to take 120 down the original resource. 122 1.3. Retention 124 There are many cases where regulation or legislation require that 125 resources are kept available for a certain amount of time. However, 126 in many cases there also is a requirement for those resources to be 127 permanently deleted after some period of time. Since the deletion of 128 the resource in this scenario is governed by well-defined rules, it 129 could be made explicit for clients interacting with the resource. 131 1.4. Deprecation 133 For Web APIs one standard scenario is that an API or specific subsets 134 of an API may get deprecated. If this is planned in advance, then 135 for the time before the actual deprecation is rolled out, the 136 resources that will be affected by the deprecation can make the date 137 of their deprecation known. This allows consumers of the API to be 138 notified of the upcoming deprecation. 140 2. Terminology 142 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 143 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 144 document are to be interpreted as described in RFC 2119 [RFC2119]. 146 3. The Sunset HTTP Response Header 148 The Sunset HTTP response header field allows a server to communicate 149 the fact that a resource is expected to become unresponsive at a 150 specific point in time. It provides information for clients which 151 they can use to control their usage of the resource. 153 The Sunset header contains a single timestamp which advertises the 154 point in time when the resource is expected to become unresponsive. 155 The Sunset value is an HTTP-date timestamp, as defined in 156 Section 7.1.1.1 of [RFC7231], and SHOULD be a timestamp in the 157 future. 159 Timestamps in the past SHOULD be considered to mean the present time, 160 meaning that the resource is expected to become unavailable at any 161 point in time. 163 Sunset = HTTP-date 165 For example 167 Sunset: Sat, 31 Dec 2018 23:59:59 GMT 169 Clients SHOULD treat Sunset timestamps as hints: It is not guaranteed 170 that the resource will in fact be available until that time, and will 171 not be available after that time. However, since this information is 172 provided by the resource itself, it does have some credibility. 174 After the Sunset time has arrived, it is likely that interactions 175 with the resource will result in client-side errors (HTTP 4xx status 176 codes), redirect responses (HTTP 3xx status codes), or the client 177 might not be able to interact with the resource at all. The Sunset 178 header does not expose any information about which of those behaviors 179 can be expected. 181 Clients not interpreting an existing Sunset header field can operate 182 as usual and simply may experience the resource becoming unavailable 183 without getting any notification about it beforehand. 185 4. Sunset and Caching 187 It should be noted that the Sunset HTTP response header field serves 188 a different purpose than HTTP caching [RFC7234]. HTTP caching is 189 concerned with making resource representations (i.e., represented 190 resource state) reusable, so that they can be more efficiently used. 191 This is achieved by using header fields that allow clients and 192 intermediaries to better understand when a resource representation 193 can be reused, or when resource state (and thus the representation) 194 may have changed. 196 The Sunset header field is not concerned with resource state at all. 197 It only signals that a resource is expected to become unavailable at 198 a specific point in time. There are no assumptions about if, when, 199 or how often a resource may change state in the meantime. 201 For these reasons, the Sunset header field and HTTP caching should be 202 seen as complementary, and not as overlapping in scope and 203 functionality. 205 5. The Sunset Link Relation Type 207 The Sunset HTTP header field indicates the upcoming retirement of a 208 resource or a service. In addition, resource may want to make 209 information available that provides additional information about how 210 retirement will be handled for resources or services. This 211 information can be broadly described by the following three topics: 213 Sunset policy: The policy for which resources and in which way 214 sunsets may occur may be published as part of service's 215 description. Sunsets may only/mostly affect a subset of a 216 service's resources, and may be exposed according to a certain 217 policy (e.g., one week in advance). 219 Upcoming sunset: There may be additional information about an 220 upcoming sunset, which can be published as a resource that can be 221 consumed by those looking for this additional information. 223 Sunset mitigation: There may be information about possible 224 mitigation/migration strategies, such as possible ways how 225 resource users can switch to alternative resources/services. 227 Any information regarding the above issues (and possibly additional 228 ones) can be made available through a URI that then can be linked to 229 using the sunset link relation type. This specification places no 230 constraints on the scope or the type of the linked resource. The 231 scope can be for a resource or for a service. The type is determined 232 by the media type of the linked resource, and can be targeted at 233 humans, at machines, or a combination of both. 235 6. IANA Considerations 237 6.1. The Sunset Response Header 239 The Sunset response header should be added to the permanent registry 240 of message header fields (see [RFC3864]), taking into account the 241 guidelines given by HTTP/1.1 [RFC7231]. 243 Header Field Name: Sunset 245 Applicable Protocol: Hypertext Transfer Protocol (HTTP) 247 Status: Standard 249 Author/Change controller: IETF 251 Specification document(s): RFC XXXX 253 6.2. The Sunset Link Relation Type 255 The sunset link relation type should be added to the permanent 256 registry of link relation types according to Section 4.2 of RFC 8288 257 [RFC8288]: 259 Relation Name: sunset 261 Description: Linking to a resource providing information about a 262 resource's or service's retirement policy and/or information. 264 Reference: RFC XXXX 266 7. Implementation Status 268 Note to RFC Editor: Please remove this section before publication. 270 This section records the status of known implementations of the 271 protocol defined by this specification at the time of posting of this 272 Internet-Draft, and is based on a proposal described in RFC 6982 273 [RFC6982]. The description of implementations in this section is 274 intended to assist the IETF in its decision processes in progressing 275 drafts to RFCs. Please note that the listing of any individual 276 implementation here does not imply endorsement by the IETF. 277 Furthermore, no effort has been spent to verify the information 278 presented here that was supplied by IETF contributors. This is not 279 intended as, and must not be construed to be, a catalog of available 280 implementations or their features. Readers are advised to note that 281 other implementations may exist. 283 According to RFC 6982, "this will allow reviewers and working groups 284 to assign due consideration to documents that have the benefit of 285 running code, which may serve as evidence of valuable experimentation 286 and feedback that have made the implemented protocols more mature. 287 It is up to the individual working groups to use this information as 288 they see fit". 290 Name: https://github.com/hskrasek/guzzle-sunset 292 Licensing: MIT 294 Organization: WeWork 296 Name: https://github.com/wework/faraday-sunset 298 Licensing: MIT 300 Description: A Ruby gem adding HTTP client middleware for Sunset 301 to Faraday 303 Organization: WeWork 305 Name: https://github.com/wework/rails-sunset 307 Licensing: MIT 309 Description: Create shortcuts for backend developers to use Sunset 310 (The Rails Way). 312 Organization: Tyk Technologies 314 Name: https://github.com/TykTechnologies/tyk 316 Licensing: Mozilla Public License Version 2.0 318 Description: Configurable HTTP header for API version expiry. 319 (GitHub issue [1]) 321 8. Security Considerations 323 The Sunset header field should be treated as a resource hint, meaning 324 that the resource is indicating its potential retirement. The 325 definitive test whether or not the resource in fact is available or 326 not will be to attempt to interact with it. Applications should 327 never treat an advertised Sunset date as a definitive prediction that 328 is going to happen at the specified point in time. The Sunset 329 indication may have been inserted by an intermediary, or the 330 advertised date may get changed or withdrawn by the resource owner. 332 The main purpose of the Sunset header field is to signal intent, so 333 that applications using resources may get a warning ahead of time and 334 can react accordingly. What an appropriate reaction is (such as 335 switching to a different resource or service), what it will be based 336 on (such as machine-readable formats that allow the switching to be 337 done automatically), and when it will happen (such as ahead of the 338 advertised date or only when the resource in fact becomes 339 unavailable) is outside the scope of this specification. 341 9. Example 343 Assuming that a resource has been created in an archive that for 344 management or compliance reasons only stores resources for two years, 345 and permanently deletes them afterwards, then the Sunset header field 346 can be used to expose this information. If such a resource has been 347 created on November 11, 2014, then the following header field can be 348 included in responses: 350 Sunset: Fri, 11 Nov 2018 11:11:11 GMT 352 This allows clients that are aware of the Sunset header field to 353 understand that the resource likely will become unavailable at the 354 specified point in time. Clients can decide to ignore this 355 information, adjust their own behavior accordingly, or alert 356 applications or users about this timestamp. 358 Even though the Sunset header information is made available by the 359 resource itself, there is no guarantee that the resource indeed will 360 become unavailable, and if so, how the response will look like for 361 requests made after that timestamp. In case of the archive used as 362 an example here, the resource indeed may be permanently deleted, and 363 requests for the URI after the Sunset timestamp may receive a "410 364 Gone" HTTP response. (This is assuming that the archive keeps track 365 of the URIs that it had previously assigned; if not, the response may 366 be a more generic "404 Not Found".) 368 10. References 370 10.1. Normative References 372 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 373 Requirement Levels", RFC 2119, March 1997. 375 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 376 Procedures for Message Header Fields", BCP 90, RFC 3864, 377 September 2004. 379 [RFC7231] Fielding, R. and J. Reschke, "Hypertext Transfer Protocol 380 (HTTP/1.1): Semantics and Content", RFC 7231, June 2014. 382 [RFC8288] Nottingham, M., "Web Linking", RFC 8288, 383 DOI 10.17487/RFC8288, October 2017, 384 . 386 10.2. Informative References 388 [RFC6982] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 389 Code: The Implementation Status Section", RFC 6982, July 390 2013. 392 [RFC7234] Fielding, R., Nottingham, M., and J. Reschke, "Hypertext 393 Transfer Protocol (HTTP/1.1): Caching", RFC 7234, June 394 2014. 396 10.3. URIs 398 [1] https://github.com/TykTechnologies/tyk/issues/1626 400 Appendix A. Acknowledgements 402 Thanks for comments and suggestions provided by Phil Sturgeon and 403 Asbjoern Ulsberg. 405 Author's Address 407 Erik Wilde 408 CA Technologies 410 Email: erik.wilde@dret.net 411 URI: http://dret.net/netdret/