idnits 2.17.1 draft-ietf-httpbis-p7-auth-20.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 (July 16, 2012) is 4274 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-20 == Outdated reference: A later version (-26) exists of draft-ietf-httpbis-p2-semantics-20 == Outdated reference: A later version (-26) exists of draft-ietf-httpbis-p6-cache-20 -- 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) Y. Lafon, Ed. 5 Updates: 2617 (if approved) W3C 6 Intended status: Standards Track J. Reschke, Ed. 7 Expires: January 17, 2013 greenbytes 8 July 16, 2012 10 HTTP/1.1, part 7: Authentication 11 draft-ietf-httpbis-p7-auth-20 13 Abstract 15 The Hypertext Transfer Protocol (HTTP) is an application-level 16 protocol for distributed, collaborative, hypermedia information 17 systems. This document defines the HTTP Authentication framework. 19 Editorial Note (To be removed by RFC Editor) 21 Discussion of this draft takes place on the HTTPBIS working group 22 mailing list (ietf-http-wg@w3.org), which is archived at 23 . 25 The current issues list is at 26 and related 27 documents (including fancy diffs) can be found at 28 . 30 The changes in this draft are summarized in Appendix D.1. 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at http://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on January 17, 2013. 49 Copyright Notice 51 Copyright (c) 2012 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents 56 (http://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 described in the Simplified BSD License. 64 This document may contain material from IETF Documents or IETF 65 Contributions published or made publicly available before November 66 10, 2008. The person(s) controlling the copyright in some of this 67 material may not have granted the IETF Trust the right to allow 68 modifications of such material outside the IETF Standards Process. 69 Without obtaining an adequate license from the person(s) controlling 70 the copyright in such materials, this document may not be modified 71 outside the IETF Standards Process, and derivative works of it may 72 not be created outside the IETF Standards Process, except to format 73 it for publication as an RFC or to translate it into languages other 74 than English. 76 Table of Contents 78 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 79 1.1. Conformance and Error Handling . . . . . . . . . . . . . . 4 80 1.2. Syntax Notation . . . . . . . . . . . . . . . . . . . . . 5 81 2. Access Authentication Framework . . . . . . . . . . . . . . . 5 82 2.1. Challenge and Response . . . . . . . . . . . . . . . . . . 5 83 2.2. Protection Space (Realm) . . . . . . . . . . . . . . . . . 7 84 2.3. Authentication Scheme Registry . . . . . . . . . . . . . . 8 85 2.3.1. Considerations for New Authentication Schemes . . . . 8 86 3. Status Code Definitions . . . . . . . . . . . . . . . . . . . 9 87 3.1. 401 Unauthorized . . . . . . . . . . . . . . . . . . . . . 9 88 3.2. 407 Proxy Authentication Required . . . . . . . . . . . . 10 89 4. Header Field Definitions . . . . . . . . . . . . . . . . . . . 10 90 4.1. Authorization . . . . . . . . . . . . . . . . . . . . . . 10 91 4.2. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . . 11 92 4.3. Proxy-Authorization . . . . . . . . . . . . . . . . . . . 11 93 4.4. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . . 12 94 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 95 5.1. Authentication Scheme Registry . . . . . . . . . . . . . . 12 96 5.2. Status Code Registration . . . . . . . . . . . . . . . . . 13 97 5.3. Header Field Registration . . . . . . . . . . . . . . . . 13 98 6. Security Considerations . . . . . . . . . . . . . . . . . . . 13 99 6.1. Authentication Credentials and Idle Clients . . . . . . . 13 100 6.2. Protection Spaces . . . . . . . . . . . . . . . . . . . . 14 101 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 14 102 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 15 103 8.1. Normative References . . . . . . . . . . . . . . . . . . . 15 104 8.2. Informative References . . . . . . . . . . . . . . . . . . 15 105 Appendix A. Changes from RFCs 2616 and 2617 . . . . . . . . . . . 16 106 Appendix B. Imported ABNF . . . . . . . . . . . . . . . . . . . . 16 107 Appendix C. Collected ABNF . . . . . . . . . . . . . . . . . . . 17 108 Appendix D. Change Log (to be removed by RFC Editor before 109 publication) . . . . . . . . . . . . . . . . . . . . 17 110 D.1. Since draft-ietf-httpbis-p7-auth-19 . . . . . . . . . . . 17 111 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 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 which can be used by a server to challenge a client 123 request and by a client to provide authentication information. The 124 "basic" and "digest" authentication schemes continue to be specified 125 in RFC 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 This specification targets conformance criteria according to the role 134 of a participant in HTTP communication. Hence, HTTP requirements are 135 placed on senders, recipients, clients, servers, user agents, 136 intermediaries, origin servers, proxies, gateways, or caches, 137 depending on what behavior is being constrained by the requirement. 138 See Section 2 of [Part1] for definitions of these terms. 140 The verb "generate" is used instead of "send" where a requirement 141 differentiates between creating a protocol element and merely 142 forwarding a received element downstream. 144 An implementation is considered conformant if it complies with all of 145 the requirements associated with the roles it partakes in HTTP. Note 146 that SHOULD-level requirements are relevant here, unless one of the 147 documented exceptions is applicable. 149 This document also uses ABNF to define valid protocol elements 150 (Section 1.2). In addition to the prose requirements placed upon 151 them, senders MUST NOT generate protocol elements that do not match 152 the grammar defined by the ABNF rules for those protocol elements 153 that are applicable to the sender's role. If a received protocol 154 element is processed, the recipient MUST be able to parse any value 155 that would match the ABNF rules for that protocol element, excluding 156 only those rules not applicable to the recipient's role. 158 Unless noted otherwise, a recipient MAY attempt to recover a usable 159 protocol element from an invalid construct. HTTP does not define 160 specific error handling mechanisms except when they have a direct 161 impact on security, since different applications of the protocol 162 require different error handling strategies. For example, a Web 163 browser might wish to transparently recover from a response where the 164 Location header field doesn't parse according to the ABNF, whereas a 165 systems control client might consider any form of error recovery to 166 be dangerous. 168 1.2. Syntax Notation 170 This specification uses the Augmented Backus-Naur Form (ABNF) 171 notation of [RFC5234] with the list rule extension defined in Section 172 1.2 of [Part1]. Appendix B describes rules imported from other 173 documents. Appendix C shows the collected ABNF with the list rule 174 expanded. 176 2. Access Authentication Framework 178 2.1. Challenge and Response 180 HTTP provides a simple challenge-response authentication mechanism 181 that can be used by a server to challenge a client request and by a 182 client to provide authentication information. It uses an extensible, 183 case-insensitive token to identify the authentication scheme, 184 followed by additional information necessary for achieving 185 authentication via that scheme. The latter can either be a comma- 186 separated list of parameters or a single sequence of characters 187 capable of holding base64-encoded information. 189 Parameters are name-value pairs where the name is matched case- 190 insensitively, and each parameter name MUST only occur once per 191 challenge. 193 auth-scheme = token 195 auth-param = token BWS "=" BWS ( token / quoted-string ) 197 b64token = 1*( ALPHA / DIGIT / 198 "-" / "." / "_" / "~" / "+" / "/" ) *"=" 200 The "b64token" syntax allows the 66 unreserved URI characters 201 ([RFC3986]), plus a few others, so that it can hold a base64, 202 base64url (URL and filename safe alphabet), base32, or base16 (hex) 203 encoding, with or without padding, but excluding whitespace 204 ([RFC4648]). 206 The 401 (Unauthorized) response message is used by an origin server 207 to challenge the authorization of a user agent. This response MUST 208 include a WWW-Authenticate header field containing at least one 209 challenge applicable to the requested resource. 211 The 407 (Proxy Authentication Required) response message is used by a 212 proxy to challenge the authorization of a client and MUST include a 213 Proxy-Authenticate header field containing at least one challenge 214 applicable to the proxy for the requested resource. 216 challenge = auth-scheme [ 1*SP ( b64token / #auth-param ) ] 218 Note: User agents will need to take special care in parsing the 219 WWW-Authenticate and Proxy-Authenticate header field values 220 because they can contain more than one challenge, or if more than 221 one of each is provided, since the contents of a challenge can 222 itself contain a comma-separated list of authentication 223 parameters. 225 Note: Many clients fail to parse challenges containing unknown 226 schemes. A workaround for this problem is to list well-supported 227 schemes (such as "basic") first. 229 A user agent that wishes to authenticate itself with an origin server 230 -- usually, but not necessarily, after receiving a 401 (Unauthorized) 231 -- can do so by including an Authorization header field with the 232 request. 234 A client that wishes to authenticate itself with a proxy -- usually, 235 but not necessarily, after receiving a 407 (Proxy Authentication 236 Required) -- can do so by including a Proxy-Authorization header 237 field with the request. 239 Both the Authorization field value and the Proxy-Authorization field 240 value contain the client's credentials for the realm of the resource 241 being requested, based upon a challenge received from the server 242 (possibly at some point in the past). When creating their values, 243 the user agent ought to do so by selecting the challenge with what it 244 considers to be the most secure auth-scheme that it understands, 245 obtaining credentials from the user as appropriate. 247 credentials = auth-scheme [ 1*SP ( b64token / #auth-param ) ] 249 Upon a request for a protected resource that omits credentials, 250 contains invalid credentials (e.g., a bad password) or partial 251 credentials (e.g., when the authentication scheme requires more than 252 one round trip), an origin server SHOULD return a 401 (Unauthorized) 253 response. Such responses MUST include a WWW-Authenticate header 254 field containing at least one (possibly new) challenge applicable to 255 the requested resource. 257 Likewise, upon a request that requires authentication by proxies that 258 omit credentials or contain invalid or partial credentials, a proxy 259 SHOULD return a 407 (Proxy Authentication Required) response. Such 260 responses MUST include a Proxy-Authenticate header field containing a 261 (possibly new) challenge applicable to the proxy. 263 A server receiving credentials that are valid, but not adequate to 264 gain access, ought to respond with the 403 (Forbidden) status code 265 (Section 4.6.3 of [Part2]). 267 The HTTP protocol does not restrict applications to this simple 268 challenge-response mechanism for access authentication. Additional 269 mechanisms MAY be used, such as encryption at the transport level or 270 via message encapsulation, and with additional header fields 271 specifying authentication information. However, such additional 272 mechanisms are not defined by this specification. 274 Proxies MUST forward the WWW-Authenticate and Authorization header 275 fields unmodified and follow the rules found in Section 4.1. 277 2.2. Protection Space (Realm) 279 The authentication parameter realm is reserved for use by 280 authentication schemes that wish to indicate the scope of protection. 282 A protection space is defined by the canonical root URI (the scheme 283 and authority components of the effective request URI; see Section 284 5.5 of [Part1]) of the server being accessed, in combination with the 285 realm value if present. These realms allow the protected resources 286 on a server to be partitioned into a set of protection spaces, each 287 with its own authentication scheme and/or authorization database. 288 The realm value is a string, generally assigned by the origin server, 289 which can have additional semantics specific to the authentication 290 scheme. Note that there can be multiple challenges with the same 291 auth-scheme but different realms. 293 The protection space determines the domain over which credentials can 294 be automatically applied. If a prior request has been authorized, 295 the same credentials MAY be reused for all other requests within that 296 protection space for a period of time determined by the 297 authentication scheme, parameters, and/or user preference. Unless 298 otherwise defined by the authentication scheme, a single protection 299 space cannot extend outside the scope of its server. 301 For historical reasons, senders MUST only use the quoted-string 302 syntax. Recipients might have to support both token and quoted- 303 string syntax for maximum interoperability with existing clients that 304 have been accepting both notations for a long time. 306 2.3. Authentication Scheme Registry 308 The HTTP Authentication Scheme Registry defines the name space for 309 the authentication schemes in challenges and credentials. 311 Registrations MUST include the following fields: 313 o Authentication Scheme Name 315 o Pointer to specification text 317 o Notes (optional) 319 Values to be added to this name space require IETF Review (see 320 [RFC5226], Section 4.1). 322 The registry itself is maintained at 323 . 325 2.3.1. Considerations for New Authentication Schemes 327 There are certain aspects of the HTTP Authentication Framework that 328 put constraints on how new authentication schemes can work: 330 o HTTP authentication is presumed to be stateless: all of the 331 information necessary to authenticate a request MUST be provided 332 in the request, rather than be dependent on the server remembering 333 prior requests. Authentication based on, or bound to, the 334 underlying connection is outside the scope of this specification 335 and inherently flawed unless steps are taken to ensure that the 336 connection cannot be used by any party other than the 337 authenticated user (see Section 2.4 of [Part1]). 339 o The authentication parameter "realm" is reserved for defining 340 Protection Spaces as defined in Section 2.2. New schemes MUST NOT 341 use it in a way incompatible with that definition. 343 o The "b64token" notation was introduced for compatibility with 344 existing authentication schemes and can only be used once per 345 challenge/credentials. New schemes thus ought to use the "auth- 346 param" syntax instead, because otherwise future extensions will be 347 impossible. 349 o The parsing of challenges and credentials is defined by this 350 specification, and cannot be modified by new authentication 351 schemes. When the auth-param syntax is used, all parameters ought 352 to support both token and quoted-string syntax, and syntactical 353 constraints ought to be defined on the field value after parsing 354 (i.e., quoted-string processing). This is necessary so that 355 recipients can use a generic parser that applies to all 356 authentication schemes. 358 Note: The fact that the value syntax for the "realm" parameter is 359 restricted to quoted-string was a bad design choice not to be 360 repeated for new parameters. 362 o Definitions of new schemes ought to define the treatment of 363 unknown extension parameters. In general, a "must-ignore" rule is 364 preferable over "must-understand", because otherwise it will be 365 hard to introduce new parameters in the presence of legacy 366 recipients. Furthermore, it's good to describe the policy for 367 defining new parameters (such as "update the specification", or 368 "use this registry"). 370 o Authentication schemes need to document whether they are usable in 371 origin-server authentication (i.e., using WWW-Authenticate), 372 and/or proxy authentication (i.e., using Proxy-Authenticate). 374 o The credentials carried in an Authorization header field are 375 specific to the User Agent, and therefore have the same effect on 376 HTTP caches as the "private" Cache-Control response directive, 377 within the scope of the request they appear in. 379 Therefore, new authentication schemes which choose not to carry 380 credentials in the Authorization header field (e.g., using a newly 381 defined header field) will need to explicitly disallow caching, by 382 mandating the use of either Cache-Control request directives 383 (e.g., "no-store") or response directives (e.g., "private"). 385 3. Status Code Definitions 387 3.1. 401 Unauthorized 389 The request requires user authentication. The response MUST include 390 a WWW-Authenticate header field (Section 4.4) containing a challenge 391 applicable to the target resource. The client MAY repeat the request 392 with a suitable Authorization header field (Section 4.1). If the 393 request already included Authorization credentials, then the 401 394 response indicates that authorization has been refused for those 395 credentials. If the 401 response contains the same challenge as the 396 prior response, and the user agent has already attempted 397 authentication at least once, then the user SHOULD be presented the 398 representation that was given in the response, since that 399 representation might include relevant diagnostic information. 401 3.2. 407 Proxy Authentication Required 403 This code is similar to 401 (Unauthorized), but indicates that the 404 client ought to first authenticate itself with the proxy. The proxy 405 MUST return a Proxy-Authenticate header field (Section 4.2) 406 containing a challenge applicable to the proxy for the target 407 resource. The client MAY repeat the request with a suitable Proxy- 408 Authorization header field (Section 4.3). 410 4. Header Field Definitions 412 This section defines the syntax and semantics of HTTP/1.1 header 413 fields related to authentication. 415 4.1. Authorization 417 The "Authorization" header field allows a user agent to authenticate 418 itself with a server -- usually, but not necessarily, after receiving 419 a 401 (Unauthorized) response. Its value consists of credentials 420 containing information of the user agent for the realm of the 421 resource being requested. 423 Authorization = credentials 425 If a request is authenticated and a realm specified, the same 426 credentials SHOULD be valid for all other requests within this realm 427 (assuming that the authentication scheme itself does not require 428 otherwise, such as credentials that vary according to a challenge 429 value or using synchronized clocks). 431 When a shared cache (see Section 1.2 of [Part6]) receives a request 432 containing an Authorization field, it MUST NOT return the 433 corresponding response as a reply to any other request, unless one of 434 the following specific exceptions holds: 436 1. If the response includes the "s-maxage" cache-control directive, 437 the cache MAY use that response in replying to a subsequent 438 request. But (if the specified maximum age has passed) a proxy 439 cache MUST first revalidate it with the origin server, using the 440 header fields from the new request to allow the origin server to 441 authenticate the new request. (This is the defined behavior for 442 s-maxage.) If the response includes "s-maxage=0", the proxy MUST 443 always revalidate it before re-using it. 445 2. If the response includes the "must-revalidate" cache-control 446 directive, the cache MAY use that response in replying to a 447 subsequent request. But if the response is stale, all caches 448 MUST first revalidate it with the origin server, using the header 449 fields from the new request to allow the origin server to 450 authenticate the new request. 452 3. If the response includes the "public" cache-control directive, it 453 MAY be returned in reply to any subsequent request. 455 4.2. Proxy-Authenticate 457 The "Proxy-Authenticate" header field consists of at least one 458 challenge that indicates the authentication scheme(s) and parameters 459 applicable to the proxy for this effective request URI (Section 5.5 460 of [Part1]). It MUST be included as part of a 407 (Proxy 461 Authentication Required) response. 463 Proxy-Authenticate = 1#challenge 465 Unlike WWW-Authenticate, the Proxy-Authenticate header field applies 466 only to the current connection, and intermediaries SHOULD NOT forward 467 it to downstream clients. However, an intermediate proxy might need 468 to obtain its own credentials by requesting them from the downstream 469 client, which in some circumstances will appear as if the proxy is 470 forwarding the Proxy-Authenticate header field. 472 Note that the parsing considerations for WWW-Authenticate apply to 473 this header field as well; see Section 4.4 for details. 475 4.3. Proxy-Authorization 477 The "Proxy-Authorization" header field allows the client to identify 478 itself (or its user) to a proxy which requires authentication. Its 479 value consists of credentials containing the authentication 480 information of the user agent for the proxy and/or realm of the 481 resource being requested. 483 Proxy-Authorization = credentials 485 Unlike Authorization, the Proxy-Authorization header field applies 486 only to the next outbound proxy that demanded authentication using 487 the Proxy-Authenticate field. When multiple proxies are used in a 488 chain, the Proxy-Authorization header field is consumed by the first 489 outbound proxy that was expecting to receive credentials. A proxy 490 MAY relay the credentials from the client request to the next proxy 491 if that is the mechanism by which the proxies cooperatively 492 authenticate a given request. 494 4.4. WWW-Authenticate 496 The "WWW-Authenticate" header field consists of at least one 497 challenge that indicates the authentication scheme(s) and parameters 498 applicable to the effective request URI (Section 5.5 of [Part1]). 500 It MUST be included in 401 (Unauthorized) response messages and MAY 501 be included in other response messages to indicate that supplying 502 credentials (or different credentials) might affect the response. 504 WWW-Authenticate = 1#challenge 506 User agents are advised to take special care in parsing the WWW- 507 Authenticate field value as it might contain more than one challenge, 508 or if more than one WWW-Authenticate header field is provided, the 509 contents of a challenge itself can contain a comma-separated list of 510 authentication parameters. 512 For instance: 514 WWW-Authenticate: Newauth realm="apps", type=1, 515 title="Login to \"apps\"", Basic realm="simple" 517 This header field contains two challenges; one for the "Newauth" 518 scheme with a realm value of "apps", and two additional parameters 519 "type" and "title", and another one for the "Basic" scheme with a 520 realm value of "simple". 522 Note: The challenge grammar production uses the list syntax as 523 well. Therefore, a sequence of comma, whitespace, and comma can 524 be considered both as applying to the preceding challenge, or to 525 be an empty entry in the list of challenges. In practice, this 526 ambiguity does not affect the semantics of the header field value 527 and thus is harmless. 529 5. IANA Considerations 531 5.1. Authentication Scheme Registry 533 The registration procedure for HTTP Authentication Schemes is defined 534 by Section 2.3 of this document. 536 The HTTP Method Authentication Scheme shall be created at 537 . 539 5.2. Status Code Registration 541 The HTTP Status Code Registry located at 542 shall be updated 543 with the registrations below: 545 +-------+-------------------------------+-------------+ 546 | Value | Description | Reference | 547 +-------+-------------------------------+-------------+ 548 | 401 | Unauthorized | Section 3.1 | 549 | 407 | Proxy Authentication Required | Section 3.2 | 550 +-------+-------------------------------+-------------+ 552 5.3. Header Field Registration 554 The Message Header Field Registry located at shall be 556 updated with the permanent registrations below (see [RFC3864]): 558 +---------------------+----------+----------+-------------+ 559 | Header Field Name | Protocol | Status | Reference | 560 +---------------------+----------+----------+-------------+ 561 | Authorization | http | standard | Section 4.1 | 562 | Proxy-Authenticate | http | standard | Section 4.2 | 563 | Proxy-Authorization | http | standard | Section 4.3 | 564 | WWW-Authenticate | http | standard | Section 4.4 | 565 +---------------------+----------+----------+-------------+ 567 The change controller is: "IETF (iesg@ietf.org) - Internet 568 Engineering Task Force". 570 6. Security Considerations 572 This section is meant to inform application developers, information 573 providers, and users of the security limitations in HTTP/1.1 as 574 described by this document. The discussion does not include 575 definitive solutions to the problems revealed, though it does make 576 some suggestions for reducing security risks. 578 6.1. Authentication Credentials and Idle Clients 580 Existing HTTP clients and user agents typically retain authentication 581 information indefinitely. HTTP/1.1 does not provide a method for a 582 server to direct clients to discard these cached credentials. This 583 is a significant defect that requires further extensions to HTTP. 584 Circumstances under which credential caching can interfere with the 585 application's security model include but are not limited to: 587 o Clients which have been idle for an extended period following 588 which the server might wish to cause the client to reprompt the 589 user for credentials. 591 o Applications which include a session termination indication (such 592 as a "logout" or "commit" button on a page) after which the server 593 side of the application "knows" that there is no further reason 594 for the client to retain the credentials. 596 This is currently under separate study. There are a number of work- 597 arounds to parts of this problem, and we encourage the use of 598 password protection in screen savers, idle time-outs, and other 599 methods which mitigate the security problems inherent in this 600 problem. In particular, user agents which cache credentials are 601 encouraged to provide a readily accessible mechanism for discarding 602 cached credentials under user control. 604 6.2. Protection Spaces 606 Authentication schemes that solely rely on the "realm" mechanism for 607 establishing a protection space will expose credentials to all 608 resources on a server. Clients that have successfully made 609 authenticated requests with a resource can use the same 610 authentication credentials for other resources on the same server. 611 This makes it possible for a different resource to harvest 612 authentication credentials for other resources. 614 This is of particular concern when a server hosts resources for 615 multiple parties under the same canonical root URI (Section 2.2). 616 Possible mitigation strategies include restricting direct access to 617 authentication credentials (i.e., not making the content of the 618 Authorization request header field available), and separating 619 protection spaces by using a different host name for each party. 621 7. Acknowledgments 623 This specification takes over the definition of the HTTP 624 Authentication Framework, previously defined in RFC 2617. We thank 625 John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. 626 Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for 627 their work on that specification. See Section 6 of [RFC2617] for 628 further acknowledgements. 630 See Section 9 of [Part1] for the Acknowledgments related to this 631 document revision. 633 8. References 634 8.1. Normative References 636 [Part1] Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., 637 "HTTP/1.1, part 1: Message Routing and Syntax"", 638 draft-ietf-httpbis-p1-messaging-20 (work in progress), 639 July 2012. 641 [Part2] Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., 642 "HTTP/1.1, part 2: Semantics and Payloads", 643 draft-ietf-httpbis-p2-semantics-20 (work in progress), 644 July 2012. 646 [Part6] Fielding, R., Ed., Lafon, Y., Ed., Nottingham, M., Ed., 647 and J. Reschke, Ed., "HTTP/1.1, part 6: Caching", 648 draft-ietf-httpbis-p6-cache-20 (work in progress), 649 July 2012. 651 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 652 Requirement Levels", BCP 14, RFC 2119, March 1997. 654 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 655 Specifications: ABNF", STD 68, RFC 5234, January 2008. 657 8.2. Informative References 659 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 660 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 661 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 663 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 664 Leach, P., Luotonen, A., and L. Stewart, "HTTP 665 Authentication: Basic and Digest Access Authentication", 666 RFC 2617, June 1999. 668 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 669 Procedures for Message Header Fields", BCP 90, RFC 3864, 670 September 2004. 672 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 673 Resource Identifier (URI): Generic Syntax", STD 66, 674 RFC 3986, January 2005. 676 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 677 Encodings", RFC 4648, October 2006. 679 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 680 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 681 May 2008. 683 Appendix A. Changes from RFCs 2616 and 2617 685 The "realm" parameter isn't required anymore in general; 686 consequently, the ABNF allows challenges without any auth parameters. 687 (Section 2) 689 The "b64token" alternative to auth-param lists has been added for 690 consistency with legacy authentication schemes such as "Basic". 691 (Section 2) 693 Introduce Authentication Scheme Registry. (Section 2.3) 695 Change ABNF productions for header fields to only define the field 696 value. (Section 4) 698 Appendix B. Imported ABNF 700 The following core rules are included by reference, as defined in 701 Appendix B.1 of [RFC5234]: ALPHA (letters), CR (carriage return), 702 CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double 703 quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 704 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII 705 character). 707 The rules below are defined in [Part1]: 709 BWS = 710 OWS = 711 quoted-string = 712 token = 714 Appendix C. Collected ABNF 716 Authorization = credentials 718 BWS = 720 OWS = 722 Proxy-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS 723 challenge ] ) 724 Proxy-Authorization = credentials 726 WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge 727 ] ) 729 auth-param = token BWS "=" BWS ( token / quoted-string ) 730 auth-scheme = token 732 b64token = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) 733 *"=" 735 challenge = auth-scheme [ 1*SP ( b64token / [ ( "," / auth-param ) *( 736 OWS "," [ OWS auth-param ] ) ] ) ] 737 credentials = auth-scheme [ 1*SP ( b64token / [ ( "," / auth-param ) 738 *( OWS "," [ OWS auth-param ] ) ] ) ] 740 quoted-string = 742 token = 744 Appendix D. Change Log (to be removed by RFC Editor before publication) 746 Changes up to the first Working Group Last Call draft are summarized 747 in . 750 D.1. Since draft-ietf-httpbis-p7-auth-19 752 Closed issues: 754 o : "Realms and 755 scope" 757 o : "Strength" 759 o : 760 "Authentication exchanges" 762 o : "ABNF 763 requirements for recipients" 765 o : "note 766 introduction of new IANA registries as normative changes" 768 Index 770 4 771 401 Unauthorized (status code) 9 772 407 Proxy Authentication Required (status code) 10 774 A 775 auth-param 5 776 auth-scheme 5 777 Authorization header field 10 779 B 780 b64token 5 782 C 783 Canonical Root URI 7 784 challenge 6 785 credentials 6 787 G 788 Grammar 789 auth-param 5 790 auth-scheme 5 791 Authorization 10 792 b64token 5 793 challenge 6 794 credentials 6 795 Proxy-Authenticate 11 796 Proxy-Authorization 11 797 WWW-Authenticate 12 799 H 800 Header Fields 801 Authorization 10 802 Proxy-Authenticate 11 803 Proxy-Authorization 11 804 WWW-Authenticate 12 806 P 807 Protection Space 7 808 Proxy-Authenticate header field 11 809 Proxy-Authorization header field 11 811 R 812 Realm 7 814 S 815 Status Codes 816 401 Unauthorized 9 817 407 Proxy Authentication Required 10 819 W 820 WWW-Authenticate header field 12 822 Authors' Addresses 824 Roy T. Fielding (editor) 825 Adobe Systems Incorporated 826 345 Park Ave 827 San Jose, CA 95110 828 USA 830 EMail: fielding@gbiv.com 831 URI: http://roy.gbiv.com/ 833 Yves Lafon (editor) 834 World Wide Web Consortium 835 W3C / ERCIM 836 2004, rte des Lucioles 837 Sophia-Antipolis, AM 06902 838 France 840 EMail: ylafon@w3.org 841 URI: http://www.raubacapeu.net/people/yves/ 843 Julian F. Reschke (editor) 844 greenbytes GmbH 845 Hafenweg 16 846 Muenster, NW 48155 847 Germany 849 EMail: julian.reschke@greenbytes.de 850 URI: http://greenbytes.de/tech/webdav/