source: draft-ietf-httpbis/25/draft-ietf-httpbis-p7-auth-25.txt @ 2656

Last change on this file since 2656 was 2495, checked in by julian.reschke@…, 7 years ago

prepare publication of -25 drafts on 2013-11-17

  • Property svn:eol-style set to native
File size: 35.4 KB
Line 
1
2
3
4HTTPbis Working Group                                   R. Fielding, Ed.
5Internet-Draft                                                     Adobe
6Obsoletes: 2616 (if approved)                            J. Reschke, Ed.
7Updates: 2617 (if approved)                                   greenbytes
8Intended status: Standards Track                       November 17, 2013
9Expires: May 21, 2014
10
11
12         Hypertext Transfer Protocol (HTTP/1.1): Authentication
13                     draft-ietf-httpbis-p7-auth-25
14
15Abstract
16
17   The Hypertext Transfer Protocol (HTTP) is an application-level
18   protocol for distributed, collaborative, hypermedia information
19   systems.  This document defines the HTTP Authentication framework.
20
21Editorial Note (To be removed by RFC Editor)
22
23   Discussion of this draft takes place on the HTTPBIS working group
24   mailing list (ietf-http-wg@w3.org), which is archived at
25   <http://lists.w3.org/Archives/Public/ietf-http-wg/>.
26
27   The current issues list is at
28   <http://tools.ietf.org/wg/httpbis/trac/report/3> and related
29   documents (including fancy diffs) can be found at
30   <http://tools.ietf.org/wg/httpbis/>.
31
32   The changes in this draft are summarized in Appendix D.1.
33
34Status of This Memo
35
36   This Internet-Draft is submitted in full conformance with the
37   provisions of BCP 78 and BCP 79.
38
39   Internet-Drafts are working documents of the Internet Engineering
40   Task Force (IETF).  Note that other groups may also distribute
41   working documents as Internet-Drafts.  The list of current Internet-
42   Drafts is at http://datatracker.ietf.org/drafts/current/.
43
44   Internet-Drafts are draft documents valid for a maximum of six months
45   and may be updated, replaced, or obsoleted by other documents at any
46   time.  It is inappropriate to use Internet-Drafts as reference
47   material or to cite them other than as "work in progress."
48
49   This Internet-Draft will expire on May 21, 2014.
50
51Copyright Notice
52
53
54
55Fielding & Reschke        Expires May 21, 2014                  [Page 1]
56
57Internet-Draft           HTTP/1.1 Authentication           November 2013
58
59
60   Copyright (c) 2013 IETF Trust and the persons identified as the
61   document authors.  All rights reserved.
62
63   This document is subject to BCP 78 and the IETF Trust's Legal
64   Provisions Relating to IETF Documents
65   (http://trustee.ietf.org/license-info) in effect on the date of
66   publication of this document.  Please review these documents
67   carefully, as they describe your rights and restrictions with respect
68   to this document.  Code Components extracted from this document must
69   include Simplified BSD License text as described in Section 4.e of
70   the Trust Legal Provisions and are provided without warranty as
71   described in the Simplified BSD License.
72
73   This document may contain material from IETF Documents or IETF
74   Contributions published or made publicly available before November
75   10, 2008.  The person(s) controlling the copyright in some of this
76   material may not have granted the IETF Trust the right to allow
77   modifications of such material outside the IETF Standards Process.
78   Without obtaining an adequate license from the person(s) controlling
79   the copyright in such materials, this document may not be modified
80   outside the IETF Standards Process, and derivative works of it may
81   not be created outside the IETF Standards Process, except to format
82   it for publication as an RFC or to translate it into languages other
83   than English.
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111Fielding & Reschke        Expires May 21, 2014                  [Page 2]
112
113Internet-Draft           HTTP/1.1 Authentication           November 2013
114
115
116Table of Contents
117
118   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  4
119     1.1.  Conformance and Error Handling . . . . . . . . . . . . . .  4
120     1.2.  Syntax Notation  . . . . . . . . . . . . . . . . . . . . .  4
121   2.  Access Authentication Framework  . . . . . . . . . . . . . . .  4
122     2.1.  Challenge and Response . . . . . . . . . . . . . . . . . .  4
123     2.2.  Protection Space (Realm) . . . . . . . . . . . . . . . . .  6
124   3.  Status Code Definitions  . . . . . . . . . . . . . . . . . . .  7
125     3.1.  401 Unauthorized . . . . . . . . . . . . . . . . . . . . .  7
126     3.2.  407 Proxy Authentication Required  . . . . . . . . . . . .  7
127   4.  Header Field Definitions . . . . . . . . . . . . . . . . . . .  7
128     4.1.  Authorization  . . . . . . . . . . . . . . . . . . . . . .  7
129     4.2.  Proxy-Authenticate . . . . . . . . . . . . . . . . . . . .  8
130     4.3.  Proxy-Authorization  . . . . . . . . . . . . . . . . . . .  8
131     4.4.  WWW-Authenticate . . . . . . . . . . . . . . . . . . . . .  9
132   5.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
133     5.1.  Authentication Scheme Registry . . . . . . . . . . . . . . 10
134       5.1.1.  Procedure  . . . . . . . . . . . . . . . . . . . . . . 10
135       5.1.2.  Considerations for New Authentication Schemes  . . . . 10
136     5.2.  Status Code Registration . . . . . . . . . . . . . . . . . 11
137     5.3.  Header Field Registration  . . . . . . . . . . . . . . . . 12
138   6.  Security Considerations  . . . . . . . . . . . . . . . . . . . 12
139     6.1.  Authentication Credentials and Idle Clients  . . . . . . . 12
140     6.2.  Protection Spaces  . . . . . . . . . . . . . . . . . . . . 13
141   7.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 13
142   8.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 14
143     8.1.  Normative References . . . . . . . . . . . . . . . . . . . 14
144     8.2.  Informative References . . . . . . . . . . . . . . . . . . 14
145   Appendix A.  Changes from RFCs 2616 and 2617 . . . . . . . . . . . 15
146   Appendix B.  Imported ABNF . . . . . . . . . . . . . . . . . . . . 15
147   Appendix C.  Collected ABNF  . . . . . . . . . . . . . . . . . . . 15
148   Appendix D.  Change Log (to be removed by RFC Editor before
149                publication)  . . . . . . . . . . . . . . . . . . . . 16
150     D.1.  Since draft-ietf-httpbis-p7-auth-24  . . . . . . . . . . . 16
151   Index  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167Fielding & Reschke        Expires May 21, 2014                  [Page 3]
168
169Internet-Draft           HTTP/1.1 Authentication           November 2013
170
171
1721.  Introduction
173
174   This document defines HTTP/1.1 access control and authentication.  It
175   includes the relevant parts of RFC 2616 with only minor changes
176   ([RFC2616]), plus the general framework for HTTP authentication, as
177   previously defined in "HTTP Authentication: Basic and Digest Access
178   Authentication" ([RFC2617]).
179
180   HTTP provides several OPTIONAL challenge-response authentication
181   schemes that can be used by a server to challenge a client request
182   and by a client to provide authentication information.  The "basic"
183   and "digest" authentication schemes continue to be specified in RFC
184   2617.
185
1861.1.  Conformance and Error Handling
187
188   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
189   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
190   document are to be interpreted as described in [RFC2119].
191
192   Conformance criteria and considerations regarding error handling are
193   defined in Section 2.5 of [Part1].
194
1951.2.  Syntax Notation
196
197   This specification uses the Augmented Backus-Naur Form (ABNF)
198   notation of [RFC5234] with the list rule extension defined in Section
199   7 of [Part1].  Appendix B describes rules imported from other
200   documents.  Appendix C shows the collected ABNF with the list rule
201   expanded.
202
2032.  Access Authentication Framework
204
2052.1.  Challenge and Response
206
207   HTTP provides a simple challenge-response authentication framework
208   that can be used by a server to challenge a client request and by a
209   client to provide authentication information.  It uses a case-
210   insensitive token as a means to identify the authentication scheme,
211   followed by additional information necessary for achieving
212   authentication via that scheme.  The latter can either be a comma-
213   separated list of parameters or a single sequence of characters
214   capable of holding base64-encoded information.
215
216   Parameters are name-value pairs where the name is matched case-
217   insensitively, and each parameter name MUST only occur once per
218   challenge.
219
220
221
222
223Fielding & Reschke        Expires May 21, 2014                  [Page 4]
224
225Internet-Draft           HTTP/1.1 Authentication           November 2013
226
227
228     auth-scheme    = token
229
230     auth-param     = token BWS "=" BWS ( token / quoted-string )
231
232     token68        = 1*( ALPHA / DIGIT /
233                          "-" / "." / "_" / "~" / "+" / "/" ) *"="
234
235   The "token68" syntax allows the 66 unreserved URI characters
236   ([RFC3986]), plus a few others, so that it can hold a base64,
237   base64url (URL and filename safe alphabet), base32, or base16 (hex)
238   encoding, with or without padding, but excluding whitespace
239   ([RFC4648]).
240
241   The 401 (Unauthorized) response message is used by an origin server
242   to challenge the authorization of a user agent.  This response MUST
243   include a WWW-Authenticate header field containing at least one
244   challenge applicable to the requested resource.
245
246   The 407 (Proxy Authentication Required) response message is used by a
247   proxy to challenge the authorization of a client and MUST include a
248   Proxy-Authenticate header field containing at least one challenge
249   applicable to the proxy for the requested resource.
250
251     challenge   = auth-scheme [ 1*SP ( token68 / #auth-param ) ]
252
253      Note: Many clients fail to parse challenges containing unknown
254      schemes.  A workaround for this problem is to list well-supported
255      schemes (such as "basic") first.
256
257   A user agent that wishes to authenticate itself with an origin server
258   -- usually, but not necessarily, after receiving a 401 (Unauthorized)
259   -- can do so by including an Authorization header field with the
260   request.
261
262   A client that wishes to authenticate itself with a proxy -- usually,
263   but not necessarily, after receiving a 407 (Proxy Authentication
264   Required) -- can do so by including a Proxy-Authorization header
265   field with the request.
266
267   Both the Authorization field value and the Proxy-Authorization field
268   value contain the client's credentials for the realm of the resource
269   being requested, based upon a challenge received in a response
270   (possibly at some point in the past).  When creating their values,
271   the user agent ought to do so by selecting the challenge with what it
272   considers to be the most secure auth-scheme that it understands,
273   obtaining credentials from the user as appropriate.
274
275     credentials = auth-scheme [ 1*SP ( token68 / #auth-param ) ]
276
277
278
279Fielding & Reschke        Expires May 21, 2014                  [Page 5]
280
281Internet-Draft           HTTP/1.1 Authentication           November 2013
282
283
284   Upon receipt of a request for a protected resource that omits
285   credentials, contains invalid credentials (e.g., a bad password) or
286   partial credentials (e.g., when the authentication scheme requires
287   more than one round trip), an origin server SHOULD send a 401
288   (Unauthorized) response that contains a WWW-Authenticate header field
289   with at least one (possibly new) challenge applicable to the
290   requested resource.
291
292   Likewise, upon receipt of a request that requires authentication by
293   proxies that omit credentials or contain invalid or partial
294   credentials, a proxy SHOULD send a 407 (Proxy Authentication
295   Required) response that contains a Proxy-Authenticate header field
296   with a (possibly new) challenge applicable to the proxy.
297
298   A server receiving credentials that are valid, but not adequate to
299   gain access, ought to respond with the 403 (Forbidden) status code
300   (Section 6.5.3 of [Part2]).
301
302   HTTP does not restrict applications to this simple challenge-response
303   framework for access authentication.  Additional mechanisms can be
304   used, such as authentication at the transport level or via message
305   encapsulation, and with additional header fields specifying
306   authentication information.  However, such additional mechanisms are
307   not defined by this specification.
308
309   A proxy MUST forward the WWW-Authenticate and Authorization header
310   fields unmodified and follow the rules found in Section 4.1.
311
3122.2.  Protection Space (Realm)
313
314   The authentication parameter realm is reserved for use by
315   authentication schemes that wish to indicate the scope of protection.
316
317   A protection space is defined by the canonical root URI (the scheme
318   and authority components of the effective request URI; see Section
319   5.5 of [Part1]) of the server being accessed, in combination with the
320   realm value if present.  These realms allow the protected resources
321   on a server to be partitioned into a set of protection spaces, each
322   with its own authentication scheme and/or authorization database.
323   The realm value is a string, generally assigned by the origin server,
324   which can have additional semantics specific to the authentication
325   scheme.  Note that a response can have multiple challenges with the
326   same auth-scheme but different realms.
327
328   The protection space determines the domain over which credentials can
329   be automatically applied.  If a prior request has been authorized,
330   the user agent MAY reuse the same credentials for all other requests
331   within that protection space for a period of time determined by the
332
333
334
335Fielding & Reschke        Expires May 21, 2014                  [Page 6]
336
337Internet-Draft           HTTP/1.1 Authentication           November 2013
338
339
340   authentication scheme, parameters, and/or user preferences (such as a
341   configurable inactivity timeout).  Unless specifically allowed by the
342   authentication scheme, a single protection space cannot extend
343   outside the scope of its server.
344
345   For historical reasons, a sender MUST only generate the quoted-string
346   syntax.  Recipients might have to support both token and quoted-
347   string syntax for maximum interoperability with existing clients that
348   have been accepting both notations for a long time.
349
3503.  Status Code Definitions
351
3523.1.  401 Unauthorized
353
354   The 401 (Unauthorized) status code indicates that the request has not
355   been applied because it lacks valid authentication credentials for
356   the target resource.  The origin server MUST send a WWW-Authenticate
357   header field (Section 4.4) containing at least one challenge
358   applicable to the target resource.  If the request included
359   authentication credentials, then the 401 response indicates that
360   authorization has been refused for those credentials.  The user agent
361   MAY repeat the request with a new or replaced Authorization header
362   field (Section 4.1).  If the 401 response contains the same challenge
363   as the prior response, and the user agent has already attempted
364   authentication at least once, then the user agent SHOULD present the
365   enclosed representation to the user, since it usually contains
366   relevant diagnostic information.
367
3683.2.  407 Proxy Authentication Required
369
370   The 407 (Proxy Authentication Required) status code is similar to 401
371   (Unauthorized), but indicates that the client needs to authenticate
372   itself in order to use a proxy.  The proxy MUST send a Proxy-
373   Authenticate header field (Section 4.2) containing a challenge
374   applicable to that proxy for the target resource.  The client MAY
375   repeat the request with a new or replaced Proxy-Authorization header
376   field (Section 4.3).
377
3784.  Header Field Definitions
379
380   This section defines the syntax and semantics of HTTP/1.1 header
381   fields related to authentication.
382
3834.1.  Authorization
384
385   The "Authorization" header field allows a user agent to authenticate
386   itself with an origin server -- usually, but not necessarily, after
387   receiving a 401 (Unauthorized) response.  Its value consists of
388
389
390
391Fielding & Reschke        Expires May 21, 2014                  [Page 7]
392
393Internet-Draft           HTTP/1.1 Authentication           November 2013
394
395
396   credentials containing the authentication information of the user
397   agent for the realm of the resource being requested.
398
399     Authorization = credentials
400
401   If a request is authenticated and a realm specified, the same
402   credentials are presumed to be valid for all other requests within
403   this realm (assuming that the authentication scheme itself does not
404   require otherwise, such as credentials that vary according to a
405   challenge value or using synchronized clocks).
406
407   See Section 3.2 of [Part6] for details of and requirements pertaining
408   to handling of the Authorization field by HTTP caches.
409
4104.2.  Proxy-Authenticate
411
412   The "Proxy-Authenticate" header field consists of at least one
413   challenge that indicates the authentication scheme(s) and parameters
414   applicable to the proxy for this effective request URI (Section 5.5
415   of [Part1]).  It MUST be included as part of a 407 (Proxy
416   Authentication Required) response.
417
418     Proxy-Authenticate = 1#challenge
419
420   Unlike WWW-Authenticate, the Proxy-Authenticate header field applies
421   only to the next outbound client on the response chain that chose to
422   direct its request to the responding proxy.  If that recipient is
423   also a proxy, it will generally consume the Proxy-Authenticate header
424   field (and generate an appropriate Proxy-Authorization in a
425   subsequent request) rather than forward the header field to its own
426   outbound clients.  However, if a recipient proxy needs to obtain its
427   own credentials by requesting them from a further outbound client, it
428   will generate its own 407 response, which might have the appearance
429   of forwarding the Proxy-Authenticate header field if both proxies use
430   the same challenge set.
431
432   Note that the parsing considerations for WWW-Authenticate apply to
433   this header field as well; see Section 4.4 for details.
434
4354.3.  Proxy-Authorization
436
437   The "Proxy-Authorization" header field allows the client to identify
438   itself (or its user) to a proxy that requires authentication.  Its
439   value consists of credentials containing the authentication
440   information of the client for the proxy and/or realm of the resource
441   being requested.
442
443     Proxy-Authorization = credentials
444
445
446
447Fielding & Reschke        Expires May 21, 2014                  [Page 8]
448
449Internet-Draft           HTTP/1.1 Authentication           November 2013
450
451
452   Unlike Authorization, the Proxy-Authorization header field applies
453   only to the next inbound proxy that demanded authentication using the
454   Proxy-Authenticate field.  When multiple proxies are used in a chain,
455   the Proxy-Authorization header field is consumed by the first inbound
456   proxy that was expecting to receive credentials.  A proxy MAY relay
457   the credentials from the client request to the next proxy if that is
458   the mechanism by which the proxies cooperatively authenticate a given
459   request.
460
4614.4.  WWW-Authenticate
462
463   The "WWW-Authenticate" header field consists of at least one
464   challenge that indicates the authentication scheme(s) and parameters
465   applicable to the effective request URI (Section 5.5 of [Part1]).
466
467   It MUST be included in 401 (Unauthorized) response messages and MAY
468   be included in other response messages to indicate that supplying
469   credentials (or different credentials) might affect the response.
470
471     WWW-Authenticate = 1#challenge
472
473   User agents are advised to take special care in parsing the field
474   value, as it might contain more than one challenge, and each
475   challenge can contain a comma-separated list of authentication
476   parameters.  Furthermore, the header field itself can occur multiple
477   times.
478
479   For instance:
480
481     WWW-Authenticate: Newauth realm="apps", type=1,
482                       title="Login to \"apps\"", Basic realm="simple"
483
484   This header field contains two challenges; one for the "Newauth"
485   scheme with a realm value of "apps", and two additional parameters
486   "type" and "title", and another one for the "Basic" scheme with a
487   realm value of "simple".
488
489      Note: The challenge grammar production uses the list syntax as
490      well.  Therefore, a sequence of comma, whitespace, and comma can
491      be considered either as applying to the preceding challenge, or to
492      be an empty entry in the list of challenges.  In practice, this
493      ambiguity does not affect the semantics of the header field value
494      and thus is harmless.
495
496
497
498
499
500
501
502
503Fielding & Reschke        Expires May 21, 2014                  [Page 9]
504
505Internet-Draft           HTTP/1.1 Authentication           November 2013
506
507
5085.  IANA Considerations
509
5105.1.  Authentication Scheme Registry
511
512   The HTTP Authentication Scheme Registry defines the name space for
513   the authentication schemes in challenges and credentials.  It will be
514   created and maintained at (the suggested URI)
515   <http://www.iana.org/assignments/http-authschemes>.
516
5175.1.1.  Procedure
518
519   Registrations MUST include the following fields:
520
521   o  Authentication Scheme Name
522
523   o  Pointer to specification text
524
525   o  Notes (optional)
526
527   Values to be added to this name space require IETF Review (see
528   [RFC5226], Section 4.1).
529
5305.1.2.  Considerations for New Authentication Schemes
531
532   There are certain aspects of the HTTP Authentication Framework that
533   put constraints on how new authentication schemes can work:
534
535   o  HTTP authentication is presumed to be stateless: all of the
536      information necessary to authenticate a request MUST be provided
537      in the request, rather than be dependent on the server remembering
538      prior requests.  Authentication based on, or bound to, the
539      underlying connection is outside the scope of this specification
540      and inherently flawed unless steps are taken to ensure that the
541      connection cannot be used by any party other than the
542      authenticated user (see Section 2.3 of [Part1]).
543
544   o  The authentication parameter "realm" is reserved for defining
545      Protection Spaces as defined in Section 2.2.  New schemes MUST NOT
546      use it in a way incompatible with that definition.
547
548   o  The "token68" notation was introduced for compatibility with
549      existing authentication schemes and can only be used once per
550      challenge or credential.  New schemes thus ought to use the "auth-
551      param" syntax instead, because otherwise future extensions will be
552      impossible.
553
554   o  The parsing of challenges and credentials is defined by this
555      specification, and cannot be modified by new authentication
556
557
558
559Fielding & Reschke        Expires May 21, 2014                 [Page 10]
560
561Internet-Draft           HTTP/1.1 Authentication           November 2013
562
563
564      schemes.  When the auth-param syntax is used, all parameters ought
565      to support both token and quoted-string syntax, and syntactical
566      constraints ought to be defined on the field value after parsing
567      (i.e., quoted-string processing).  This is necessary so that
568      recipients can use a generic parser that applies to all
569      authentication schemes.
570
571      Note: The fact that the value syntax for the "realm" parameter is
572      restricted to quoted-string was a bad design choice not to be
573      repeated for new parameters.
574
575   o  Definitions of new schemes ought to define the treatment of
576      unknown extension parameters.  In general, a "must-ignore" rule is
577      preferable over "must-understand", because otherwise it will be
578      hard to introduce new parameters in the presence of legacy
579      recipients.  Furthermore, it's good to describe the policy for
580      defining new parameters (such as "update the specification", or
581      "use this registry").
582
583   o  Authentication schemes need to document whether they are usable in
584      origin-server authentication (i.e., using WWW-Authenticate),
585      and/or proxy authentication (i.e., using Proxy-Authenticate).
586
587   o  The credentials carried in an Authorization header field are
588      specific to the User Agent, and therefore have the same effect on
589      HTTP caches as the "private" Cache-Control response directive
590      (Section 5.2.2.6 of [Part6]), within the scope of the request they
591      appear in.
592
593      Therefore, new authentication schemes that choose not to carry
594      credentials in the Authorization header field (e.g., using a newly
595      defined header field) will need to explicitly disallow caching, by
596      mandating the use of either Cache-Control request directives
597      (e.g., "no-store", Section 5.2.1.5 of [Part6]) or response
598      directives (e.g., "private").
599
6005.2.  Status Code Registration
601
602   The HTTP Status Code Registry located at
603   <http://www.iana.org/assignments/http-status-codes> shall be updated
604   with the registrations below:
605
606
607
608
609
610
611
612
613
614
615Fielding & Reschke        Expires May 21, 2014                 [Page 11]
616
617Internet-Draft           HTTP/1.1 Authentication           November 2013
618
619
620   +-------+-------------------------------+-------------+
621   | Value | Description                   | Reference   |
622   +-------+-------------------------------+-------------+
623   | 401   | Unauthorized                  | Section 3.1 |
624   | 407   | Proxy Authentication Required | Section 3.2 |
625   +-------+-------------------------------+-------------+
626
6275.3.  Header Field Registration
628
629   HTTP header fields are registered within the Message Header Field
630   Registry maintained at <http://www.iana.org/assignments/
631   message-headers/message-header-index.html>.
632
633   This document defines the following HTTP header fields, so their
634   associated registry entries shall be updated according to the
635   permanent registrations below (see [BCP90]):
636
637   +---------------------+----------+----------+-------------+
638   | Header Field Name   | Protocol | Status   | Reference   |
639   +---------------------+----------+----------+-------------+
640   | Authorization       | http     | standard | Section 4.1 |
641   | Proxy-Authenticate  | http     | standard | Section 4.2 |
642   | Proxy-Authorization | http     | standard | Section 4.3 |
643   | WWW-Authenticate    | http     | standard | Section 4.4 |
644   +---------------------+----------+----------+-------------+
645
646   The change controller is: "IETF (iesg@ietf.org) - Internet
647   Engineering Task Force".
648
6496.  Security Considerations
650
651   This section is meant to inform developers, information providers,
652   and users of known security concerns specific to HTTP/1.1
653   authentication.  More general security considerations are addressed
654   in HTTP messaging [Part1] and semantics [Part2].
655
6566.1.  Authentication Credentials and Idle Clients
657
658   Existing HTTP clients and user agents typically retain authentication
659   information indefinitely.  HTTP does not provide a mechanism for the
660   origin server to direct clients to discard these cached credentials,
661   since the protocol has no awareness of how credentials are obtained
662   or managed by the user agent.  The mechanisms for expiring or
663   revoking credentials can be specified as part of an authentication
664   scheme definition.
665
666   Circumstances under which credential caching can interfere with the
667   application's security model include but are not limited to:
668
669
670
671Fielding & Reschke        Expires May 21, 2014                 [Page 12]
672
673Internet-Draft           HTTP/1.1 Authentication           November 2013
674
675
676   o  Clients that have been idle for an extended period, following
677      which the server might wish to cause the client to re-prompt the
678      user for credentials.
679
680   o  Applications that include a session termination indication (such
681      as a "logout" or "commit" button on a page) after which the server
682      side of the application "knows" that there is no further reason
683      for the client to retain the credentials.
684
685   User agents that cache credentials are encouraged to provide a
686   readily accessible mechanism for discarding cached credentials under
687   user control.
688
6896.2.  Protection Spaces
690
691   Authentication schemes that solely rely on the "realm" mechanism for
692   establishing a protection space will expose credentials to all
693   resources on an origin server.  Clients that have successfully made
694   authenticated requests with a resource can use the same
695   authentication credentials for other resources on the same origin
696   server.  This makes it possible for a different resource to harvest
697   authentication credentials for other resources.
698
699   This is of particular concern when an origin server hosts resources
700   for multiple parties under the same canonical root URI (Section 2.2).
701   Possible mitigation strategies include restricting direct access to
702   authentication credentials (i.e., not making the content of the
703   Authorization request header field available), and separating
704   protection spaces by using a different host name (or port number) for
705   each party.
706
7077.  Acknowledgments
708
709   This specification takes over the definition of the HTTP
710   Authentication Framework, previously defined in RFC 2617.  We thank
711   John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D.
712   Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for
713   their work on that specification.  See Section 6 of [RFC2617] for
714   further acknowledgements.
715
716   See Section 10 of [Part1] for the Acknowledgments related to this
717   document revision.
718
7198.  References
720
721
722
723
724
725
726
727Fielding & Reschke        Expires May 21, 2014                 [Page 13]
728
729Internet-Draft           HTTP/1.1 Authentication           November 2013
730
731
7328.1.  Normative References
733
734   [Part1]    Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
735              Protocol (HTTP/1.1): Message Syntax and Routing",
736              draft-ietf-httpbis-p1-messaging-25 (work in progress),
737              November 2013.
738
739   [Part2]    Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
740              Protocol (HTTP/1.1): Semantics and Content",
741              draft-ietf-httpbis-p2-semantics-25 (work in progress),
742              November 2013.
743
744   [Part6]    Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
745              Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching",
746              draft-ietf-httpbis-p6-cache-25 (work in progress),
747              November 2013.
748
749   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
750              Requirement Levels", BCP 14, RFC 2119, March 1997.
751
752   [RFC5234]  Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
753              Specifications: ABNF", STD 68, RFC 5234, January 2008.
754
7558.2.  Informative References
756
757   [BCP90]    Klyne, G., Nottingham, M., and J. Mogul, "Registration
758              Procedures for Message Header Fields", BCP 90, RFC 3864,
759              September 2004.
760
761   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
762              Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
763              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
764
765   [RFC2617]  Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
766              Leach, P., Luotonen, A., and L. Stewart, "HTTP
767              Authentication: Basic and Digest Access Authentication",
768              RFC 2617, June 1999.
769
770   [RFC3986]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
771              Resource Identifier (URI): Generic Syntax", STD 66,
772              RFC 3986, January 2005.
773
774   [RFC4648]  Josefsson, S., "The Base16, Base32, and Base64 Data
775              Encodings", RFC 4648, October 2006.
776
777   [RFC5226]  Narten, T. and H. Alvestrand, "Guidelines for Writing an
778              IANA Considerations Section in RFCs", BCP 26, RFC 5226,
779              May 2008.
780
781
782
783Fielding & Reschke        Expires May 21, 2014                 [Page 14]
784
785Internet-Draft           HTTP/1.1 Authentication           November 2013
786
787
788Appendix A.  Changes from RFCs 2616 and 2617
789
790   The framework for HTTP Authentication is now defined by this
791   document, rather than RFC 2617.
792
793   The "realm" parameter is no longer always required on challenges;
794   consequently, the ABNF allows challenges without any auth parameters.
795   (Section 2)
796
797   The "token68" alternative to auth-param lists has been added for
798   consistency with legacy authentication schemes such as "Basic".
799   (Section 2)
800
801   This specification introduces the Authentication Scheme Registry,
802   along with considerations for new authentication schemes.
803   (Section 5.1)
804
805Appendix B.  Imported ABNF
806
807   The following core rules are included by reference, as defined in
808   Appendix B.1 of [RFC5234]: ALPHA (letters), CR (carriage return),
809   CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double
810   quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any
811   8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII
812   character).
813
814   The rules below are defined in [Part1]:
815
816     BWS           = <BWS, defined in [Part1], Section 3.2.3>
817     OWS           = <OWS, defined in [Part1], Section 3.2.3>
818     quoted-string = <quoted-string, defined in [Part1], Section 3.2.6>
819     token         = <token, defined in [Part1], Section 3.2.6>
820
821Appendix C.  Collected ABNF
822
823   In the collected ABNF below, list rules are expanded as per Section
824   1.2 of [Part1].
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839Fielding & Reschke        Expires May 21, 2014                 [Page 15]
840
841Internet-Draft           HTTP/1.1 Authentication           November 2013
842
843
844   Authorization = credentials
845
846   BWS = <BWS, defined in [Part1], Section 3.2.3>
847
848   OWS = <OWS, defined in [Part1], Section 3.2.3>
849
850   Proxy-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS
851    challenge ] )
852   Proxy-Authorization = credentials
853
854   WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge
855    ] )
856
857   auth-param = token BWS "=" BWS ( token / quoted-string )
858   auth-scheme = token
859
860   challenge = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param ) *(
861    OWS "," [ OWS auth-param ] ) ] ) ]
862   credentials = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param )
863    *( OWS "," [ OWS auth-param ] ) ] ) ]
864
865   quoted-string = <quoted-string, defined in [Part1], Section 3.2.6>
866
867   token = <token, defined in [Part1], Section 3.2.6>
868   token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" )
869    *"="
870
871Appendix D.  Change Log (to be removed by RFC Editor before publication)
872
873   Changes up to the IETF Last Call draft are summarized in <http://
874   trac.tools.ietf.org/html/draft-ietf-httpbis-p7-auth-24#appendix-D>.
875
876D.1.  Since draft-ietf-httpbis-p7-auth-24
877
878   Closed issues:
879
880   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/510>: "SECDIR review
881      of draft-ietf-httpbis-p7-auth-24"
882
883   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/513>: "APPSDIR
884      review of draft-ietf-httpbis-p7-auth-24"
885
886   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/516>: "note about
887      WWW-A parsing potentially misleading"
888
889
890
891
892
893
894
895Fielding & Reschke        Expires May 21, 2014                 [Page 16]
896
897Internet-Draft           HTTP/1.1 Authentication           November 2013
898
899
900Index
901
902   4
903      401 Unauthorized (status code)  7
904      407 Proxy Authentication Required (status code)  7
905
906   A
907      Authorization header field  7
908
909   C
910      Canonical Root URI  6
911
912   G
913      Grammar
914         auth-param  5
915         auth-scheme  5
916         Authorization  8
917         challenge  5
918         credentials  5
919         Proxy-Authenticate  8
920         Proxy-Authorization  8
921         token68  5
922         WWW-Authenticate  9
923
924   P
925      Protection Space  6
926      Proxy-Authenticate header field  8
927      Proxy-Authorization header field  8
928
929   R
930      Realm  6
931
932   W
933      WWW-Authenticate header field  9
934
935Authors' Addresses
936
937   Roy T. Fielding (editor)
938   Adobe Systems Incorporated
939   345 Park Ave
940   San Jose, CA  95110
941   USA
942
943   EMail: fielding@gbiv.com
944   URI:   http://roy.gbiv.com/
945
946
947
948
949
950
951Fielding & Reschke        Expires May 21, 2014                 [Page 17]
952
953Internet-Draft           HTTP/1.1 Authentication           November 2013
954
955
956   Julian F. Reschke (editor)
957   greenbytes GmbH
958   Hafenweg 16
959   Muenster, NW  48155
960   Germany
961
962   EMail: julian.reschke@greenbytes.de
963   URI:   http://greenbytes.de/tech/webdav/
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007Fielding & Reschke        Expires May 21, 2014                 [Page 18]
1008
Note: See TracBrowser for help on using the repository browser.