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

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

add RFC7234-to-be and RFC7235-to-be (#553)

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