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

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

Use canonical URLs for links to

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