source: draft-ietf-httpbis/latest/p7-auth.xml @ 98

Last change on this file since 98 was 97, checked in by julian.reschke@…, 15 years ago

Cleanup references after switch to symbolic references (removing duplicated RFC numbers), clean up some of the references XML code.

  • Property svn:eol-style set to native
File size: 25.8 KB
1<?xml version="1.0" encoding="utf-8"?>
2<!DOCTYPE rfc [
3  <!ENTITY MAY "<bcp14 xmlns=''>MAY</bcp14>">
4  <!ENTITY MUST "<bcp14 xmlns=''>MUST</bcp14>">
5  <!ENTITY MUST-NOT "<bcp14 xmlns=''>MUST NOT</bcp14>">
6  <!ENTITY OPTIONAL "<bcp14 xmlns=''>OPTIONAL</bcp14>">
7  <!ENTITY RECOMMENDED "<bcp14 xmlns=''>RECOMMENDED</bcp14>">
8  <!ENTITY REQUIRED "<bcp14 xmlns=''>REQUIRED</bcp14>">
9  <!ENTITY SHALL "<bcp14 xmlns=''>SHALL</bcp14>">
10  <!ENTITY SHALL-NOT "<bcp14 xmlns=''>SHALL NOT</bcp14>">
11  <!ENTITY SHOULD "<bcp14 xmlns=''>SHOULD</bcp14>">
12  <!ENTITY SHOULD-NOT "<bcp14 xmlns=''>SHOULD NOT</bcp14>">
13  <!ENTITY ID-VERSION "latest">
14  <!ENTITY ID-MONTH "December">
15  <!ENTITY ID-YEAR "2007">
16  <!ENTITY shared-and-non-shared-caches "<xref target='Part6' x:rel='#shared.and.non-shared.caches' xmlns:x=''/>">
18<?rfc toc="yes" ?>
19<?rfc symrefs="yes" ?>
20<?rfc sortrefs="yes" ?>
21<?rfc compact="yes"?>
22<?rfc subcompact="no" ?>
23<?rfc linkmailto="no" ?>
24<?rfc editing="no" ?>
25<?rfc-ext allow-markup-in-artwork="yes" ?>
26<?rfc-ext include-references-in-index="yes" ?>
27<rfc obsoletes="2068, 2616" updates="2617" category="std"
28     ipr="full3978" docName="draft-ietf-httpbis-p7-auth-&ID-VERSION;"
29     xmlns:x='' xmlns:ed="">
32  <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
34  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
35    <organization abbrev="Day Software">Day Software</organization>
36    <address>
37      <postal>
38        <street>23 Corporate Plaza DR, Suite 280</street>
39        <city>Newport Beach</city>
40        <region>CA</region>
41        <code>92660</code>
42        <country>USA</country>
43      </postal>
44      <phone>+1-949-706-5300</phone>
45      <facsimile>+1-949-706-5305</facsimile>
46      <email></email>
47      <uri></uri>
48    </address>
49  </author>
51  <author initials="J." surname="Gettys" fullname="Jim Gettys">
52    <organization>One Laptop per Child</organization>
53    <address>
54      <postal>
55        <street>21 Oak Knoll Road</street>
56        <city>Carlisle</city>
57        <region>MA</region>
58        <code>01741</code>
59        <country>USA</country>
60      </postal>
61      <email></email>
62      <uri></uri>
63    </address>
64  </author>
66  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
67    <organization abbrev="HP">Hewlett-Packard Company</organization>
68    <address>
69      <postal>
70        <street>HP Labs, Large Scale Systems Group</street>
71        <street>1501 Page Mill Road, MS 1177</street>
72        <city>Palo Alto</city>
73        <region>CA</region>
74        <code>94304</code>
75        <country>USA</country>
76      </postal>
77      <email></email>
78    </address>
79  </author>
81  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
82    <organization abbrev="Microsoft">Microsoft Corporation</organization>
83    <address>
84      <postal>
85        <street>1 Microsoft Way</street>
86        <city>Redmond</city>
87        <region>WA</region>
88        <code>98052</code>
89        <country>USA</country>
90      </postal>
91      <email></email>
92    </address>
93  </author>
95  <author initials="L." surname="Masinter" fullname="Larry Masinter">
96    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
97    <address>
98      <postal>
99        <street>345 Park Ave</street>
100        <city>San Jose</city>
101        <region>CA</region>
102        <code>95110</code>
103        <country>USA</country>
104      </postal>
105      <email></email>
106      <uri></uri>
107    </address>
108  </author>
110  <author initials="P." surname="Leach" fullname="Paul J. Leach">
111    <organization abbrev="Microsoft">Microsoft Corporation</organization>
112    <address>
113      <postal>
114        <street>1 Microsoft Way</street>
115        <city>Redmond</city>
116        <region>WA</region>
117        <code>98052</code>
118      </postal>
119      <email></email>
120    </address>
121  </author>
123  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
124    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
125    <address>
126      <postal>
127        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
128        <street>The Stata Center, Building 32</street>
129        <street>32 Vassar Street</street>
130        <city>Cambridge</city>
131        <region>MA</region>
132        <code>02139</code>
133        <country>USA</country>
134      </postal>
135      <email></email>
136      <uri></uri>
137    </address>
138  </author>
140  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
141    <organization abbrev="W3C">World Wide Web Consortium</organization>
142    <address>
143      <postal>
144        <street>W3C / ERCIM</street>
145        <street>2004, rte des Lucioles</street>
146        <city>Sophia-Antipolis</city>
147        <region>AM</region>
148        <code>06902</code>
149        <country>France</country>
150      </postal>
151      <email></email>
152      <uri></uri>
153    </address>
154  </author>
156  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
157    <organization abbrev="greenbytes">greenbytes GmbH</organization>
158    <address>
159      <postal>
160        <street>Hafenweg 16</street>
161        <city>Muenster</city><region>NW</region><code>48155</code>
162        <country>Germany</country>
163      </postal>
164      <phone>+49 251 2807760</phone>   
165      <facsimile>+49 251 2807761</facsimile>   
166      <email></email>       
167      <uri></uri>     
168    </address>
169  </author>
171  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
175   The Hypertext Transfer Protocol (HTTP) is an application-level
176   protocol for distributed, collaborative, hypermedia information
177   systems. HTTP has been in use by the World Wide Web global information
178   initiative since 1990. This document is Part 7 of the seven-part specification
179   that defines the protocol referred to as "HTTP/1.1" and, taken together,
180   obsoletes RFC 2616.  Part 7 defines HTTP Authentication.
184<note title="Editorial Note (To be removed by RFC Editor)">
185  <t>
186    This version of the HTTP specification contains only minimal editorial
187    changes from <xref target="RFC2616"/> (abstract, introductory paragraph,
188    and authors' addresses).  All other changes are due to partitioning the
189    original into seven mostly independent parts.  The intent is for readers
190    of future drafts to able to use draft 00 as the basis for comparison
191    when the WG makes later changes to the specification text.  This draft
192    will shortly be followed by draft 01 (containing the first round of changes
193    that have already been agreed to on the mailing list). There is no point in
194    reviewing this draft other than to verify that the partitioning has been
195    done correctly.  Roy T. Fielding, Yves Lafon, and Julian Reschke
196    will be the editors after draft 00 is submitted.
197  </t>
198  <t>
199    Discussion of this draft should take place on the HTTPBIS working group
200    mailing list ( The current issues list is
201    at <eref target=""/>
202    and related documents (including fancy diffs) can be found at
203    <eref target=""/>.
204  </t>
208<section title="Introduction" anchor="introduction">
210   This document will define aspects of HTTP related to access control and
211   authentication. Right now it only includes the extracted relevant sections
212   of <xref target="RFC2616" x:fmt="none">RFC 2616</xref> with only minor edits.
215   HTTP provides several &OPTIONAL; challenge-response authentication
216   mechanisms which can be used by a server to challenge a client
217   request and by a client to provide authentication information. The
218   general framework for access authentication, and the specification of
219   "basic" and "digest" authentication, are specified in "HTTP
220   Authentication: Basic and Digest Access Authentication" <xref target="RFC2617"/>. This
221   specification adopts the definitions of "challenge" and "credentials"
222   from that specification.
225<section title="Requirements" anchor="intro.requirements">
227   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
228   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
229   document are to be interpreted as described in <xref target="RFC2119"/>.
232   An implementation is not compliant if it fails to satisfy one or more
233   of the &MUST; or &REQUIRED; level requirements for the protocols it
234   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
235   level and all the &SHOULD; level requirements for its protocols is said
236   to be "unconditionally compliant"; one that satisfies all the &MUST;
237   level requirements but not all the &SHOULD; level requirements for its
238   protocols is said to be "conditionally compliant."
243<section title="Status Code Definitions">
244<section title="401 Unauthorized" anchor="status.401">
245  <iref primary="true" item="401 Unauthorized (status code)" x:for-anchor=""/>
246  <iref primary="true" item="Status Codes" subitem="401 Unauthorized" x:for-anchor=""/>
248   The request requires user authentication. The response &MUST; include a
249   WWW-Authenticate header field (<xref target="header.www-authenticate"/>) containing a challenge
250   applicable to the requested resource. The client &MAY; repeat the
251   request with a suitable Authorization header field (<xref target="header.authorization"/>). If
252   the request already included Authorization credentials, then the 401
253   response indicates that authorization has been refused for those
254   credentials. If the 401 response contains the same challenge as the
255   prior response, and the user agent has already attempted
256   authentication at least once, then the user &SHOULD; be presented the
257   entity that was given in the response, since that entity might
258   include relevant diagnostic information. HTTP access authentication
259   is explained in "HTTP Authentication: Basic and Digest Access
260   Authentication" <xref target="RFC2617"/>.
263<section title="407 Proxy Authentication Required" anchor="status.407">
264  <iref primary="true" item="407 Proxy Authentication Required (status code)" x:for-anchor=""/>
265  <iref primary="true" item="Status Codes" subitem="407 Proxy Authentication Required" x:for-anchor=""/>
267   This code is similar to 401 (Unauthorized), but indicates that the
268   client must first authenticate itself with the proxy. The proxy &MUST;
269   return a Proxy-Authenticate header field (<xref target="header.proxy-authenticate"/>) containing a
270   challenge applicable to the proxy for the requested resource. The
271   client &MAY; repeat the request with a suitable Proxy-Authorization
272   header field (<xref target="header.proxy-authorization"/>). HTTP access authentication is explained
273   in "HTTP Authentication: Basic and Digest Access Authentication"
274   <xref target="RFC2617"/>.
279<section title="Header Field Definitions" anchor="header.fields">
281   This section defines the syntax and semantics of all standard
282   HTTP/1.1 header fields. For entity-header fields, both sender and
283   recipient refer to either the client or the server, depending on who
284   sends and who receives the entity.
287<section title="Authorization" anchor="header.authorization">
288  <iref primary="true" item="Authorization header" x:for-anchor=""/>
289  <iref primary="true" item="Headers" subitem="Authorization" x:for-anchor=""/>
291      A user agent that wishes to authenticate itself with a server--
292      usually, but not necessarily, after receiving a 401 response--does
293      so by including an Authorization request-header field with the
294      request.  The Authorization field value consists of credentials
295      containing the authentication information of the user agent for
296      the realm of the resource being requested.
298<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Authorization"/>
299       Authorization  = "Authorization" ":" credentials
302      HTTP access authentication is described in "HTTP Authentication:
303      Basic and Digest Access Authentication" <xref target="RFC2617"/>. If a request is
304      authenticated and a realm specified, the same credentials &SHOULD;
305      be valid for all other requests within this realm (assuming that
306      the authentication scheme itself does not require otherwise, such
307      as credentials that vary according to a challenge value or using
308      synchronized clocks).
311      When a shared cache (see &shared-and-non-shared-caches;) receives a request
312      containing an Authorization field, it &MUST-NOT; return the
313      corresponding response as a reply to any other request, unless one
314      of the following specific exceptions holds:
317  <list style="numbers">
318      <t>If the response includes the "s-maxage" cache-control
319         directive, the cache &MAY; use that response in replying to a
320         subsequent request. But (if the specified maximum age has
321         passed) a proxy cache &MUST; first revalidate it with the origin
322         server, using the request-headers from the new request to allow
323         the origin server to authenticate the new request. (This is the
324         defined behavior for s-maxage.) If the response includes "s-maxage=0",
325         the proxy &MUST; always revalidate it before re-using
326         it.</t>
328      <t>If the response includes the "must-revalidate" cache-control
329         directive, the cache &MAY; use that response in replying to a
330         subsequent request. But if the response is stale, all caches
331         &MUST; first revalidate it with the origin server, using the
332         request-headers from the new request to allow the origin server
333         to authenticate the new request.</t>
335      <t>If the response includes the "public" cache-control directive,
336         it &MAY; be returned in reply to any subsequent request.</t>
337  </list>
341<section title="Proxy-Authenticate" anchor="header.proxy-authenticate">
342  <iref primary="true" item="Proxy-Authenticate header" x:for-anchor=""/>
343  <iref primary="true" item="Headers" subitem="Proxy-Authenticate" x:for-anchor=""/>
345   The Proxy-Authenticate response-header field &MUST; be included as part
346   of a 407 (Proxy Authentication Required) response. The field value
347   consists of a challenge that indicates the authentication scheme and
348   parameters applicable to the proxy for this Request-URI.
350<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Proxy-Authenticate"/>
351    Proxy-Authenticate  = "Proxy-Authenticate" ":" 1#challenge
354   The HTTP access authentication process is described in "HTTP
355   Authentication: Basic and Digest Access Authentication" <xref target="RFC2617"/>. Unlike
356   WWW-Authenticate, the Proxy-Authenticate header field applies only to
357   the current connection and &SHOULD-NOT;  be passed on to downstream
358   clients. However, an intermediate proxy might need to obtain its own
359   credentials by requesting them from the downstream client, which in
360   some circumstances will appear as if the proxy is forwarding the
361   Proxy-Authenticate header field.
365<section title="Proxy-Authorization" anchor="header.proxy-authorization">
366  <iref primary="true" item="Proxy-Authorization header" x:for-anchor=""/>
367  <iref primary="true" item="Headers" subitem="Proxy-Authorization" x:for-anchor=""/>
369   The Proxy-Authorization request-header field allows the client to
370   identify itself (or its user) to a proxy which requires
371   authentication. The Proxy-Authorization field value consists of
372   credentials containing the authentication information of the user
373   agent for the proxy and/or realm of the resource being requested.
375<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Proxy-Authorization"/>
376    Proxy-Authorization     = "Proxy-Authorization" ":" credentials
379   The HTTP access authentication process is described in "HTTP
380   Authentication: Basic and Digest Access Authentication" <xref target="RFC2617"/>. Unlike
381   Authorization, the Proxy-Authorization header field applies only to
382   the next outbound proxy that demanded authentication using the Proxy-Authenticate
383   field. When multiple proxies are used in a chain, the
384   Proxy-Authorization header field is consumed by the first outbound
385   proxy that was expecting to receive credentials. A proxy &MAY; relay
386   the credentials from the client request to the next proxy if that is
387   the mechanism by which the proxies cooperatively authenticate a given
388   request.
392<section title="WWW-Authenticate" anchor="header.www-authenticate">
393  <iref primary="true" item="WWW-Authenticate header" x:for-anchor=""/>
394  <iref primary="true" item="Headers" subitem="WWW-Authenticate" x:for-anchor=""/>
396   The WWW-Authenticate response-header field &MUST; be included in 401
397   (Unauthorized) response messages. The field value consists of at
398   least one challenge that indicates the authentication scheme(s) and
399   parameters applicable to the Request-URI.
401<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="WWW-Authenticate"/>
402    WWW-Authenticate  = "WWW-Authenticate" ":" 1#challenge
405   The HTTP access authentication process is described in "HTTP
406   Authentication: Basic and Digest Access Authentication" <xref target="RFC2617"/>. User
407   agents are advised to take special care in parsing the WWW-Authenticate
408   field value as it might contain more than one challenge,
409   or if more than one WWW-Authenticate header field is provided, the
410   contents of a challenge itself can contain a comma-separated list of
411   authentication parameters.
417<section title="IANA Considerations" anchor="IANA.considerations">
419   TBD.
423<section title="Security Considerations" anchor="security.considerations">
425   This section is meant to inform application developers, information
426   providers, and users of the security limitations in HTTP/1.1 as
427   described by this document. The discussion does not include
428   definitive solutions to the problems revealed, though it does make
429   some suggestions for reducing security risks.
432<section title="Authentication Credentials and Idle Clients" anchor="auth.credentials.and.idle.clients">
434   Existing HTTP clients and user agents typically retain authentication
435   information indefinitely. HTTP/1.1. does not provide a method for a
436   server to direct clients to discard these cached credentials. This is
437   a significant defect that requires further extensions to HTTP.
438   Circumstances under which credential caching can interfere with the
439   application's security model include but are not limited to:
440  <list style="symbols">
441     <t>Clients which have been idle for an extended period following
442        which the server might wish to cause the client to reprompt the
443        user for credentials.</t>
445     <t>Applications which include a session termination indication
446        (such as a `logout' or `commit' button on a page) after which
447        the server side of the application `knows' that there is no
448        further reason for the client to retain the credentials.</t>
449  </list>
452   This is currently under separate study. There are a number of work-arounds
453   to parts of this problem, and we encourage the use of
454   password protection in screen savers, idle time-outs, and other
455   methods which mitigate the security problems inherent in this
456   problem. In particular, user agents which cache credentials are
457   encouraged to provide a readily accessible mechanism for discarding
458   cached credentials under user control.
463<section title="Acknowledgments" anchor="ack">
469<reference anchor="Part6">
470   <front>
471      <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
472      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
473         <organization abbrev="Day Software">Day Software</organization>
474         <address><email></email></address>
475      </author>
476      <author initials="J." surname="Gettys" fullname="Jim Gettys">
477         <organization>One Laptop per Child</organization>
478         <address><email></email></address>
479      </author>
480      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
481         <organization abbrev="HP">Hewlett-Packard Company</organization>
482         <address><email></email></address>
483      </author>
484      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
485         <organization abbrev="Microsoft">Microsoft Corporation</organization>
486         <address><email></email></address>
487      </author>
488      <author initials="L." surname="Masinter" fullname="Larry Masinter">
489         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
490         <address><email></email></address>
491      </author>
492      <author initials="P." surname="Leach" fullname="Paul J. Leach">
493         <organization abbrev="Microsoft">Microsoft Corporation</organization>
494         <address><email></email></address>
495      </author>
496      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
497         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
498         <address><email></email></address>
499      </author>
500      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
501   </front>
502   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
503   <x:source href="p6-cache.xml" basename="p6-cache"/>
506<reference anchor="RFC2119">
507  <front>
508    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
509    <author initials="S." surname="Bradner" fullname="Scott Bradner">
510      <organization>Harvard University</organization>
511      <address><email></email></address>
512    </author>
513    <date month="March" year="1997"/>
514  </front>
515  <seriesInfo name="BCP" value="14"/>
516  <seriesInfo name="RFC" value="2119"/>
519<reference anchor="RFC2616">
520   <front>
521      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
522      <author initials="R." surname="Fielding" fullname="R. Fielding">
523         <organization>University of California, Irvine</organization>
524         <address><email></email></address>
525      </author>
526      <author initials="J." surname="Gettys" fullname="J. Gettys">
527         <organization>W3C</organization>
528         <address><email></email></address>
529      </author>
530      <author initials="J." surname="Mogul" fullname="J. Mogul">
531         <organization>Compaq Computer Corporation</organization>
532         <address><email></email></address>
533      </author>
534      <author initials="H." surname="Frystyk" fullname="H. Frystyk">
535         <organization>MIT Laboratory for Computer Science</organization>
536         <address><email></email></address>
537      </author>
538      <author initials="L." surname="Masinter" fullname="L. Masinter">
539         <organization>Xerox Corporation</organization>
540         <address><email></email></address>
541      </author>
542      <author initials="P." surname="Leach" fullname="P. Leach">
543         <organization>Microsoft Corporation</organization>
544         <address><email></email></address>
545      </author>
546      <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
547         <organization>W3C</organization>
548         <address><email></email></address>
549      </author>
550      <date month="June" year="1999"/>
551   </front>
552   <seriesInfo name="RFC" value="2616"/>
555<reference anchor="RFC2617">
556   <front>
557      <title abbrev="HTTP Authentication">HTTP Authentication: Basic and Digest Access Authentication</title>
558      <author initials="J." surname="Franks" fullname="John Franks">
559         <organization>Northwestern University, Department of Mathematics</organization>
560         <address><email></email></address>
561      </author>
562      <author initials="P.M." surname="Hallam-Baker" fullname="Phillip M. Hallam-Baker">
563         <organization>Verisign Inc.</organization>
564         <address><email></email></address>
565      </author>
566      <author initials="J.L." surname="Hostetler" fullname="Jeffery L. Hostetler">
567         <organization>AbiSource, Inc.</organization>
568         <address><email></email></address>
569      </author>
570      <author initials="S.D." surname="Lawrence" fullname="Scott D. Lawrence">
571         <organization>Agranat Systems, Inc.</organization>
572         <address><email></email></address>
573      </author>
574      <author initials="P.J." surname="Leach" fullname="Paul J. Leach">
575         <organization>Microsoft Corporation</organization>
576         <address><email></email></address>
577      </author>
578      <author initials="A." surname="Luotonen" fullname="Ari Luotonen">
579         <organization>Netscape Communications Corporation</organization>
580      </author>
581      <author initials="L." surname="Stewart" fullname="Lawrence C. Stewart">
582         <organization>Open Market, Inc.</organization>
583         <address><email></email></address>
584      </author>
585      <date month="June" year="1999"/>
586   </front>
587   <seriesInfo name="RFC" value="2617"/>
Note: See TracBrowser for help on using the repository browser.