source: draft-ietf-httpbis/latest/auth48/p7-auth.unpg.txt @ 2705

Last change on this file since 2705 was 2705, checked in by julian.reschke@…, 6 years ago

use consistent notation when referring to ABNF constructs (#553)

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