idnits 2.17.1 draft-ietf-httpbis-p7-auth-22.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 (February 23, 2013) is 4051 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-22 == Outdated reference: A later version (-26) exists of draft-ietf-httpbis-p2-semantics-22 == Outdated reference: A later version (-26) exists of draft-ietf-httpbis-p6-cache-22 -- 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 February 23, 2013 7 Expires: August 27, 2013 9 Hypertext Transfer Protocol (HTTP/1.1): Authentication 10 draft-ietf-httpbis-p7-auth-22 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.3. 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 August 27, 2013. 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 2.3. Authentication Scheme Registry . . . . . . . . . . . . . . 7 83 2.3.1. Considerations for New Authentication Schemes . . . . 7 84 3. Status Code Definitions . . . . . . . . . . . . . . . . . . . 9 85 3.1. 401 Unauthorized . . . . . . . . . . . . . . . . . . . . . 9 86 3.2. 407 Proxy Authentication Required . . . . . . . . . . . . 9 87 4. Header Field Definitions . . . . . . . . . . . . . . . . . . . 9 88 4.1. Authorization . . . . . . . . . . . . . . . . . . . . . . 9 89 4.2. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . . 10 90 4.3. Proxy-Authorization . . . . . . . . . . . . . . . . . . . 10 91 4.4. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . . 10 92 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 93 5.1. Authentication Scheme Registry . . . . . . . . . . . . . . 11 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 . . . . . . . . . . . . . . . . . . . . . . . . . . 13 101 8.1. Normative References . . . . . . . . . . . . . . . . . . . 13 102 8.2. Informative References . . . . . . . . . . . . . . . . . . 14 103 Appendix A. Changes from RFCs 2616 and 2617 . . . . . . . . . . . 14 104 Appendix B. Imported ABNF . . . . . . . . . . . . . . . . . . . . 15 105 Appendix C. Collected ABNF . . . . . . . . . . . . . . . . . . . 16 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 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 113 1. Introduction 115 This document defines HTTP/1.1 access control and authentication. It 116 includes the relevant parts of RFC 2616 with only minor changes 117 ([RFC2616]), plus the general framework for HTTP authentication, as 118 previously defined in "HTTP Authentication: Basic and Digest Access 119 Authentication" ([RFC2617]). 121 HTTP provides several OPTIONAL challenge-response authentication 122 mechanisms that can be used by a server to challenge a client request 123 and by a client to provide authentication information. The "basic" 124 and "digest" authentication schemes continue to be specified in RFC 125 2617. 127 1.1. Conformance and Error Handling 129 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 130 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 131 document are to be interpreted as described in [RFC2119]. 133 Conformance criteria and considerations regarding error handling are 134 defined in Section 2.5 of [Part1]. 136 1.2. Syntax Notation 138 This specification uses the Augmented Backus-Naur Form (ABNF) 139 notation of [RFC5234] with the list rule extension defined in Section 140 1.2 of [Part1]. Appendix B describes rules imported from other 141 documents. Appendix C shows the collected ABNF with the list rule 142 expanded. 144 2. Access Authentication Framework 146 2.1. Challenge and Response 148 HTTP provides a simple challenge-response authentication mechanism 149 that can be used by a server to challenge a client request and by a 150 client to provide authentication information. It uses an extensible, 151 case-insensitive token to identify the authentication scheme, 152 followed by additional information necessary for achieving 153 authentication via that scheme. The latter can either be a comma- 154 separated list of parameters or a single sequence of characters 155 capable of holding base64-encoded information. 157 Parameters are name-value pairs where the name is matched case- 158 insensitively, and each parameter name MUST only occur once per 159 challenge. 161 auth-scheme = token 163 auth-param = token BWS "=" BWS ( token / quoted-string ) 165 token68 = 1*( ALPHA / DIGIT / 166 "-" / "." / "_" / "~" / "+" / "/" ) *"=" 168 The "token68" syntax allows the 66 unreserved URI characters 169 ([RFC3986]), plus a few others, so that it can hold a base64, 170 base64url (URL and filename safe alphabet), base32, or base16 (hex) 171 encoding, with or without padding, but excluding whitespace 172 ([RFC4648]). 174 The 401 (Unauthorized) response message is used by an origin server 175 to challenge the authorization of a user agent. This response MUST 176 include a WWW-Authenticate header field containing at least one 177 challenge applicable to the requested resource. 179 The 407 (Proxy Authentication Required) response message is used by a 180 proxy to challenge the authorization of a client and MUST include a 181 Proxy-Authenticate header field containing at least one challenge 182 applicable to the proxy for the requested resource. 184 challenge = auth-scheme [ 1*SP ( token68 / #auth-param ) ] 186 Note: User agents will need to take special care in parsing the 187 WWW-Authenticate and Proxy-Authenticate header field values 188 because they can contain more than one challenge, or if more than 189 one of each is provided, since the contents of a challenge can 190 itself contain a comma-separated list of authentication 191 parameters. 193 Note: Many clients fail to parse challenges containing unknown 194 schemes. A workaround for this problem is to list well-supported 195 schemes (such as "basic") first. 197 A user agent that wishes to authenticate itself with an origin server 198 -- usually, but not necessarily, after receiving a 401 (Unauthorized) 199 -- can do so by including an Authorization header field with the 200 request. 202 A client that wishes to authenticate itself with a proxy -- usually, 203 but not necessarily, after receiving a 407 (Proxy Authentication 204 Required) -- can do so by including a Proxy-Authorization header 205 field with the request. 207 Both the Authorization field value and the Proxy-Authorization field 208 value contain the client's credentials for the realm of the resource 209 being requested, based upon a challenge received from the server 210 (possibly at some point in the past). When creating their values, 211 the user agent ought to do so by selecting the challenge with what it 212 considers to be the most secure auth-scheme that it understands, 213 obtaining credentials from the user as appropriate. 215 credentials = auth-scheme [ 1*SP ( token68 / #auth-param ) ] 217 Upon a request for a protected resource that omits credentials, 218 contains invalid credentials (e.g., a bad password) or partial 219 credentials (e.g., when the authentication scheme requires more than 220 one round trip), an origin server SHOULD send a 401 (Unauthorized) 221 response that contains a WWW-Authenticate header field with at least 222 one (possibly new) challenge applicable to the requested resource. 224 Likewise, upon a request that requires authentication by proxies that 225 omit credentials or contain invalid or partial credentials, a proxy 226 SHOULD send a 407 (Proxy Authentication Required) response that 227 contains a Proxy-Authenticate header field with a (possibly new) 228 challenge applicable to the proxy. 230 A server receiving credentials that are valid, but not adequate to 231 gain access, ought to respond with the 403 (Forbidden) status code 232 (Section 6.5.3 of [Part2]). 234 The HTTP protocol does not restrict applications to this simple 235 challenge-response mechanism for access authentication. Additional 236 mechanisms MAY be used, such as encryption at the transport level or 237 via message encapsulation, and with additional header fields 238 specifying authentication information. However, such additional 239 mechanisms are not defined by this specification. 241 Proxies MUST forward the WWW-Authenticate and Authorization header 242 fields unmodified and follow the rules found in Section 4.1. 244 2.2. Protection Space (Realm) 246 The authentication parameter realm is reserved for use by 247 authentication schemes that wish to indicate the scope of protection. 249 A protection space is defined by the canonical root URI (the scheme 250 and authority components of the effective request URI; see Section 251 5.5 of [Part1]) of the server being accessed, in combination with the 252 realm value if present. These realms allow the protected resources 253 on a server to be partitioned into a set of protection spaces, each 254 with its own authentication scheme and/or authorization database. 255 The realm value is a string, generally assigned by the origin server, 256 that can have additional semantics specific to the authentication 257 scheme. Note that there can be multiple challenges with the same 258 auth-scheme but different realms. 260 The protection space determines the domain over which credentials can 261 be automatically applied. If a prior request has been authorized, 262 the same credentials MAY be reused for all other requests within that 263 protection space for a period of time determined by the 264 authentication scheme, parameters, and/or user preference. Unless 265 otherwise defined by the authentication scheme, a single protection 266 space cannot extend outside the scope of its server. 268 For historical reasons, senders MUST only use the quoted-string 269 syntax. Recipients might have to support both token and quoted- 270 string syntax for maximum interoperability with existing clients that 271 have been accepting both notations for a long time. 273 2.3. Authentication Scheme Registry 275 The HTTP Authentication Scheme Registry defines the name space for 276 the authentication schemes in challenges and credentials. 278 Registrations MUST include the following fields: 280 o Authentication Scheme Name 282 o Pointer to specification text 284 o Notes (optional) 286 Values to be added to this name space require IETF Review (see 287 [RFC5226], Section 4.1). 289 The registry itself is maintained at 290 . 292 2.3.1. Considerations for New Authentication Schemes 294 There are certain aspects of the HTTP Authentication Framework that 295 put constraints on how new authentication schemes can work: 297 o HTTP authentication is presumed to be stateless: all of the 298 information necessary to authenticate a request MUST be provided 299 in the request, rather than be dependent on the server remembering 300 prior requests. Authentication based on, or bound to, the 301 underlying connection is outside the scope of this specification 302 and inherently flawed unless steps are taken to ensure that the 303 connection cannot be used by any party other than the 304 authenticated user (see Section 2.3 of [Part1]). 306 o The authentication parameter "realm" is reserved for defining 307 Protection Spaces as defined in Section 2.2. New schemes MUST NOT 308 use it in a way incompatible with that definition. 310 o The "token68" notation was introduced for compatibility with 311 existing authentication schemes and can only be used once per 312 challenge/credentials. New schemes thus ought to use the "auth- 313 param" syntax instead, because otherwise future extensions will be 314 impossible. 316 o The parsing of challenges and credentials is defined by this 317 specification, and cannot be modified by new authentication 318 schemes. When the auth-param syntax is used, all parameters ought 319 to support both token and quoted-string syntax, and syntactical 320 constraints ought to be defined on the field value after parsing 321 (i.e., quoted-string processing). This is necessary so that 322 recipients can use a generic parser that applies to all 323 authentication schemes. 325 Note: The fact that the value syntax for the "realm" parameter is 326 restricted to quoted-string was a bad design choice not to be 327 repeated for new parameters. 329 o Definitions of new schemes ought to define the treatment of 330 unknown extension parameters. In general, a "must-ignore" rule is 331 preferable over "must-understand", because otherwise it will be 332 hard to introduce new parameters in the presence of legacy 333 recipients. Furthermore, it's good to describe the policy for 334 defining new parameters (such as "update the specification", or 335 "use this registry"). 337 o Authentication schemes need to document whether they are usable in 338 origin-server authentication (i.e., using WWW-Authenticate), 339 and/or proxy authentication (i.e., using Proxy-Authenticate). 341 o The credentials carried in an Authorization header field are 342 specific to the User Agent, and therefore have the same effect on 343 HTTP caches as the "private" Cache-Control response directive, 344 within the scope of the request they appear in. 346 Therefore, new authentication schemes that choose not to carry 347 credentials in the Authorization header field (e.g., using a newly 348 defined header field) will need to explicitly disallow caching, by 349 mandating the use of either Cache-Control request directives 350 (e.g., "no-store") or response directives (e.g., "private"). 352 3. Status Code Definitions 354 3.1. 401 Unauthorized 356 The 401 (Unauthorized) status code indicates that the request has not 357 been applied because it lacks valid authentication credentials for 358 the target resource. The origin server MUST send a WWW-Authenticate 359 header field (Section 4.4) containing at least one challenge 360 applicable to the target resource. If the request included 361 authentication credentials, then the 401 response indicates that 362 authorization has been refused for those credentials. The client MAY 363 repeat the request with a new or replaced Authorization header field 364 (Section 4.1). If the 401 response contains the same challenge as 365 the prior response, and the user agent has already attempted 366 authentication at least once, then the user agent SHOULD present the 367 enclosed representation to the user, since it usually contains 368 relevant diagnostic information. 370 3.2. 407 Proxy Authentication Required 372 The 407 (Proxy Authentication Required) status code is similar to 401 373 (Unauthorized), but indicates that the client needs to authenticate 374 itself in order to use a proxy. The proxy MUST send a Proxy- 375 Authenticate header field (Section 4.2) containing a challenge 376 applicable to that proxy for the target resource. The client MAY 377 repeat the request with a new or replaced Proxy-Authorization header 378 field (Section 4.3). 380 4. Header Field Definitions 382 This section defines the syntax and semantics of HTTP/1.1 header 383 fields related to authentication. 385 4.1. Authorization 387 The "Authorization" header field allows a user agent to authenticate 388 itself with a server -- usually, but not necessarily, after receiving 389 a 401 (Unauthorized) response. Its value consists of credentials 390 containing information of the user agent for the realm of the 391 resource being requested. 393 Authorization = credentials 395 If a request is authenticated and a realm specified, the same 396 credentials SHOULD be valid for all other requests within this realm 397 (assuming that the authentication scheme itself does not require 398 otherwise, such as credentials that vary according to a challenge 399 value or using synchronized clocks). 401 See Section 3.2 of [Part6] for details of and requirements pertaining 402 to handling of the Authorization field by HTTP caches. 404 4.2. Proxy-Authenticate 406 The "Proxy-Authenticate" header field consists of at least one 407 challenge that indicates the authentication scheme(s) and parameters 408 applicable to the proxy for this effective request URI (Section 5.5 409 of [Part1]). It MUST be included as part of a 407 (Proxy 410 Authentication Required) response. 412 Proxy-Authenticate = 1#challenge 414 Unlike WWW-Authenticate, the Proxy-Authenticate header field applies 415 only to the current connection, and intermediaries SHOULD NOT forward 416 it to downstream clients. However, an intermediate proxy might need 417 to obtain its own credentials by requesting them from the downstream 418 client, which in some circumstances will appear as if the proxy is 419 forwarding the Proxy-Authenticate header field. 421 Note that the parsing considerations for WWW-Authenticate apply to 422 this header field as well; see Section 4.4 for details. 424 4.3. Proxy-Authorization 426 The "Proxy-Authorization" header field allows the client to identify 427 itself (or its user) to a proxy that requires authentication. Its 428 value consists of credentials containing the authentication 429 information of the user agent for the proxy and/or realm of the 430 resource being requested. 432 Proxy-Authorization = credentials 434 Unlike Authorization, the Proxy-Authorization header field applies 435 only to the next outbound proxy that demanded authentication using 436 the Proxy-Authenticate field. When multiple proxies are used in a 437 chain, the Proxy-Authorization header field is consumed by the first 438 outbound proxy that was expecting to receive credentials. A proxy 439 MAY relay the credentials from the client request to the next proxy 440 if that is the mechanism by which the proxies cooperatively 441 authenticate a given request. 443 4.4. WWW-Authenticate 445 The "WWW-Authenticate" header field consists of at least one 446 challenge that indicates the authentication scheme(s) and parameters 447 applicable to the effective request URI (Section 5.5 of [Part1]). 449 It MUST be included in 401 (Unauthorized) response messages and MAY 450 be included in other response messages to indicate that supplying 451 credentials (or different credentials) might affect the response. 453 WWW-Authenticate = 1#challenge 455 User agents are advised to take special care in parsing the WWW- 456 Authenticate field value as it might contain more than one challenge, 457 or if more than one WWW-Authenticate header field is provided, the 458 contents of a challenge itself can contain a comma-separated list of 459 authentication parameters. 461 For instance: 463 WWW-Authenticate: Newauth realm="apps", type=1, 464 title="Login to \"apps\"", Basic realm="simple" 466 This header field contains two challenges; one for the "Newauth" 467 scheme with a realm value of "apps", and two additional parameters 468 "type" and "title", and another one for the "Basic" scheme with a 469 realm value of "simple". 471 Note: The challenge grammar production uses the list syntax as 472 well. Therefore, a sequence of comma, whitespace, and comma can 473 be considered both as applying to the preceding challenge, or to 474 be an empty entry in the list of challenges. In practice, this 475 ambiguity does not affect the semantics of the header field value 476 and thus is harmless. 478 5. IANA Considerations 480 5.1. Authentication Scheme Registry 482 The registration procedure for HTTP Authentication Schemes is defined 483 by Section 2.3 of this document. 485 The HTTP Method Authentication Scheme shall be created at 486 . 488 5.2. Status Code Registration 490 The HTTP Status Code Registry located at 491 shall be updated 492 with the registrations below: 494 +-------+-------------------------------+-------------+ 495 | Value | Description | Reference | 496 +-------+-------------------------------+-------------+ 497 | 401 | Unauthorized | Section 3.1 | 498 | 407 | Proxy Authentication Required | Section 3.2 | 499 +-------+-------------------------------+-------------+ 501 5.3. Header Field Registration 503 The Message Header Field Registry located at shall be 505 updated with the permanent registrations below (see [BCP90]): 507 +---------------------+----------+----------+-------------+ 508 | Header Field Name | Protocol | Status | Reference | 509 +---------------------+----------+----------+-------------+ 510 | Authorization | http | standard | Section 4.1 | 511 | Proxy-Authenticate | http | standard | Section 4.2 | 512 | Proxy-Authorization | http | standard | Section 4.3 | 513 | WWW-Authenticate | http | standard | Section 4.4 | 514 +---------------------+----------+----------+-------------+ 516 The change controller is: "IETF (iesg@ietf.org) - Internet 517 Engineering Task Force". 519 6. Security Considerations 521 This section is meant to inform developers, information providers, 522 and users of known security concerns specific to HTTP/1.1 523 authentication. More general security considerations are addressed 524 in HTTP messaging [Part1] and semantics [Part2]. 526 6.1. Authentication Credentials and Idle Clients 528 Existing HTTP clients and user agents typically retain authentication 529 information indefinitely. HTTP/1.1 does not provide a method for a 530 server to direct clients to discard these cached credentials. This 531 is a significant defect that requires further extensions to HTTP. 532 Circumstances under which credential caching can interfere with the 533 application's security model include but are not limited to: 535 o Clients that have been idle for an extended period, following 536 which the server might wish to cause the client to re-prompt the 537 user for credentials. 539 o Applications that include a session termination indication (such 540 as a "logout" or "commit" button on a page) after which the server 541 side of the application "knows" that there is no further reason 542 for the client to retain the credentials. 544 This is currently under separate study. There are a number of work- 545 arounds to parts of this problem, and we encourage the use of 546 password protection in screen savers, idle time-outs, and other 547 methods that mitigate the security problems inherent in this problem. 548 In particular, user agents that cache credentials are encouraged to 549 provide a readily accessible mechanism for discarding cached 550 credentials under user control. 552 6.2. Protection Spaces 554 Authentication schemes that solely rely on the "realm" mechanism for 555 establishing a protection space will expose credentials to all 556 resources on a server. Clients that have successfully made 557 authenticated requests with a resource can use the same 558 authentication credentials for other resources on the same server. 559 This makes it possible for a different resource to harvest 560 authentication credentials for other resources. 562 This is of particular concern when a server hosts resources for 563 multiple parties under the same canonical root URI (Section 2.2). 564 Possible mitigation strategies include restricting direct access to 565 authentication credentials (i.e., not making the content of the 566 Authorization request header field available), and separating 567 protection spaces by using a different host name for each party. 569 7. Acknowledgments 571 This specification takes over the definition of the HTTP 572 Authentication Framework, previously defined in RFC 2617. We thank 573 John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. 574 Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for 575 their work on that specification. See Section 6 of [RFC2617] for 576 further acknowledgements. 578 See Section 9 of [Part1] for the Acknowledgments related to this 579 document revision. 581 8. References 583 8.1. Normative References 585 [Part1] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 586 Protocol (HTTP/1.1): Message Syntax and Routing", 587 draft-ietf-httpbis-p1-messaging-22 (work in progress), 588 February 2013. 590 [Part2] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 591 Protocol (HTTP/1.1): Semantics and Content", 592 draft-ietf-httpbis-p2-semantics-22 (work in progress), 593 February 2013. 595 [Part6] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 596 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 597 draft-ietf-httpbis-p6-cache-22 (work in progress), 598 February 2013. 600 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 601 Requirement Levels", BCP 14, RFC 2119, March 1997. 603 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 604 Specifications: ABNF", STD 68, RFC 5234, January 2008. 606 8.2. Informative References 608 [BCP90] Klyne, G., Nottingham, M., and J. Mogul, "Registration 609 Procedures for Message Header Fields", BCP 90, RFC 3864, 610 September 2004. 612 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 613 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 614 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 616 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 617 Leach, P., Luotonen, A., and L. Stewart, "HTTP 618 Authentication: Basic and Digest Access Authentication", 619 RFC 2617, June 1999. 621 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 622 Resource Identifier (URI): Generic Syntax", STD 66, 623 RFC 3986, January 2005. 625 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 626 Encodings", RFC 4648, October 2006. 628 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 629 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 630 May 2008. 632 Appendix A. Changes from RFCs 2616 and 2617 634 The framework for HTTP Authentication is now defined by this 635 document, rather than RFC 2617. 637 The "realm" parameter is no longer always required on challenges; 638 consequently, the ABNF allows challenges without any auth parameters. 639 (Section 2) 641 The "token68" alternative to auth-param lists has been added for 642 consistency with legacy authentication schemes such as "Basic". 643 (Section 2) 645 This specification introduces the Authentication Scheme Registry, 646 along with considerations for new authentication schemes. 647 (Section 2.3) 649 Appendix B. Imported ABNF 651 The following core rules are included by reference, as defined in 652 Appendix B.1 of [RFC5234]: ALPHA (letters), CR (carriage return), 653 CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double 654 quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 655 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII 656 character). 658 The rules below are defined in [Part1]: 660 BWS = 661 OWS = 662 quoted-string = 663 token = 665 Appendix C. Collected ABNF 667 Authorization = credentials 669 BWS = 671 OWS = 673 Proxy-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS 674 challenge ] ) 675 Proxy-Authorization = credentials 677 WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge 678 ] ) 680 auth-param = token BWS "=" BWS ( token / quoted-string ) 681 auth-scheme = token 683 challenge = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param ) *( 684 OWS "," [ OWS auth-param ] ) ] ) ] 685 credentials = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param ) 686 *( OWS "," [ OWS auth-param ] ) ] ) ] 688 quoted-string = 690 token = 691 token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) 692 *"=" 694 Appendix D. Change Log (to be removed by RFC Editor before publication) 696 Changes up to the first Working Group Last Call draft are summarized 697 in . 700 D.1. Since draft-ietf-httpbis-p7-auth-19 702 Closed issues: 704 o : "Realms and 705 scope" 707 o : "Strength" 709 o : 710 "Authentication exchanges" 712 o : "ABNF 713 requirements for recipients" 715 o : "note 716 introduction of new IANA registries as normative changes" 718 D.2. Since draft-ietf-httpbis-p7-auth-20 720 Closed issues: 722 o : "rename 723 b64token for clarity" 725 Other changes: 727 o Conformance criteria and considerations regarding error handling 728 are now defined in Part 1. 730 D.3. Since draft-ietf-httpbis-p7-auth-21 732 Closed issues: 734 o : 735 "Authentication and caching - max-age" 737 Index 739 4 740 401 Unauthorized (status code) 9 741 407 Proxy Authentication Required (status code) 9 743 A 744 Authorization header field 9 746 C 747 Canonical Root URI 6 749 G 750 Grammar 751 auth-param 5 752 auth-scheme 5 753 Authorization 9 754 challenge 5 755 credentials 6 756 Proxy-Authenticate 10 757 Proxy-Authorization 10 758 token68 5 759 WWW-Authenticate 11 761 P 762 Protection Space 6 763 Proxy-Authenticate header field 10 764 Proxy-Authorization header field 10 766 R 767 Realm 6 769 W 770 WWW-Authenticate header field 10 772 Authors' Addresses 774 Roy T. Fielding (editor) 775 Adobe Systems Incorporated 776 345 Park Ave 777 San Jose, CA 95110 778 USA 780 EMail: fielding@gbiv.com 781 URI: http://roy.gbiv.com/ 783 Julian F. Reschke (editor) 784 greenbytes GmbH 785 Hafenweg 16 786 Muenster, NW 48155 787 Germany 789 EMail: julian.reschke@greenbytes.de 790 URI: http://greenbytes.de/tech/webdav/