idnits 2.17.1 draft-ietf-httpbis-p7-auth-24.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 draft header indicates that this document obsoletes RFC2616, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC2617, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC2617, updated by this document, for RFC5378 checks: 1997-12-01) -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (September 25, 2013) is 3863 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: A later version (-26) exists of draft-ietf-httpbis-p1-messaging-24 == Outdated reference: A later version (-26) exists of draft-ietf-httpbis-p2-semantics-24 == Outdated reference: A later version (-26) exists of draft-ietf-httpbis-p6-cache-24 -- Obsolete informational reference (is this intentional?): RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Obsolete informational reference (is this intentional?): RFC 2617 (Obsoleted by RFC 7235, RFC 7615, RFC 7616, RFC 7617) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTPbis Working Group R. Fielding, Ed. 3 Internet-Draft Adobe 4 Obsoletes: 2616 (if approved) J. Reschke, Ed. 5 Updates: 2617 (if approved) greenbytes 6 Intended status: Standards Track September 25, 2013 7 Expires: March 29, 2014 9 Hypertext Transfer Protocol (HTTP/1.1): Authentication 10 draft-ietf-httpbis-p7-auth-24 12 Abstract 14 The Hypertext Transfer Protocol (HTTP) is an application-level 15 protocol for distributed, collaborative, hypermedia information 16 systems. This document defines the HTTP Authentication framework. 18 Editorial Note (To be removed by RFC Editor) 20 Discussion of this draft takes place on the HTTPBIS working group 21 mailing list (ietf-http-wg@w3.org), which is archived at 22 . 24 The current issues list is at 25 and related 26 documents (including fancy diffs) can be found at 27 . 29 The changes in this draft are summarized in Appendix D.5. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at http://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on March 29, 2014. 48 Copyright Notice 49 Copyright (c) 2013 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (http://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 This document may contain material from IETF Documents or IETF 63 Contributions published or made publicly available before November 64 10, 2008. The person(s) controlling the copyright in some of this 65 material may not have granted the IETF Trust the right to allow 66 modifications of such material outside the IETF Standards Process. 67 Without obtaining an adequate license from the person(s) controlling 68 the copyright in such materials, this document may not be modified 69 outside the IETF Standards Process, and derivative works of it may 70 not be created outside the IETF Standards Process, except to format 71 it for publication as an RFC or to translate it into languages other 72 than English. 74 Table of Contents 76 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 77 1.1. Conformance and Error Handling . . . . . . . . . . . . . . 4 78 1.2. Syntax Notation . . . . . . . . . . . . . . . . . . . . . 4 79 2. Access Authentication Framework . . . . . . . . . . . . . . . 4 80 2.1. Challenge and Response . . . . . . . . . . . . . . . . . . 4 81 2.2. Protection Space (Realm) . . . . . . . . . . . . . . . . . 6 82 3. Status Code Definitions . . . . . . . . . . . . . . . . . . . 7 83 3.1. 401 Unauthorized . . . . . . . . . . . . . . . . . . . . . 7 84 3.2. 407 Proxy Authentication Required . . . . . . . . . . . . 7 85 4. Header Field Definitions . . . . . . . . . . . . . . . . . . . 7 86 4.1. Authorization . . . . . . . . . . . . . . . . . . . . . . 8 87 4.2. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . . 8 88 4.3. Proxy-Authorization . . . . . . . . . . . . . . . . . . . 8 89 4.4. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . . 9 90 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 91 5.1. Authentication Scheme Registry . . . . . . . . . . . . . . 10 92 5.1.1. Procedure . . . . . . . . . . . . . . . . . . . . . . 10 93 5.1.2. Considerations for New Authentication Schemes . . . . 10 94 5.2. Status Code Registration . . . . . . . . . . . . . . . . . 11 95 5.3. Header Field Registration . . . . . . . . . . . . . . . . 12 96 6. Security Considerations . . . . . . . . . . . . . . . . . . . 12 97 6.1. Authentication Credentials and Idle Clients . . . . . . . 12 98 6.2. Protection Spaces . . . . . . . . . . . . . . . . . . . . 13 99 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 13 100 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 14 101 8.1. Normative References . . . . . . . . . . . . . . . . . . . 14 102 8.2. Informative References . . . . . . . . . . . . . . . . . . 14 103 Appendix A. Changes from RFCs 2616 and 2617 . . . . . . . . . . . 15 104 Appendix B. Imported ABNF . . . . . . . . . . . . . . . . . . . . 15 105 Appendix C. Collected ABNF . . . . . . . . . . . . . . . . . . . 15 106 Appendix D. Change Log (to be removed by RFC Editor before 107 publication) . . . . . . . . . . . . . . . . . . . . 16 108 D.1. Since draft-ietf-httpbis-p7-auth-19 . . . . . . . . . . . 16 109 D.2. Since draft-ietf-httpbis-p7-auth-20 . . . . . . . . . . . 17 110 D.3. Since draft-ietf-httpbis-p7-auth-21 . . . . . . . . . . . 17 111 D.4. Since draft-ietf-httpbis-p7-auth-22 . . . . . . . . . . . 17 112 D.5. Since draft-ietf-httpbis-p7-auth-23 . . . . . . . . . . . 17 113 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 115 1. Introduction 117 This document defines HTTP/1.1 access control and authentication. It 118 includes the relevant parts of RFC 2616 with only minor changes 119 ([RFC2616]), plus the general framework for HTTP authentication, as 120 previously defined in "HTTP Authentication: Basic and Digest Access 121 Authentication" ([RFC2617]). 123 HTTP provides several OPTIONAL challenge-response authentication 124 schemes that can be used by a server to challenge a client request 125 and by a client to provide authentication information. The "basic" 126 and "digest" authentication schemes continue to be specified in RFC 127 2617. 129 1.1. Conformance and Error Handling 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 Conformance criteria and considerations regarding error handling are 136 defined in Section 2.5 of [Part1]. 138 1.2. Syntax Notation 140 This specification uses the Augmented Backus-Naur Form (ABNF) 141 notation of [RFC5234] with the list rule extension defined in Section 142 7 of [Part1]. Appendix B describes rules imported from other 143 documents. Appendix C shows the collected ABNF with the list rule 144 expanded. 146 2. Access Authentication Framework 148 2.1. Challenge and Response 150 HTTP provides a simple challenge-response authentication framework 151 that can be used by a server to challenge a client request and by a 152 client to provide authentication information. It uses a case- 153 insensitive token as a means to identify the authentication scheme, 154 followed by additional information necessary for achieving 155 authentication via that scheme. The latter can either be a comma- 156 separated list of parameters or a single sequence of characters 157 capable of holding base64-encoded information. 159 Parameters are name-value pairs where the name is matched case- 160 insensitively, and each parameter name MUST only occur once per 161 challenge. 163 auth-scheme = token 165 auth-param = token BWS "=" BWS ( token / quoted-string ) 167 token68 = 1*( ALPHA / DIGIT / 168 "-" / "." / "_" / "~" / "+" / "/" ) *"=" 170 The "token68" syntax allows the 66 unreserved URI characters 171 ([RFC3986]), plus a few others, so that it can hold a base64, 172 base64url (URL and filename safe alphabet), base32, or base16 (hex) 173 encoding, with or without padding, but excluding whitespace 174 ([RFC4648]). 176 The 401 (Unauthorized) response message is used by an origin server 177 to challenge the authorization of a user agent. This response MUST 178 include a WWW-Authenticate header field containing at least one 179 challenge applicable to the requested resource. 181 The 407 (Proxy Authentication Required) response message is used by a 182 proxy to challenge the authorization of a client and MUST include a 183 Proxy-Authenticate header field containing at least one challenge 184 applicable to the proxy for the requested resource. 186 challenge = auth-scheme [ 1*SP ( token68 / #auth-param ) ] 188 Note: User agents will need to take special care in parsing the 189 WWW-Authenticate and Proxy-Authenticate header field values 190 because they can contain more than one challenge, or if more than 191 one of each is provided, since the contents of a challenge can 192 itself contain a comma-separated list of authentication 193 parameters. 195 Note: Many clients fail to parse challenges containing unknown 196 schemes. A workaround for this problem is to list well-supported 197 schemes (such as "basic") first. 199 A user agent that wishes to authenticate itself with an origin server 200 -- usually, but not necessarily, after receiving a 401 (Unauthorized) 201 -- can do so by including an Authorization header field with the 202 request. 204 A client that wishes to authenticate itself with a proxy -- usually, 205 but not necessarily, after receiving a 407 (Proxy Authentication 206 Required) -- can do so by including a Proxy-Authorization header 207 field with the request. 209 Both the Authorization field value and the Proxy-Authorization field 210 value contain the client's credentials for the realm of the resource 211 being requested, based upon a challenge received in a response 212 (possibly at some point in the past). When creating their values, 213 the user agent ought to do so by selecting the challenge with what it 214 considers to be the most secure auth-scheme that it understands, 215 obtaining credentials from the user as appropriate. 217 credentials = auth-scheme [ 1*SP ( token68 / #auth-param ) ] 219 Upon a request for a protected resource that omits credentials, 220 contains invalid credentials (e.g., a bad password) or partial 221 credentials (e.g., when the authentication scheme requires more than 222 one round trip), an origin server SHOULD send a 401 (Unauthorized) 223 response that contains a WWW-Authenticate header field with at least 224 one (possibly new) challenge applicable to the requested resource. 226 Likewise, upon a request that requires authentication by proxies that 227 omit credentials or contain invalid or partial credentials, a proxy 228 SHOULD send a 407 (Proxy Authentication Required) response that 229 contains a Proxy-Authenticate header field with a (possibly new) 230 challenge applicable to the proxy. 232 A server receiving credentials that are valid, but not adequate to 233 gain access, ought to respond with the 403 (Forbidden) status code 234 (Section 6.5.3 of [Part2]). 236 The HTTP protocol does not restrict applications to this simple 237 challenge-response framework for access authentication. Additional 238 mechanisms MAY be used, such as encryption at the transport level or 239 via message encapsulation, and with additional header fields 240 specifying authentication information. However, such additional 241 mechanisms are not defined by this specification. 243 A proxy MUST forward the WWW-Authenticate and Authorization header 244 fields unmodified and follow the rules found in Section 4.1. 246 2.2. Protection Space (Realm) 248 The authentication parameter realm is reserved for use by 249 authentication schemes that wish to indicate the scope of protection. 251 A protection space is defined by the canonical root URI (the scheme 252 and authority components of the effective request URI; see Section 253 5.5 of [Part1]) of the server being accessed, in combination with the 254 realm value if present. These realms allow the protected resources 255 on a server to be partitioned into a set of protection spaces, each 256 with its own authentication scheme and/or authorization database. 257 The realm value is a string, generally assigned by the origin server, 258 which can have additional semantics specific to the authentication 259 scheme. Note that a response can have multiple challenges with the 260 same auth-scheme but different realms. 262 The protection space determines the domain over which credentials can 263 be automatically applied. If a prior request has been authorized, 264 the user agent MAY reuse the same credentials for all other requests 265 within that protection space for a period of time determined by the 266 authentication scheme, parameters, and/or user preference. Unless 267 specifically allowed by the authentication scheme, a single 268 protection space cannot extend outside the scope of its server. 270 For historical reasons, a sender MUST only generate the quoted-string 271 syntax. Recipients might have to support both token and quoted- 272 string syntax for maximum interoperability with existing clients that 273 have been accepting both notations for a long time. 275 3. Status Code Definitions 277 3.1. 401 Unauthorized 279 The 401 (Unauthorized) status code indicates that the request has not 280 been applied because it lacks valid authentication credentials for 281 the target resource. The origin server MUST send a WWW-Authenticate 282 header field (Section 4.4) containing at least one challenge 283 applicable to the target resource. If the request included 284 authentication credentials, then the 401 response indicates that 285 authorization has been refused for those credentials. The user agent 286 MAY repeat the request with a new or replaced Authorization header 287 field (Section 4.1). If the 401 response contains the same challenge 288 as the prior response, and the user agent has already attempted 289 authentication at least once, then the user agent SHOULD present the 290 enclosed representation to the user, since it usually contains 291 relevant diagnostic information. 293 3.2. 407 Proxy Authentication Required 295 The 407 (Proxy Authentication Required) status code is similar to 401 296 (Unauthorized), but indicates that the client needs to authenticate 297 itself in order to use a proxy. The proxy MUST send a Proxy- 298 Authenticate header field (Section 4.2) containing a challenge 299 applicable to that proxy for the target resource. The client MAY 300 repeat the request with a new or replaced Proxy-Authorization header 301 field (Section 4.3). 303 4. Header Field Definitions 305 This section defines the syntax and semantics of HTTP/1.1 header 306 fields related to authentication. 308 4.1. Authorization 310 The "Authorization" header field allows a user agent to authenticate 311 itself with an origin server -- usually, but not necessarily, after 312 receiving a 401 (Unauthorized) response. Its value consists of 313 credentials containing the authentication information of the user 314 agent for the realm of the resource being requested. 316 Authorization = credentials 318 If a request is authenticated and a realm specified, the same 319 credentials are presumed to be valid for all other requests within 320 this realm (assuming that the authentication scheme itself does not 321 require otherwise, such as credentials that vary according to a 322 challenge value or using synchronized clocks). 324 See Section 3.2 of [Part6] for details of and requirements pertaining 325 to handling of the Authorization field by HTTP caches. 327 4.2. Proxy-Authenticate 329 The "Proxy-Authenticate" header field consists of at least one 330 challenge that indicates the authentication scheme(s) and parameters 331 applicable to the proxy for this effective request URI (Section 5.5 332 of [Part1]). It MUST be included as part of a 407 (Proxy 333 Authentication Required) response. 335 Proxy-Authenticate = 1#challenge 337 Unlike WWW-Authenticate, the Proxy-Authenticate header field applies 338 only to the next outbound client on the response chain that chose to 339 direct its request to the responding proxy. If that recipient is 340 also a proxy, it will generally consume the Proxy-Authenticate header 341 field (and generate an appropriate Proxy-Authorization in a 342 subsequent request) rather than forward the header field to its own 343 outbound clients. However, if a recipient proxy needs to obtain its 344 own credentials by requesting them from a further outbound client, it 345 will generate its own 407 response, which might have the appearance 346 of forwarding the Proxy-Authenticate header field if both proxies use 347 the same challenge set. 349 Note that the parsing considerations for WWW-Authenticate apply to 350 this header field as well; see Section 4.4 for details. 352 4.3. Proxy-Authorization 354 The "Proxy-Authorization" header field allows the client to identify 355 itself (or its user) to a proxy that requires authentication. Its 356 value consists of credentials containing the authentication 357 information of the client for the proxy and/or realm of the resource 358 being requested. 360 Proxy-Authorization = credentials 362 Unlike Authorization, the Proxy-Authorization header field applies 363 only to the next inbound proxy that demanded authentication using the 364 Proxy-Authenticate field. When multiple proxies are used in a chain, 365 the Proxy-Authorization header field is consumed by the first inbound 366 proxy that was expecting to receive credentials. A proxy MAY relay 367 the credentials from the client request to the next proxy if that is 368 the mechanism by which the proxies cooperatively authenticate a given 369 request. 371 4.4. WWW-Authenticate 373 The "WWW-Authenticate" header field consists of at least one 374 challenge that indicates the authentication scheme(s) and parameters 375 applicable to the effective request URI (Section 5.5 of [Part1]). 377 It MUST be included in 401 (Unauthorized) response messages and MAY 378 be included in other response messages to indicate that supplying 379 credentials (or different credentials) might affect the response. 381 WWW-Authenticate = 1#challenge 383 User agents are advised to take special care in parsing the WWW- 384 Authenticate field value as it might contain more than one challenge, 385 or if more than one WWW-Authenticate header field is provided, the 386 contents of a challenge itself can contain a comma-separated list of 387 authentication parameters. 389 For instance: 391 WWW-Authenticate: Newauth realm="apps", type=1, 392 title="Login to \"apps\"", Basic realm="simple" 394 This header field contains two challenges; one for the "Newauth" 395 scheme with a realm value of "apps", and two additional parameters 396 "type" and "title", and another one for the "Basic" scheme with a 397 realm value of "simple". 399 Note: The challenge grammar production uses the list syntax as 400 well. Therefore, a sequence of comma, whitespace, and comma can 401 be considered both as applying to the preceding challenge, or to 402 be an empty entry in the list of challenges. In practice, this 403 ambiguity does not affect the semantics of the header field value 404 and thus is harmless. 406 5. IANA Considerations 408 5.1. Authentication Scheme Registry 410 The HTTP Authentication Scheme Registry defines the name space for 411 the authentication schemes in challenges and credentials. It will be 412 created and maintained at 413 . 415 5.1.1. Procedure 417 Registrations MUST include the following fields: 419 o Authentication Scheme Name 421 o Pointer to specification text 423 o Notes (optional) 425 Values to be added to this name space require IETF Review (see 426 [RFC5226], Section 4.1). 428 5.1.2. Considerations for New Authentication Schemes 430 There are certain aspects of the HTTP Authentication Framework that 431 put constraints on how new authentication schemes can work: 433 o HTTP authentication is presumed to be stateless: all of the 434 information necessary to authenticate a request MUST be provided 435 in the request, rather than be dependent on the server remembering 436 prior requests. Authentication based on, or bound to, the 437 underlying connection is outside the scope of this specification 438 and inherently flawed unless steps are taken to ensure that the 439 connection cannot be used by any party other than the 440 authenticated user (see Section 2.3 of [Part1]). 442 o The authentication parameter "realm" is reserved for defining 443 Protection Spaces as defined in Section 2.2. New schemes MUST NOT 444 use it in a way incompatible with that definition. 446 o The "token68" notation was introduced for compatibility with 447 existing authentication schemes and can only be used once per 448 challenge or credential. New schemes thus ought to use the "auth- 449 param" syntax instead, because otherwise future extensions will be 450 impossible. 452 o The parsing of challenges and credentials is defined by this 453 specification, and cannot be modified by new authentication 454 schemes. When the auth-param syntax is used, all parameters ought 455 to support both token and quoted-string syntax, and syntactical 456 constraints ought to be defined on the field value after parsing 457 (i.e., quoted-string processing). This is necessary so that 458 recipients can use a generic parser that applies to all 459 authentication schemes. 461 Note: The fact that the value syntax for the "realm" parameter is 462 restricted to quoted-string was a bad design choice not to be 463 repeated for new parameters. 465 o Definitions of new schemes ought to define the treatment of 466 unknown extension parameters. In general, a "must-ignore" rule is 467 preferable over "must-understand", because otherwise it will be 468 hard to introduce new parameters in the presence of legacy 469 recipients. Furthermore, it's good to describe the policy for 470 defining new parameters (such as "update the specification", or 471 "use this registry"). 473 o Authentication schemes need to document whether they are usable in 474 origin-server authentication (i.e., using WWW-Authenticate), 475 and/or proxy authentication (i.e., using Proxy-Authenticate). 477 o The credentials carried in an Authorization header field are 478 specific to the User Agent, and therefore have the same effect on 479 HTTP caches as the "private" Cache-Control response directive 480 (Section 5.2.2.6 of [Part6]), within the scope of the request they 481 appear in. 483 Therefore, new authentication schemes that choose not to carry 484 credentials in the Authorization header field (e.g., using a newly 485 defined header field) will need to explicitly disallow caching, by 486 mandating the use of either Cache-Control request directives 487 (e.g., "no-store", Section 5.2.1.5 of [Part6]) or response 488 directives (e.g., "private"). 490 5.2. Status Code Registration 492 The HTTP Status Code Registry located at 493 shall be updated 494 with the registrations below: 496 +-------+-------------------------------+-------------+ 497 | Value | Description | Reference | 498 +-------+-------------------------------+-------------+ 499 | 401 | Unauthorized | Section 3.1 | 500 | 407 | Proxy Authentication Required | Section 3.2 | 501 +-------+-------------------------------+-------------+ 503 5.3. Header Field Registration 505 HTTP header fields are registered within the Message Header Field 506 Registry maintained at . 509 This document defines the following HTTP header fields, so their 510 associated registry entries shall be updated according to the 511 permanent registrations below (see [BCP90]): 513 +---------------------+----------+----------+-------------+ 514 | Header Field Name | Protocol | Status | Reference | 515 +---------------------+----------+----------+-------------+ 516 | Authorization | http | standard | Section 4.1 | 517 | Proxy-Authenticate | http | standard | Section 4.2 | 518 | Proxy-Authorization | http | standard | Section 4.3 | 519 | WWW-Authenticate | http | standard | Section 4.4 | 520 +---------------------+----------+----------+-------------+ 522 The change controller is: "IETF (iesg@ietf.org) - Internet 523 Engineering Task Force". 525 6. Security Considerations 527 This section is meant to inform developers, information providers, 528 and users of known security concerns specific to HTTP/1.1 529 authentication. More general security considerations are addressed 530 in HTTP messaging [Part1] and semantics [Part2]. 532 6.1. Authentication Credentials and Idle Clients 534 Existing HTTP clients and user agents typically retain authentication 535 information indefinitely. HTTP does not provide a mechanism for the 536 origin server to direct clients to discard these cached credentials, 537 since the protocol has no awareness of how credentials are obtained 538 or managed by the user agent. The mechanisms for expiring or 539 revoking credentials can be specified as part of an authentication 540 scheme definition. 542 Circumstances under which credential caching can interfere with the 543 application's security model include but are not limited to: 545 o Clients that have been idle for an extended period, following 546 which the server might wish to cause the client to re-prompt the 547 user for credentials. 549 o Applications that include a session termination indication (such 550 as a "logout" or "commit" button on a page) after which the server 551 side of the application "knows" that there is no further reason 552 for the client to retain the credentials. 554 User agents that cache credentials are encouraged to provide a 555 readily accessible mechanism for discarding cached credentials under 556 user control. 558 6.2. Protection Spaces 560 Authentication schemes that solely rely on the "realm" mechanism for 561 establishing a protection space will expose credentials to all 562 resources on an origin server. Clients that have successfully made 563 authenticated requests with a resource can use the same 564 authentication credentials for other resources on the same origin 565 server. This makes it possible for a different resource to harvest 566 authentication credentials for other resources. 568 This is of particular concern when an origin server hosts resources 569 for multiple parties under the same canonical root URI (Section 2.2). 570 Possible mitigation strategies include restricting direct access to 571 authentication credentials (i.e., not making the content of the 572 Authorization request header field available), and separating 573 protection spaces by using a different host name (or port number) for 574 each party. 576 7. Acknowledgments 578 This specification takes over the definition of the HTTP 579 Authentication Framework, previously defined in RFC 2617. We thank 580 John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. 581 Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for 582 their work on that specification. See Section 6 of [RFC2617] for 583 further acknowledgements. 585 See Section 10 of [Part1] for the Acknowledgments related to this 586 document revision. 588 8. References 589 8.1. Normative References 591 [Part1] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 592 Protocol (HTTP/1.1): Message Syntax and Routing", 593 draft-ietf-httpbis-p1-messaging-24 (work in progress), 594 September 2013. 596 [Part2] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 597 Protocol (HTTP/1.1): Semantics and Content", 598 draft-ietf-httpbis-p2-semantics-24 (work in progress), 599 September 2013. 601 [Part6] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 602 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 603 draft-ietf-httpbis-p6-cache-24 (work in progress), 604 September 2013. 606 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 607 Requirement Levels", BCP 14, RFC 2119, March 1997. 609 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 610 Specifications: ABNF", STD 68, RFC 5234, January 2008. 612 8.2. Informative References 614 [BCP90] Klyne, G., Nottingham, M., and J. Mogul, "Registration 615 Procedures for Message Header Fields", BCP 90, RFC 3864, 616 September 2004. 618 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 619 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 620 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 622 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 623 Leach, P., Luotonen, A., and L. Stewart, "HTTP 624 Authentication: Basic and Digest Access Authentication", 625 RFC 2617, June 1999. 627 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 628 Resource Identifier (URI): Generic Syntax", STD 66, 629 RFC 3986, January 2005. 631 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 632 Encodings", RFC 4648, October 2006. 634 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 635 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 636 May 2008. 638 Appendix A. Changes from RFCs 2616 and 2617 640 The framework for HTTP Authentication is now defined by this 641 document, rather than RFC 2617. 643 The "realm" parameter is no longer always required on challenges; 644 consequently, the ABNF allows challenges without any auth parameters. 645 (Section 2) 647 The "token68" alternative to auth-param lists has been added for 648 consistency with legacy authentication schemes such as "Basic". 649 (Section 2) 651 This specification introduces the Authentication Scheme Registry, 652 along with considerations for new authentication schemes. 653 (Section 5.1) 655 Appendix B. Imported ABNF 657 The following core rules are included by reference, as defined in 658 Appendix B.1 of [RFC5234]: ALPHA (letters), CR (carriage return), 659 CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double 660 quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 661 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII 662 character). 664 The rules below are defined in [Part1]: 666 BWS = 667 OWS = 668 quoted-string = 669 token = 671 Appendix C. Collected ABNF 673 In the collected ABNF below, list rules are expanded as per Section 674 1.2 of [Part1]. 676 Authorization = credentials 678 BWS = 680 OWS = 682 Proxy-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS 683 challenge ] ) 684 Proxy-Authorization = credentials 686 WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge 687 ] ) 689 auth-param = token BWS "=" BWS ( token / quoted-string ) 690 auth-scheme = token 692 challenge = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param ) *( 693 OWS "," [ OWS auth-param ] ) ] ) ] 694 credentials = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param ) 695 *( OWS "," [ OWS auth-param ] ) ] ) ] 697 quoted-string = 699 token = 700 token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) 701 *"=" 703 Appendix D. Change Log (to be removed by RFC Editor before publication) 705 Changes up to the first Working Group Last Call draft are summarized 706 in . 709 D.1. Since draft-ietf-httpbis-p7-auth-19 711 Closed issues: 713 o : "Realms and 714 scope" 716 o : "Strength" 718 o : 719 "Authentication exchanges" 721 o : "ABNF 722 requirements for recipients" 724 o : "note 725 introduction of new IANA registries as normative changes" 727 D.2. Since draft-ietf-httpbis-p7-auth-20 729 Closed issues: 731 o : "rename 732 b64token for clarity" 734 Other changes: 736 o Conformance criteria and considerations regarding error handling 737 are now defined in Part 1. 739 D.3. Since draft-ietf-httpbis-p7-auth-21 741 Closed issues: 743 o : 744 "Authentication and caching - max-age" 746 D.4. Since draft-ietf-httpbis-p7-auth-22 748 Closed issues: 750 o : "explain list 751 expansion in ABNF appendices" 753 o : "terminology: 754 mechanism vs framework vs scheme" 756 o : "Editorial 757 suggestions" 759 o : "placement of 760 extension point considerations" 762 D.5. Since draft-ietf-httpbis-p7-auth-23 764 Closed issues: 766 o : "Forwarding 767 Proxy-*" 769 Index 771 4 772 401 Unauthorized (status code) 7 773 407 Proxy Authentication Required (status code) 7 775 A 776 Authorization header field 8 778 C 779 Canonical Root URI 6 781 G 782 Grammar 783 auth-param 5 784 auth-scheme 5 785 Authorization 8 786 challenge 5 787 credentials 6 788 Proxy-Authenticate 8 789 Proxy-Authorization 9 790 token68 5 791 WWW-Authenticate 9 793 P 794 Protection Space 6 795 Proxy-Authenticate header field 8 796 Proxy-Authorization header field 8 798 R 799 Realm 6 801 W 802 WWW-Authenticate header field 9 804 Authors' Addresses 806 Roy T. Fielding (editor) 807 Adobe Systems Incorporated 808 345 Park Ave 809 San Jose, CA 95110 810 USA 812 EMail: fielding@gbiv.com 813 URI: http://roy.gbiv.com/ 814 Julian F. Reschke (editor) 815 greenbytes GmbH 816 Hafenweg 16 817 Muenster, NW 48155 818 Germany 820 EMail: julian.reschke@greenbytes.de 821 URI: http://greenbytes.de/tech/webdav/