idnits 2.17.1
draft-ietf-httpbis-p7-auth-17.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 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 (October 31, 2011) is 4533 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-17
== Outdated reference: A later version (-26) exists of
draft-ietf-httpbis-p6-cache-17
-- 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 (~~), 3 warnings (==), 6 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. Gettys
5 Updates: 2617 (if approved) Alcatel-Lucent
6 Intended status: Standards Track J. Mogul
7 Expires: May 3, 2012 HP
8 H. Frystyk
9 Microsoft
10 L. Masinter
11 Adobe
12 P. Leach
13 Microsoft
14 T. Berners-Lee
15 W3C/MIT
16 Y. Lafon, Ed.
17 W3C
18 J. Reschke, Ed.
19 greenbytes
20 October 31, 2011
22 HTTP/1.1, part 7: Authentication
23 draft-ietf-httpbis-p7-auth-17
25 Abstract
27 The Hypertext Transfer Protocol (HTTP) is an application-level
28 protocol for distributed, collaborative, hypermedia information
29 systems. HTTP has been in use by the World Wide Web global
30 information initiative since 1990. This document is Part 7 of the
31 seven-part specification that defines the protocol referred to as
32 "HTTP/1.1" and, taken together, obsoletes RFC 2616.
34 Part 7 defines the HTTP Authentication framework.
36 Editorial Note (To be removed by RFC Editor)
38 Discussion of this draft should take place on the HTTPBIS working
39 group mailing list (ietf-http-wg@w3.org), which is archived at
40 .
42 The current issues list is at
43 and related
44 documents (including fancy diffs) can be found at
45 .
47 The changes in this draft are summarized in Appendix C.18.
49 Status of This Memo
51 This Internet-Draft is submitted in full conformance with the
52 provisions of BCP 78 and BCP 79.
54 Internet-Drafts are working documents of the Internet Engineering
55 Task Force (IETF). Note that other groups may also distribute
56 working documents as Internet-Drafts. The list of current Internet-
57 Drafts is at http://datatracker.ietf.org/drafts/current/.
59 Internet-Drafts are draft documents valid for a maximum of six months
60 and may be updated, replaced, or obsoleted by other documents at any
61 time. It is inappropriate to use Internet-Drafts as reference
62 material or to cite them other than as "work in progress."
64 This Internet-Draft will expire on May 3, 2012.
66 Copyright Notice
68 Copyright (c) 2011 IETF Trust and the persons identified as the
69 document authors. All rights reserved.
71 This document is subject to BCP 78 and the IETF Trust's Legal
72 Provisions Relating to IETF Documents
73 (http://trustee.ietf.org/license-info) in effect on the date of
74 publication of this document. Please review these documents
75 carefully, as they describe your rights and restrictions with respect
76 to this document. Code Components extracted from this document must
77 include Simplified BSD License text as described in Section 4.e of
78 the Trust Legal Provisions and are provided without warranty as
79 described in the Simplified BSD License.
81 This document may contain material from IETF Documents or IETF
82 Contributions published or made publicly available before November
83 10, 2008. The person(s) controlling the copyright in some of this
84 material may not have granted the IETF Trust the right to allow
85 modifications of such material outside the IETF Standards Process.
86 Without obtaining an adequate license from the person(s) controlling
87 the copyright in such materials, this document may not be modified
88 outside the IETF Standards Process, and derivative works of it may
89 not be created outside the IETF Standards Process, except to format
90 it for publication as an RFC or to translate it into languages other
91 than English.
93 Table of Contents
95 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
96 1.1. Conformance and Error Handling . . . . . . . . . . . . . . 4
97 1.2. Syntax Notation . . . . . . . . . . . . . . . . . . . . . 4
98 1.2.1. Core Rules . . . . . . . . . . . . . . . . . . . . . . 5
99 2. Access Authentication Framework . . . . . . . . . . . . . . . 5
100 2.1. Challenge and Response . . . . . . . . . . . . . . . . . . 5
101 2.2. Protection Space (Realm) . . . . . . . . . . . . . . . . . 7
102 2.3. Authentication Scheme Registry . . . . . . . . . . . . . . 7
103 2.3.1. Considerations for New Authentication Schemes . . . . 8
104 3. Status Code Definitions . . . . . . . . . . . . . . . . . . . 9
105 3.1. 401 Unauthorized . . . . . . . . . . . . . . . . . . . . . 9
106 3.2. 407 Proxy Authentication Required . . . . . . . . . . . . 9
107 4. Header Field Definitions . . . . . . . . . . . . . . . . . . . 9
108 4.1. Authorization . . . . . . . . . . . . . . . . . . . . . . 9
109 4.2. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . . 10
110 4.3. Proxy-Authorization . . . . . . . . . . . . . . . . . . . 11
111 4.4. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . . 11
112 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
113 5.1. Authenticaton Scheme Registry . . . . . . . . . . . . . . 12
114 5.2. Status Code Registration . . . . . . . . . . . . . . . . . 12
115 5.3. Header Field Registration . . . . . . . . . . . . . . . . 12
116 6. Security Considerations . . . . . . . . . . . . . . . . . . . 12
117 6.1. Authentication Credentials and Idle Clients . . . . . . . 13
118 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 13
119 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13
120 8.1. Normative References . . . . . . . . . . . . . . . . . . . 13
121 8.2. Informative References . . . . . . . . . . . . . . . . . . 14
122 Appendix A. Changes from RFCs 2616 and 2617 . . . . . . . . . . . 14
123 Appendix B. Collected ABNF . . . . . . . . . . . . . . . . . . . 15
124 Appendix C. Change Log (to be removed by RFC Editor before
125 publication) . . . . . . . . . . . . . . . . . . . . 16
126 C.1. Since RFC 2616 . . . . . . . . . . . . . . . . . . . . . . 16
127 C.2. Since draft-ietf-httpbis-p7-auth-00 . . . . . . . . . . . 16
128 C.3. Since draft-ietf-httpbis-p7-auth-01 . . . . . . . . . . . 16
129 C.4. Since draft-ietf-httpbis-p7-auth-02 . . . . . . . . . . . 16
130 C.5. Since draft-ietf-httpbis-p7-auth-03 . . . . . . . . . . . 16
131 C.6. Since draft-ietf-httpbis-p7-auth-04 . . . . . . . . . . . 16
132 C.7. Since draft-ietf-httpbis-p7-auth-05 . . . . . . . . . . . 17
133 C.8. Since draft-ietf-httpbis-p7-auth-06 . . . . . . . . . . . 17
134 C.9. Since draft-ietf-httpbis-p7-auth-07 . . . . . . . . . . . 17
135 C.10. Since draft-ietf-httpbis-p7-auth-08 . . . . . . . . . . . 17
136 C.11. Since draft-ietf-httpbis-p7-auth-09 . . . . . . . . . . . 17
137 C.12. Since draft-ietf-httpbis-p7-auth-10 . . . . . . . . . . . 17
138 C.13. Since draft-ietf-httpbis-p7-auth-11 . . . . . . . . . . . 17
139 C.14. Since draft-ietf-httpbis-p7-auth-12 . . . . . . . . . . . 18
140 C.15. Since draft-ietf-httpbis-p7-auth-13 . . . . . . . . . . . 18
141 C.16. Since draft-ietf-httpbis-p7-auth-14 . . . . . . . . . . . 18
142 C.17. Since draft-ietf-httpbis-p7-auth-15 . . . . . . . . . . . 18
143 C.18. Since draft-ietf-httpbis-p7-auth-16 . . . . . . . . . . . 19
144 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
146 1. Introduction
148 This document defines HTTP/1.1 access control and authentication. It
149 includes the relevant parts of RFC 2616 with only minor changes, plus
150 the general framework for HTTP authentication, as previously defined
151 in "HTTP Authentication: Basic and Digest Access Authentication"
152 ([RFC2617]).
154 HTTP provides several OPTIONAL challenge-response authentication
155 mechanisms which can be used by a server to challenge a client
156 request and by a client to provide authentication information. The
157 "basic" and "digest" authentication schemes continue to be specified
158 in RFC 2617.
160 1.1. Conformance and Error Handling
162 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
163 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
164 document are to be interpreted as described in [RFC2119].
166 This document defines conformance criteria for several roles in HTTP
167 communication, including Senders, Recipients, Clients, Servers, User-
168 Agents, Origin Servers, Intermediaries, Proxies and Gateways. See
169 Section 2 of [Part1] for definitions of these terms.
171 An implementation is considered conformant if it complies with all of
172 the requirements associated with its role(s). Note that SHOULD-level
173 requirements are relevant here, unless one of the documented
174 exceptions is applicable.
176 This document also uses ABNF to define valid protocol elements
177 (Section 1.2). In addition to the prose requirements placed upon
178 them, Senders MUST NOT generate protocol elements that are invalid.
180 Unless noted otherwise, Recipients MAY take steps to recover a usable
181 protocol element from an invalid construct. However, HTTP does not
182 define specific error handling mechanisms, except in cases where it
183 has direct impact on security. This is because different uses of the
184 protocol require different error handling strategies; for example, a
185 Web browser may wish to transparently recover from a response where
186 the Location header field doesn't parse according to the ABNF,
187 whereby in a systems control protocol using HTTP, this type of error
188 recovery could lead to dangerous consequences.
190 1.2. Syntax Notation
192 This specification uses the ABNF syntax defined in Section 1.2 of
193 [Part1] (which extends the syntax defined in [RFC5234] with a list
194 rule). Appendix B shows the collected ABNF, with the list rule
195 expanded.
197 The following core rules are included by reference, as defined in
198 [RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF
199 (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote),
200 HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
201 sequence of data), SP (space), and VCHAR (any visible US-ASCII
202 character).
204 1.2.1. Core Rules
206 The core rules below are defined in [Part1]:
208 BWS =
209 OWS =
210 quoted-string =
211 token =
213 2. Access Authentication Framework
215 2.1. Challenge and Response
217 HTTP provides a simple challenge-response authentication mechanism
218 that can be used by a server to challenge a client request and by a
219 client to provide authentication information. It uses an extensible,
220 case-insensitive token to identify the authentication scheme,
221 followed by additional information necessary for achieving
222 authentication via that scheme. The latter can either be a comma-
223 separated list of attribute-value pairs or a single sequence of
224 characters capable of holding base64-encoded information.
226 auth-scheme = token
228 auth-param = token BWS "=" BWS ( token / quoted-string )
230 b64token = 1*( ALPHA / DIGIT /
231 "-" / "." / "_" / "~" / "+" / "/" ) *"="
233 The "b64token" syntax allows the 66 unreserved URI characters
234 ([RFC3986]), plus a few others, so that it can hold a base64,
235 base64url (URL and filename safe alphabet), base32, or base16 (hex)
236 encoding, with or without padding, but excluding whitespace
237 ([RFC4648]).
239 The 401 (Unauthorized) response message is used by an origin server
240 to challenge the authorization of a user agent. This response MUST
241 include a WWW-Authenticate header field containing at least one
242 challenge applicable to the requested resource.
244 The 407 (Proxy Authentication Required) response message is used by a
245 proxy to challenge the authorization of a client and MUST include a
246 Proxy-Authenticate header field containing at least one challenge
247 applicable to the proxy for the requested resource.
249 challenge = auth-scheme [ 1*SP ( b64token / #auth-param ) ]
251 Note: User agents will need to take special care in parsing the
252 WWW-Authenticate and Proxy-Authenticate header field values
253 because they can contain more than one challenge, or if more than
254 one of each is provided, since the contents of a challenge can
255 itself contain a comma-separated list of authentication
256 parameters.
258 Note: Many browsers fail to parse challenges containing unknown
259 schemes. A workaround for this problem is to list well-supported
260 schemes (such as "basic") first.
262 A user agent that wishes to authenticate itself with an origin server
263 -- usually, but not necessarily, after receiving a 401 (Unauthorized)
264 -- MAY do so by including an Authorization header field with the
265 request.
267 A client that wishes to authenticate itself with a proxy -- usually,
268 but not necessarily, after receiving a 407 (Proxy Authentication
269 Required) -- MAY do so by including a Proxy-Authorization header
270 field with the request.
272 Both the Authorization field value and the Proxy-Authorization field
273 value consist of credentials containing the authentication
274 information of the client for the realm of the resource being
275 requested. The user agent MUST choose to use one of the challenges
276 with the strongest auth-scheme it understands and request credentials
277 from the user based upon that challenge.
279 credentials = auth-scheme [ 1*SP ( b64token / #auth-param ) ]
281 If the origin server does not wish to accept the credentials sent
282 with a request, it SHOULD return a 401 (Unauthorized) response. The
283 response MUST include a WWW-Authenticate header field containing at
284 least one (possibly new) challenge applicable to the requested
285 resource.
287 If a proxy does not accept the credentials sent with a request, it
288 SHOULD return a 407 (Proxy Authentication Required). The response
289 MUST include a Proxy-Authenticate header field containing a (possibly
290 new) challenge applicable to the proxy for the requested resource.
292 The HTTP protocol does not restrict applications to this simple
293 challenge-response mechanism for access authentication. Additional
294 mechanisms MAY be used, such as encryption at the transport level or
295 via message encapsulation, and with additional header fields
296 specifying authentication information. However, such additional
297 mechanisms are not defined by this specification.
299 Proxies MUST forward the WWW-Authenticate and Authorization headers
300 unmodified and follow the rules found in Section 4.1.
302 2.2. Protection Space (Realm)
304 The authentication parameter realm is reserved for use by
305 authentication schemes that wish to indicate the scope of protection:
307 realm = "realm" BWS "=" BWS realm-value
308 realm-value = quoted-string
310 A protection space is defined by the canonical root URI (the scheme
311 and authority components of the effective request URI; see Section
312 4.3 of [Part1]) of the server being accessed, in combination with the
313 realm value if present. These realms allow the protected resources
314 on a server to be partitioned into a set of protection spaces, each
315 with its own authentication scheme and/or authorization database.
316 The realm value is a string, generally assigned by the origin server,
317 which can have additional semantics specific to the authentication
318 scheme. Note that there can be multiple challenges with the same
319 auth-scheme but different realms.
321 The protection space determines the domain over which credentials can
322 be automatically applied. If a prior request has been authorized,
323 the same credentials MAY be reused for all other requests within that
324 protection space for a period of time determined by the
325 authentication scheme, parameters, and/or user preference. Unless
326 otherwise defined by the authentication scheme, a single protection
327 space cannot extend outside the scope of its server.
329 2.3. Authentication Scheme Registry
331 The HTTP Authentication Scheme Registry defines the name space for
332 the authentication schemes in challenges and credentials.
334 Registrations MUST include the following fields:
336 o Authentication Scheme Name
337 o Pointer to specification text
339 o Notes (optional)
341 Values to be added to this name space are subject to IETF review
342 ([RFC5226], Section 4.1).
344 The registry itself is maintained at
345 .
347 2.3.1. Considerations for New Authentication Schemes
349 There are certain aspects of the HTTP Authentication Framework that
350 put constraints on how new authentication schemes can work:
352 o Authentication schemes need to be compatible with the inherent
353 constraints of HTTP; for instance, that messages need to keep
354 their semantics when inspected in isolation, thus an
355 authentication scheme can not bind information to the TCP session
356 over which the message was received (see Section 2.2 of [Part1]).
358 o The authentication parameter "realm" is reserved for defining
359 Protection Spaces as defined in Section 2.2. New schemes MUST NOT
360 use it in a way incompatible with that definition.
362 o The "b64token" notation was introduced for compatibility with
363 existing authentication schemes and can only be used once per
364 challenge/credentials. New schemes thus ought to use the "auth-
365 param" syntax instead, because otherwise future extensions will be
366 impossible.
368 o The parsing of challenges and credentials is defined by this
369 specification, and cannot be modified by new authentication
370 schemes. When the auth-param syntax is used, all parameters ought
371 to support both token and quoted-string syntax, and syntactical
372 constraints ought to be defined on the field value after parsing
373 (i.e., quoted-string processing). This is necessary so that
374 recipients can use a generic parser that applies to all
375 authentication schemes.
377 Note: the fact that the value syntax for the "realm" parameter is
378 restricted to quoted-string was a bad design choice not to be
379 repeated for new parameters.
381 o Authentication schemes need to document whether they are usable in
382 origin-server authentication (i.e., using WWW-Authenticate),
383 and/or proxy authentication (i.e., using Proxy-Authenticate).
385 o The credentials carried in an Authorization header field are
386 specific to the User Agent, and therefore have the same effect on
387 HTTP caches as the "private" Cache-Control response directive,
388 within the scope of the request they appear in.
390 Therefore, new authentication schemes which choose not to carry
391 credentials in the Authorization header (e.g., using a newly
392 defined header) will need to explicitly disallow caching, by
393 mandating the use of either Cache-Control request directives
394 (e.g., "no-store") or response directives (e.g., "private").
396 3. Status Code Definitions
398 3.1. 401 Unauthorized
400 The request requires user authentication. The response MUST include
401 a WWW-Authenticate header field (Section 4.4) containing a challenge
402 applicable to the target resource. The client MAY repeat the request
403 with a suitable Authorization header field (Section 4.1). If the
404 request already included Authorization credentials, then the 401
405 response indicates that authorization has been refused for those
406 credentials. If the 401 response contains the same challenge as the
407 prior response, and the user agent has already attempted
408 authentication at least once, then the user SHOULD be presented the
409 representation that was given in the response, since that
410 representation might include relevant diagnostic information.
412 3.2. 407 Proxy Authentication Required
414 This code is similar to 401 (Unauthorized), but indicates that the
415 client ought to first authenticate itself with the proxy. The proxy
416 MUST return a Proxy-Authenticate header field (Section 4.2)
417 containing a challenge applicable to the proxy for the target
418 resource. The client MAY repeat the request with a suitable Proxy-
419 Authorization header field (Section 4.3).
421 4. Header Field Definitions
423 This section defines the syntax and semantics of HTTP/1.1 header
424 fields related to authentication.
426 4.1. Authorization
428 The "Authorization" header field allows a user agent to authenticate
429 itself with a server -- usually, but not necessarily, after receiving
430 a 401 (Unauthorized) response. Its value consists of credentials
431 containing information of the user agent for the realm of the
432 resource being requested.
434 Authorization = credentials
436 If a request is authenticated and a realm specified, the same
437 credentials SHOULD be valid for all other requests within this realm
438 (assuming that the authentication scheme itself does not require
439 otherwise, such as credentials that vary according to a challenge
440 value or using synchronized clocks).
442 When a shared cache (see Section 1.2 of [Part6]) receives a request
443 containing an Authorization field, it MUST NOT return the
444 corresponding response as a reply to any other request, unless one of
445 the following specific exceptions holds:
447 1. If the response includes the "s-maxage" cache-control directive,
448 the cache MAY use that response in replying to a subsequent
449 request. But (if the specified maximum age has passed) a proxy
450 cache MUST first revalidate it with the origin server, using the
451 header fields from the new request to allow the origin server to
452 authenticate the new request. (This is the defined behavior for
453 s-maxage.) If the response includes "s-maxage=0", the proxy MUST
454 always revalidate it before re-using it.
456 2. If the response includes the "must-revalidate" cache-control
457 directive, the cache MAY use that response in replying to a
458 subsequent request. But if the response is stale, all caches
459 MUST first revalidate it with the origin server, using the header
460 fields from the new request to allow the origin server to
461 authenticate the new request.
463 3. If the response includes the "public" cache-control directive, it
464 MAY be returned in reply to any subsequent request.
466 4.2. Proxy-Authenticate
468 The "Proxy-Authenticate" header field consists of a challenge that
469 indicates the authentication scheme and parameters applicable to the
470 proxy for this effective request URI (Section 4.3 of [Part1]). It
471 MUST be included as part of a 407 (Proxy Authentication Required)
472 response.
474 Proxy-Authenticate = 1#challenge
476 Unlike WWW-Authenticate, the Proxy-Authenticate header field applies
477 only to the current connection and SHOULD NOT be passed on to
478 downstream clients. However, an intermediate proxy might need to
479 obtain its own credentials by requesting them from the downstream
480 client, which in some circumstances will appear as if the proxy is
481 forwarding the Proxy-Authenticate header field.
483 4.3. Proxy-Authorization
485 The "Proxy-Authorization" header field allows the client to identify
486 itself (or its user) to a proxy which requires authentication. Its
487 value consists of credentials containing the authentication
488 information of the user agent for the proxy and/or realm of the
489 resource being requested.
491 Proxy-Authorization = credentials
493 Unlike Authorization, the Proxy-Authorization header field applies
494 only to the next outbound proxy that demanded authentication using
495 the Proxy-Authenticate field. When multiple proxies are used in a
496 chain, the Proxy-Authorization header field is consumed by the first
497 outbound proxy that was expecting to receive credentials. A proxy
498 MAY relay the credentials from the client request to the next proxy
499 if that is the mechanism by which the proxies cooperatively
500 authenticate a given request.
502 4.4. WWW-Authenticate
504 The "WWW-Authenticate" header field consists of at least one
505 challenge that indicates the authentication scheme(s) and parameters
506 applicable to the effective request URI (Section 4.3 of [Part1]).
508 It MUST be included in 401 (Unauthorized) response messages and MAY
509 be included in other response messages to indicate that supplying
510 credentials (or different credentials) might affect the response.
512 WWW-Authenticate = 1#challenge
514 User agents are advised to take special care in parsing the WWW-
515 Authenticate field value as it might contain more than one challenge,
516 or if more than one WWW-Authenticate header field is provided, the
517 contents of a challenge itself can contain a comma-separated list of
518 authentication parameters.
520 For instance:
522 WWW-Authenticate: Newauth realm="apps", type=1,
523 title="Login to \"apps\"", Basic realm="simple"
525 This header field contains two challenges; one for the "Newauth"
526 scheme with a realm value of "apps", and two additional parameters
527 "type" and "title", and another one for the "Basic" scheme with a
528 realm value of "simple".
530 5. IANA Considerations
532 5.1. Authenticaton Scheme Registry
534 The registration procedure for HTTP Authentication Schemes is defined
535 by Section 2.3 of this document.
537 The HTTP Method Authentication Scheme shall be created at
538 .
540 5.2. Status Code Registration
542 The HTTP Status Code Registry located at
543 shall be updated
544 with the registrations below:
546 +-------+-------------------------------+-------------+
547 | Value | Description | Reference |
548 +-------+-------------------------------+-------------+
549 | 401 | Unauthorized | Section 3.1 |
550 | 407 | Proxy Authentication Required | Section 3.2 |
551 +-------+-------------------------------+-------------+
553 5.3. Header Field Registration
555 The Message Header Field Registry located at shall be
557 updated with the permanent registrations below (see [RFC3864]):
559 +---------------------+----------+----------+-------------+
560 | Header Field Name | Protocol | Status | Reference |
561 +---------------------+----------+----------+-------------+
562 | Authorization | http | standard | Section 4.1 |
563 | Proxy-Authenticate | http | standard | Section 4.2 |
564 | Proxy-Authorization | http | standard | Section 4.3 |
565 | WWW-Authenticate | http | standard | Section 4.4 |
566 +---------------------+----------+----------+-------------+
568 The change controller is: "IETF (iesg@ietf.org) - Internet
569 Engineering Task Force".
571 6. Security Considerations
573 This section is meant to inform application developers, information
574 providers, and users of the security limitations in HTTP/1.1 as
575 described by this document. The discussion does not include
576 definitive solutions to the problems revealed, though it does make
577 some suggestions for reducing security risks.
579 6.1. Authentication Credentials and Idle Clients
581 Existing HTTP clients and user agents typically retain authentication
582 information indefinitely. HTTP/1.1 does not provide a method for a
583 server to direct clients to discard these cached credentials. This
584 is a significant defect that requires further extensions to HTTP.
585 Circumstances under which credential caching can interfere with the
586 application's security model include but are not limited to:
588 o Clients which have been idle for an extended period following
589 which the server might wish to cause the client to reprompt the
590 user for credentials.
592 o Applications which include a session termination indication (such
593 as a "logout" or "commit" button on a page) after which the server
594 side of the application "knows" that there is no further reason
595 for the client to retain the credentials.
597 This is currently under separate study. There are a number of work-
598 arounds to parts of this problem, and we encourage the use of
599 password protection in screen savers, idle time-outs, and other
600 methods which mitigate the security problems inherent in this
601 problem. In particular, user agents which cache credentials are
602 encouraged to provide a readily accessible mechanism for discarding
603 cached credentials under user control.
605 7. Acknowledgments
607 This specification takes over the definition of the HTTP
608 Authentication Framework, previously defined in RFC 2617. We thank
609 John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D.
610 Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for
611 their work on that specification. See Section 6 of [RFC2617] for
612 further acknowledgements.
614 See Section 11 of [Part1] for the Acknowledgments related to this
615 document revision.
617 8. References
619 8.1. Normative References
621 [Part1] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H.,
622 Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed.,
623 and J. Reschke, Ed., "HTTP/1.1, part 1: URIs, Connections,
624 and Message Parsing", draft-ietf-httpbis-p1-messaging-17
625 (work in progress), October 2011.
627 [Part6] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H.,
628 Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed.,
629 Nottingham, M., Ed., and J. Reschke, Ed., "HTTP/1.1, part
630 6: Caching", draft-ietf-httpbis-p6-cache-17 (work in
631 progress), October 2011.
633 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
634 Requirement Levels", BCP 14, RFC 2119, March 1997.
636 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
637 Specifications: ABNF", STD 68, RFC 5234, January 2008.
639 8.2. Informative References
641 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
642 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
643 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
645 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
646 Leach, P., Luotonen, A., and L. Stewart, "HTTP
647 Authentication: Basic and Digest Access Authentication",
648 RFC 2617, June 1999.
650 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration
651 Procedures for Message Header Fields", BCP 90, RFC 3864,
652 September 2004.
654 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
655 Resource Identifier (URI): Generic Syntax", STD 66,
656 RFC 3986, January 2005.
658 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
659 Encodings", RFC 4648, October 2006.
661 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
662 IANA Considerations Section in RFCs", BCP 26, RFC 5226,
663 May 2008.
665 Appendix A. Changes from RFCs 2616 and 2617
667 The "realm" parameter isn't required anymore in general;
668 consequently, the ABNF allows challenges without any auth parameters.
669 (Section 2)
671 The "b64token" alternative to auth-param lists has been added for
672 consistency with legacy authentication schemes such as "Basic".
673 (Section 2)
674 Change ABNF productions for header fields to only define the field
675 value. (Section 4)
677 Appendix B. Collected ABNF
679 Authorization = credentials
681 BWS =
683 OWS =
685 Proxy-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS
686 challenge ] )
687 Proxy-Authorization = credentials
689 WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge
690 ] )
692 auth-param = token BWS "=" BWS ( token / quoted-string )
693 auth-scheme = token
695 b64token = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" )
696 *"="
698 challenge = auth-scheme [ 1*SP ( b64token / [ ( "," / auth-param ) *(
699 OWS "," [ OWS auth-param ] ) ] ) ]
700 credentials = auth-scheme [ 1*SP ( b64token / [ ( "," / auth-param )
701 *( OWS "," [ OWS auth-param ] ) ] ) ]
703 quoted-string =
705 realm = "realm" BWS "=" BWS realm-value
706 realm-value = quoted-string
708 token =
710 ABNF diagnostics:
712 ; Authorization defined but not used
713 ; Proxy-Authenticate defined but not used
714 ; Proxy-Authorization defined but not used
715 ; WWW-Authenticate defined but not used
716 ; realm defined but not used
718 Appendix C. Change Log (to be removed by RFC Editor before publication)
720 C.1. Since RFC 2616
722 Extracted relevant partitions from [RFC2616].
724 C.2. Since draft-ietf-httpbis-p7-auth-00
726 Closed issues:
728 o : "Normative and
729 Informative references"
731 C.3. Since draft-ietf-httpbis-p7-auth-01
733 Ongoing work on ABNF conversion
734 ():
736 o Explicitly import BNF rules for "challenge" and "credentials" from
737 RFC2617.
739 o Add explicit references to BNF syntax and rules imported from
740 other parts of the specification.
742 C.4. Since draft-ietf-httpbis-p7-auth-02
744 Ongoing work on IANA Message Header Field Registration
745 ():
747 o Reference RFC 3984, and update header field registrations for
748 header fields defined in this document.
750 C.5. Since draft-ietf-httpbis-p7-auth-03
752 None.
754 C.6. Since draft-ietf-httpbis-p7-auth-04
756 Ongoing work on ABNF conversion
757 ():
759 o Use "/" instead of "|" for alternatives.
761 o Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
762 whitespace ("OWS") and required whitespace ("RWS").
764 o Rewrite ABNFs to spell out whitespace rules, factor out header
765 field value format definitions.
767 C.7. Since draft-ietf-httpbis-p7-auth-05
769 Final work on ABNF conversion
770 ():
772 o Add appendix containing collected and expanded ABNF, reorganize
773 ABNF introduction.
775 C.8. Since draft-ietf-httpbis-p7-auth-06
777 None.
779 C.9. Since draft-ietf-httpbis-p7-auth-07
781 Closed issues:
783 o : "move IANA
784 registrations for optional status codes"
786 C.10. Since draft-ietf-httpbis-p7-auth-08
788 No significant changes.
790 C.11. Since draft-ietf-httpbis-p7-auth-09
792 Partly resolved issues:
794 o : "Term for the
795 requested resource's URI"
797 C.12. Since draft-ietf-httpbis-p7-auth-10
799 None.
801 C.13. Since draft-ietf-httpbis-p7-auth-11
803 Closed issues:
805 o : "introduction
806 to part 7 is work-in-progress"
808 o : "auth-param
809 syntax"
811 o : "Header
812 Classification"
814 o : "absorbing the
815 auth framework from 2617"
817 Partly resolved issues:
819 o : "should we
820 have an auth scheme registry"
822 C.14. Since draft-ietf-httpbis-p7-auth-12
824 None.
826 C.15. Since draft-ietf-httpbis-p7-auth-13
828 Closed issues:
830 o : "untangle
831 ABNFs for header fields"
833 C.16. Since draft-ietf-httpbis-p7-auth-14
835 None.
837 C.17. Since draft-ietf-httpbis-p7-auth-15
839 Closed issues:
841 o : "Relationship
842 between 401, Authorization and WWW-Authenticate"
844 o : "Realm
845 required on challenges"
847 o : "auth-param
848 syntax"
850 o :
851 "Considerations for new authentications schemes"
853 o : "LWS in auth-
854 param ABNF"
856 o : "credentials
857 ABNF missing SP (still using implied LWS?)"
859 C.18. Since draft-ietf-httpbis-p7-auth-16
861 Closed issues:
863 o : "Document
864 HTTP's error-handling philosophy"
866 o : "add advice on
867 defining auth scheme parameters"
869 Index
871 4
872 401 Unauthorized (status code) 9
873 407 Proxy Authentication Required (status code) 9
875 A
876 auth-param 5
877 auth-scheme 5
878 Authorization header field 9
880 B
881 b64token 5
883 C
884 challenge 6
885 credentials 6
887 G
888 Grammar
889 auth-param 5
890 auth-scheme 5
891 Authorization 10
892 b64token 5
893 challenge 6
894 credentials 6
895 Proxy-Authenticate 10
896 Proxy-Authorization 11
897 realm 7
898 WWW-Authenticate 11
900 H
901 Header Fields
902 Authorization 9
903 Proxy-Authenticate 10
904 Proxy-Authorization 11
905 WWW-Authenticate 11
907 P
908 Protection Space 7
909 Proxy-Authenticate header field 10
910 Proxy-Authorization header field 11
912 R
913 Realm 7
914 realm 7
915 realm-value 7
917 S
918 Status Codes
919 401 Unauthorized 9
920 407 Proxy Authentication Required 9
922 W
923 WWW-Authenticate header field 11
925 Authors' Addresses
927 Roy T. Fielding (editor)
928 Adobe Systems Incorporated
929 345 Park Ave
930 San Jose, CA 95110
931 USA
933 EMail: fielding@gbiv.com
934 URI: http://roy.gbiv.com/
936 Jim Gettys
937 Alcatel-Lucent Bell Labs
938 21 Oak Knoll Road
939 Carlisle, MA 01741
940 USA
942 EMail: jg@freedesktop.org
943 URI: http://gettys.wordpress.com/
944 Jeffrey C. Mogul
945 Hewlett-Packard Company
946 HP Labs, Large Scale Systems Group
947 1501 Page Mill Road, MS 1177
948 Palo Alto, CA 94304
949 USA
951 EMail: JeffMogul@acm.org
953 Henrik Frystyk Nielsen
954 Microsoft Corporation
955 1 Microsoft Way
956 Redmond, WA 98052
957 USA
959 EMail: henrikn@microsoft.com
961 Larry Masinter
962 Adobe Systems Incorporated
963 345 Park Ave
964 San Jose, CA 95110
965 USA
967 EMail: LMM@acm.org
968 URI: http://larry.masinter.net/
970 Paul J. Leach
971 Microsoft Corporation
972 1 Microsoft Way
973 Redmond, WA 98052
975 EMail: paulle@microsoft.com
977 Tim Berners-Lee
978 World Wide Web Consortium
979 MIT Computer Science and Artificial Intelligence Laboratory
980 The Stata Center, Building 32
981 32 Vassar Street
982 Cambridge, MA 02139
983 USA
985 EMail: timbl@w3.org
986 URI: http://www.w3.org/People/Berners-Lee/
987 Yves Lafon (editor)
988 World Wide Web Consortium
989 W3C / ERCIM
990 2004, rte des Lucioles
991 Sophia-Antipolis, AM 06902
992 France
994 EMail: ylafon@w3.org
995 URI: http://www.raubacapeu.net/people/yves/
997 Julian F. Reschke (editor)
998 greenbytes GmbH
999 Hafenweg 16
1000 Muenster, NW 48155
1001 Germany
1003 Phone: +49 251 2807760
1004 Fax: +49 251 2807761
1005 EMail: julian.reschke@greenbytes.de
1006 URI: http://greenbytes.de/tech/webdav/