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

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

bump up document dates, update to latest version of rfc2629.xslt

  • Property svn:eol-style set to native
File size: 47.2 KB
[29]1<?xml version="1.0" encoding="utf-8"?>
[101]2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
[8]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>">
[29]14  <!ENTITY ID-VERSION "latest">
[1321]15  <!ENTITY ID-MONTH "July">
[1099]16  <!ENTITY ID-YEAR "2011">
[1101]17  <!ENTITY mdash "&#8212;">
[424]18  <!ENTITY notation                     "<xref target='Part1' x:rel='#notation' xmlns:x=''/>">
[205]19  <!ENTITY notation-abnf                "<xref target='Part1' x:rel='#notation.abnf' xmlns:x=''/>">
20  <!ENTITY basic-rules                  "<xref target='Part1' x:rel='#basic.rules' xmlns:x=''/>">
[961]21  <!ENTITY effective-request-uri        "<xref target='Part1' x:rel='#effective.request.uri' xmlns:x=''/>">
[998]22  <!ENTITY end-to-end.and-hop-by-hop    "<xref target='Part1' x:rel='#end-to-end.and.hop-by-hop.header-fields' xmlns:x=''/>">
[31]23  <!ENTITY shared-and-non-shared-caches "<xref target='Part6' x:rel='#shared.and.non-shared.caches' xmlns:x=''/>">
25<?rfc toc="yes" ?>
[29]26<?rfc symrefs="yes" ?>
27<?rfc sortrefs="yes" ?>
[8]28<?rfc compact="yes"?>
29<?rfc subcompact="no" ?>
30<?rfc linkmailto="no" ?>
31<?rfc editing="no" ?>
[205]32<?rfc comments="yes"?>
33<?rfc inline="yes"?>
[799]34<?rfc rfcedstyle="yes"?>
[8]35<?rfc-ext allow-markup-in-artwork="yes" ?>
36<?rfc-ext include-references-in-index="yes" ?>
[308]37<rfc obsoletes="2616" updates="2617" category="std" x:maturity-level="draft"
[446]38     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p7-auth-&ID-VERSION;"
[153]39     xmlns:x=''>
[120]42  <title abbrev="HTTP/1.1, Part 7">HTTP/1.1, part 7: Authentication</title>
[29]44  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]45    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[8]46    <address>
47      <postal>
[1106]48        <street>345 Park Ave</street>
49        <city>San Jose</city>
[8]50        <region>CA</region>
[1106]51        <code>95110</code>
[29]52        <country>USA</country>
[8]53      </postal>
[29]54      <email></email>
55      <uri></uri>
[8]56    </address>
57  </author>
[29]59  <author initials="J." surname="Gettys" fullname="Jim Gettys">
[844]60    <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
[8]61    <address>
62      <postal>
[29]63        <street>21 Oak Knoll Road</street>
64        <city>Carlisle</city>
[8]65        <region>MA</region>
[29]66        <code>01741</code>
67        <country>USA</country>
[8]68      </postal>
[844]69      <email></email>
70      <uri></uri>
[8]71    </address>
72  </author>
74  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
[29]75    <organization abbrev="HP">Hewlett-Packard Company</organization>
[8]76    <address>
77      <postal>
[29]78        <street>HP Labs, Large Scale Systems Group</street>
79        <street>1501 Page Mill Road, MS 1177</street>
[8]80        <city>Palo Alto</city>
81        <region>CA</region>
[29]82        <code>94304</code>
83        <country>USA</country>
[8]84      </postal>
[29]85      <email></email>
[8]86    </address>
87  </author>
89  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
[29]90    <organization abbrev="Microsoft">Microsoft Corporation</organization>
[8]91    <address>
92      <postal>
[29]93        <street>1 Microsoft Way</street>
94        <city>Redmond</city>
95        <region>WA</region>
96        <code>98052</code>
97        <country>USA</country>
[8]98      </postal>
[29]99      <email></email>
[8]100    </address>
101  </author>
103  <author initials="L." surname="Masinter" fullname="Larry Masinter">
[1106]104    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[8]105    <address>
106      <postal>
[29]107        <street>345 Park Ave</street>
108        <city>San Jose</city>
[8]109        <region>CA</region>
[29]110        <code>95110</code>
111        <country>USA</country>
[8]112      </postal>
[29]113      <email></email>
114      <uri></uri>
[8]115    </address>
116  </author>
118  <author initials="P." surname="Leach" fullname="Paul J. Leach">
119    <organization abbrev="Microsoft">Microsoft Corporation</organization>
120    <address>
121      <postal>
122        <street>1 Microsoft Way</street>
123        <city>Redmond</city>
124        <region>WA</region>
125        <code>98052</code>
126      </postal>
127      <email></email>
128    </address>
129  </author>
131  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
132    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
133    <address>
134      <postal>
[34]135        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
136        <street>The Stata Center, Building 32</street>
137        <street>32 Vassar Street</street>
[8]138        <city>Cambridge</city>
139        <region>MA</region>
140        <code>02139</code>
[29]141        <country>USA</country>
[8]142      </postal>
143      <email></email>
[34]144      <uri></uri>
[8]145    </address>
146  </author>
[95]148  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
149    <organization abbrev="W3C">World Wide Web Consortium</organization>
150    <address>
151      <postal>
152        <street>W3C / ERCIM</street>
153        <street>2004, rte des Lucioles</street>
154        <city>Sophia-Antipolis</city>
155        <region>AM</region>
156        <code>06902</code>
157        <country>France</country>
158      </postal>
159      <email></email>
160      <uri></uri>
161    </address>
162  </author>
164  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
165    <organization abbrev="greenbytes">greenbytes GmbH</organization>
166    <address>
167      <postal>
168        <street>Hafenweg 16</street>
169        <city>Muenster</city><region>NW</region><code>48155</code>
170        <country>Germany</country>
171      </postal>
[609]172      <phone>+49 251 2807760</phone>
173      <facsimile>+49 251 2807761</facsimile>
174      <email></email>
175      <uri></uri>
[95]176    </address>
177  </author>
[31]179  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
[440]180  <workgroup>HTTPbis Working Group</workgroup>
184   The Hypertext Transfer Protocol (HTTP) is an application-level
185   protocol for distributed, collaborative, hypermedia information
[29]186   systems. HTTP has been in use by the World Wide Web global information
[35]187   initiative since 1990. This document is Part 7 of the seven-part specification
[29]188   that defines the protocol referred to as "HTTP/1.1" and, taken together,
[42]189   obsoletes RFC 2616.  Part 7 defines HTTP Authentication.
193<note title="Editorial Note (To be removed by RFC Editor)">
194  <t>
195    Discussion of this draft should take place on the HTTPBIS working group
[1268]196    mailing list (, which is archived at
197    <eref target=""/>.
198  </t>
199  <t>
200    The current issues list is at
201    <eref target=""/> and related
202    documents (including fancy diffs) can be found at
[324]203    <eref target=""/>.
[36]204  </t>
[153]205  <t>
[1271]206    The changes in this draft are summarized in <xref target="changes.since.14"/>.
[153]207  </t>
211<section title="Introduction" anchor="introduction">
[998]213   This document defines HTTP/1.1 access control and authentication. It
214   includes the relevant parts of <xref target="RFC2616" x:fmt="none">RFC 2616</xref>
215   with only minor changes, plus the general framework for HTTP authentication,
216   as previously defined in "HTTP Authentication: Basic and Digest Access
217   Authentication" (<xref target="RFC2617"/>).
220   HTTP provides several &OPTIONAL; challenge-response authentication
[998]221   mechanisms which can be used by a server to challenge a client request and
222   by a client to provide authentication information. The "basic" and "digest"
223   authentication schemes continue to be specified in
224   <xref target="RFC2617" x:fmt="none">RFC 2617</xref>.
227<section title="Requirements" anchor="intro.requirements">
229   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
230   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
231   document are to be interpreted as described in <xref target="RFC2119"/>.
234   An implementation is not compliant if it fails to satisfy one or more
[847]235   of the "MUST" or "REQUIRED" level requirements for the protocols it
236   implements. An implementation that satisfies all the "MUST" or "REQUIRED"
237   level and all the "SHOULD" level requirements for its protocols is said
238   to be "unconditionally compliant"; one that satisfies all the "MUST"
239   level requirements but not all the "SHOULD" level requirements for its
240   protocols is said to be "conditionally compliant".
[424]244<section title="Syntax Notation" anchor="notation">
[425]245  <x:anchor-alias value="ALPHA"/>
246  <x:anchor-alias value="CR"/>
247  <x:anchor-alias value="DIGIT"/>
248  <x:anchor-alias value="LF"/>
249  <x:anchor-alias value="OCTET"/>
250  <x:anchor-alias value="VCHAR"/>
[998]251  <x:anchor-alias value="SP"/>
[425]252  <x:anchor-alias value="WSP"/>
[543]254  This specification uses the ABNF syntax defined in &notation; (which
255  extends the syntax defined in <xref target="RFC5234"/> with a list rule).
256  <xref target="collected.abnf"/> shows the collected ABNF, with the list
257  rule expanded.
[425]260  The following core rules are included by
261  reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
262  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
263  DIGIT (decimal 0-9), DQUOTE (double quote),
264  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
265  OCTET (any 8-bit sequence of data), SP (space),
266  VCHAR (any visible USASCII character),
267  and WSP (whitespace).
270<section title="Core Rules" anchor="core.rules">
[998]271   <x:anchor-alias value="quoted-string"/>
272   <x:anchor-alias value="token"/>
273   <x:anchor-alias value="OWS"/>
[998]275   The core rules below are defined in &basic-rules;:
277<figure><artwork type="abnf2616">
[998]278  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &basic-rules;&gt;
279  <x:ref>token</x:ref>         = &lt;token, defined in &basic-rules;&gt;
280  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &basic-rules;&gt;
[998]286<section title="Access Authentication Framework" anchor="access.authentication.framework">
287  <x:anchor-alias value="auth-scheme"/>
288  <x:anchor-alias value="auth-param"/>
[229]289  <x:anchor-alias value="challenge"/>
290  <x:anchor-alias value="credentials"/>
[998]292   HTTP provides a simple challenge-response authentication mechanism
293   that can be used by a server to challenge a client request and by a
294   client to provide authentication information. It uses an extensible,
295   case-insensitive token to identify the authentication scheme,
296   followed by a comma-separated list of attribute-value pairs which
297   carry the parameters necessary for achieving authentication via that
298   scheme.
[998]300<figure><artwork type="abnf2616"><iref item="auth-scheme" primary="true"/><iref item="auth-param" primary="true"/>
301  auth-scheme    = token
302  auth-param     = token "=" ( token / quoted-string )
305   The 401 (Unauthorized) response message is used by an origin server
306   to challenge the authorization of a user agent. This response &MUST;
307   include a WWW-Authenticate header field containing at least one
308   challenge applicable to the requested resource. The 407 (Proxy
309   Authentication Required) response message is used by a proxy to
310   challenge the authorization of a client and &MUST; include a Proxy-Authenticate
311   header field containing at least one challenge
312   applicable to the proxy for the requested resource.
314<figure><artwork type="abnf2616"><iref item="challenge" primary="true"/>
315  <x:ref>challenge</x:ref>   = <x:ref>auth-scheme</x:ref> 1*<x:ref>SP</x:ref> 1#<x:ref>auth-param</x:ref>
318  <t>
319   <x:h>Note:</x:h> User agents will need to take special care in parsing the WWW-Authenticate
320   or Proxy-Authenticate header field value if it contains
321   more than one challenge, or if more than one WWW-Authenticate header
322   field is provided, since the contents of a challenge can itself
323   contain a comma-separated list of authentication parameters.
324  </t>
327  <t>
328      <x:h>Note:</x:h> Many browsers fail to parse challenges containing unknown
329      schemes. A workaround for this problem is to list well-supported schemes
330      (such as "basic") first.
331  </t>
334   The authentication parameter realm is defined for all authentication
335   schemes:
337<figure><artwork type="abnf2616"><iref item="realm" primary="true"/><iref item="realm-value" primary="true"/>
338  realm       = "realm" "=" realm-value
339  realm-value = quoted-string
342   The realm directive (case-insensitive) is required for all
343   authentication schemes that issue a challenge. The realm value
[1007]344   (case-sensitive), in combination with the canonical root URI
345   (the scheme and authority components of the effective request URI; see
346   <xref target="Part1" x:fmt="of" x:rel="#effective.request.uri"/>) of the server being accessed, defines the protection space.
[998]347   These realms allow the protected resources on a server to be
348   partitioned into a set of protection spaces, each with its own
349   authentication scheme and/or authorization database. The realm value
350   is a string, generally assigned by the origin server, which can have
351   additional semantics specific to the authentication scheme. Note that
352   there can be multiple challenges with the same auth-scheme but
353   different realms.
356   A user agent that wishes to authenticate itself with an origin
[1101]357   server &mdash; usually, but not necessarily, after receiving a 401
358   (Unauthorized) &mdash; &MAY; do so by including an Authorization header field
[998]359   with the request. A client that wishes to authenticate itself with a
[1101]360   proxy &mdash; usually, but not necessarily, after receiving a 407 (Proxy
361   Authentication Required) &mdash; &MAY; do so by including a Proxy-Authorization
[998]362   header field with the request.  Both the Authorization
363   field value and the Proxy-Authorization field value consist of
364   credentials containing the authentication information of the client
365   for the realm of the resource being requested. The user agent &MUST;
366   choose to use one of the challenges with the strongest auth-scheme it
367   understands and request credentials from the user based upon that
368   challenge.
370<figure><artwork type="abnf2616"><iref item="credentials" primary="true"/>
371  <x:ref>credentials</x:ref> = <x:ref>auth-scheme</x:ref> ( <x:ref>token</x:ref>
372                            / <x:ref>quoted-string</x:ref>
373                            / #<x:ref>auth-param</x:ref> )
376   The protection space determines the domain over which credentials can
377   be automatically applied. If a prior request has been authorized, the
378   same credentials &MAY; be reused for all other requests within that
379   protection space for a period of time determined by the
380   authentication scheme, parameters, and/or user preference. Unless
381   otherwise defined by the authentication scheme, a single protection
382   space cannot extend outside the scope of its server.
385   If the origin server does not wish to accept the credentials sent
386   with a request, it &SHOULD; return a 401 (Unauthorized) response. The
387   response &MUST; include a WWW-Authenticate header field containing at
388   least one (possibly new) challenge applicable to the requested
389   resource. If a proxy does not accept the credentials sent with a
390   request, it &SHOULD; return a 407 (Proxy Authentication Required). The
391   response &MUST; include a Proxy-Authenticate header field containing a
392   (possibly new) challenge applicable to the proxy for the requested
393   resource.
396   The HTTP protocol does not restrict applications to this simple
397   challenge-response mechanism for access authentication. Additional
398   mechanisms &MAY; be used, such as encryption at the transport level or
399   via message encapsulation, and with additional header fields
[1107]400   specifying authentication information. However, such additional
[998]401   mechanisms are not defined by this specification.
[1107]404   Proxies &MUST; forward the WWW-Authenticate and Authorization headers
405   unmodified and follow the rules found in <xref target="header.authorization"/>.
408<section title="Authentication Scheme Registry" anchor="authentication.scheme.registry">
410  The HTTP Authentication Scheme Registry defines the name space for the
411  authentication schemes in challenges and credentials.
414  Registrations &MUST; include the following fields:
415  <list style="symbols">
416    <t>Authentication Scheme Name</t>
417    <t>Pointer to specification text</t>
418  </list>
421  Values to be added to this name space are subject to IETF review
422  (<xref target="RFC5226" x:fmt="," x:sec="4.1"/>).
425  The registry itself is maintained at <eref target=""/>.
[838]431<section title="Status Code Definitions" anchor="status.code.definitions">
[39]432<section title="401 Unauthorized" anchor="status.401">
433  <iref primary="true" item="401 Unauthorized (status code)" x:for-anchor=""/>
434  <iref primary="true" item="Status Codes" subitem="401 Unauthorized" x:for-anchor=""/>
436   The request requires user authentication. The response &MUST; include a
437   WWW-Authenticate header field (<xref target="header.www-authenticate"/>) containing a challenge
[965]438   applicable to the target resource. The client &MAY; repeat the
[39]439   request with a suitable Authorization header field (<xref target="header.authorization"/>). If
440   the request already included Authorization credentials, then the 401
441   response indicates that authorization has been refused for those
442   credentials. If the 401 response contains the same challenge as the
443   prior response, and the user agent has already attempted
444   authentication at least once, then the user &SHOULD; be presented the
[874]445   representation that was given in the response, since that representation might
[998]446   include relevant diagnostic information.
449<section title="407 Proxy Authentication Required" anchor="status.407">
450  <iref primary="true" item="407 Proxy Authentication Required (status code)" x:for-anchor=""/>
451  <iref primary="true" item="Status Codes" subitem="407 Proxy Authentication Required" x:for-anchor=""/>
453   This code is similar to 401 (Unauthorized), but indicates that the
[998]454   client ought to first authenticate itself with the proxy. The proxy &MUST;
[39]455   return a Proxy-Authenticate header field (<xref target="header.proxy-authenticate"/>) containing a
[965]456   challenge applicable to the proxy for the target resource. The
[39]457   client &MAY; repeat the request with a suitable Proxy-Authorization
[998]458   header field (<xref target="header.proxy-authorization"/>).
[8]463<section title="Header Field Definitions" anchor="header.fields">
[117]465   This section defines the syntax and semantics of HTTP/1.1 header fields
466   related to authentication.
469<section title="Authorization" anchor="header.authorization">
[1120]470  <iref primary="true" item="Authorization header field" x:for-anchor=""/>
471  <iref primary="true" item="Header Fields" subitem="Authorization" x:for-anchor=""/>
[229]472  <x:anchor-alias value="Authorization"/>
[1163]474   The "Authorization" header field allows a user agent to authenticate
[1101]475   itself with a server &mdash; usually, but not necessarily, after receiving a 401
[698]476   (Unauthorized) response. Its value consists of credentials containing
477   information of the user agent for the realm of the resource being
478   requested.
[1230]480<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Authorization"/>
481  <x:ref>Authorization</x:ref> = <x:ref>credentials</x:ref>
[998]484   If a request is
[698]485   authenticated and a realm specified, the same credentials &SHOULD;
486   be valid for all other requests within this realm (assuming that
487   the authentication scheme itself does not require otherwise, such
488   as credentials that vary according to a challenge value or using
489   synchronized clocks).
[29]492      When a shared cache (see &shared-and-non-shared-caches;) receives a request
[8]493      containing an Authorization field, it &MUST-NOT; return the
494      corresponding response as a reply to any other request, unless one
495      of the following specific exceptions holds:
498  <list style="numbers">
499      <t>If the response includes the "s-maxage" cache-control
500         directive, the cache &MAY; use that response in replying to a
501         subsequent request. But (if the specified maximum age has
502         passed) a proxy cache &MUST; first revalidate it with the origin
[1163]503         server, using the header fields from the new request to allow
[8]504         the origin server to authenticate the new request. (This is the
505         defined behavior for s-maxage.) If the response includes "s-maxage=0",
506         the proxy &MUST; always revalidate it before re-using
507         it.</t>
509      <t>If the response includes the "must-revalidate" cache-control
510         directive, the cache &MAY; use that response in replying to a
511         subsequent request. But if the response is stale, all caches
512         &MUST; first revalidate it with the origin server, using the
[1163]513         header fields from the new request to allow the origin server
[8]514         to authenticate the new request.</t>
516      <t>If the response includes the "public" cache-control directive,
517         it &MAY; be returned in reply to any subsequent request.</t>
518  </list>
522<section title="Proxy-Authenticate" anchor="header.proxy-authenticate">
[1120]523  <iref primary="true" item="Proxy-Authenticate header field" x:for-anchor=""/>
524  <iref primary="true" item="Header Fields" subitem="Proxy-Authenticate" x:for-anchor=""/>
[229]525  <x:anchor-alias value="Proxy-Authenticate"/>
[1163]527   The "Proxy-Authenticate" header field consists of a challenge that
[698]528   indicates the authentication scheme and parameters applicable to the proxy
[965]529   for this effective request URI (&effective-request-uri;). It &MUST; be included as part
[698]530   of a 407 (Proxy Authentication Required) response.
[1230]532<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Proxy-Authenticate"/>
533  <x:ref>Proxy-Authenticate</x:ref> = 1#<x:ref>challenge</x:ref>
[998]536   Unlike WWW-Authenticate, the Proxy-Authenticate header field applies only to
[8]537   the current connection and &SHOULD-NOT;  be passed on to downstream
538   clients. However, an intermediate proxy might need to obtain its own
539   credentials by requesting them from the downstream client, which in
540   some circumstances will appear as if the proxy is forwarding the
541   Proxy-Authenticate header field.
545<section title="Proxy-Authorization" anchor="header.proxy-authorization">
[1120]546  <iref primary="true" item="Proxy-Authorization header field" x:for-anchor=""/>
547  <iref primary="true" item="Header Fields" subitem="Proxy-Authorization" x:for-anchor=""/>
[229]548  <x:anchor-alias value="Proxy-Authorization"/>
[1163]550   The "Proxy-Authorization" header field allows the client to
[8]551   identify itself (or its user) to a proxy which requires
[698]552   authentication. Its value consists of
[8]553   credentials containing the authentication information of the user
554   agent for the proxy and/or realm of the resource being requested.
[1230]556<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Proxy-Authorization"/>
557  <x:ref>Proxy-Authorization</x:ref> = <x:ref>credentials</x:ref>
[998]560   Unlike Authorization, the Proxy-Authorization header field applies only to
[8]561   the next outbound proxy that demanded authentication using the Proxy-Authenticate
562   field. When multiple proxies are used in a chain, the
563   Proxy-Authorization header field is consumed by the first outbound
564   proxy that was expecting to receive credentials. A proxy &MAY; relay
565   the credentials from the client request to the next proxy if that is
566   the mechanism by which the proxies cooperatively authenticate a given
567   request.
571<section title="WWW-Authenticate" anchor="header.www-authenticate">
[1120]572  <iref primary="true" item="WWW-Authenticate header field" x:for-anchor=""/>
573  <iref primary="true" item="Header Fields" subitem="WWW-Authenticate" x:for-anchor=""/>
[229]574  <x:anchor-alias value="WWW-Authenticate"/>
[1163]576   The "WWW-Authenticate" header field consists of at least one
[698]577   challenge that indicates the authentication scheme(s) and parameters
[965]578   applicable to the effective request URI (&effective-request-uri;). It &MUST; be included in 401
[698]579   (Unauthorized) response messages.
[1230]581<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="WWW-Authenticate"/>
582  <x:ref>WWW-Authenticate</x:ref> = 1#<x:ref>challenge</x:ref>
[998]585   User agents are advised to take special care in parsing the WWW-Authenticate
[8]586   field value as it might contain more than one challenge,
587   or if more than one WWW-Authenticate header field is provided, the
588   contents of a challenge itself can contain a comma-separated list of
589   authentication parameters.
[29]595<section title="IANA Considerations" anchor="IANA.considerations">
[1026]597<section title="Authenticaton Scheme Registry" anchor="authentication.scheme.registration">
599  The registration procedure for HTTP Authentication Schemes is defined by
600  <xref target="authentication.scheme.registry"/> of this document.
603   The HTTP Method Authentication Scheme shall be created at <eref target=""/>.
[700]607<section title="Status Code Registration" anchor="status.code.registration">
609   The HTTP Status Code Registry located at <eref target=""/>
[969]610   shall be updated with the registrations below:
612<?BEGININC p7-auth.iana-status-codes ?>
613<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
614<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
615   <ttcol>Value</ttcol>
616   <ttcol>Description</ttcol>
617   <ttcol>Reference</ttcol>
618   <c>401</c>
619   <c>Unauthorized</c>
620   <c>
621      <xref target="status.401"/>
622   </c>
623   <c>407</c>
624   <c>Proxy Authentication Required</c>
625   <c>
626      <xref target="status.407"/>
627   </c>
630<?ENDINC p7-auth.iana-status-codes ?>
[921]633<section title="Header Field Registration" anchor="header.field.registration">
[969]635   The Message Header Field Registry located at <eref target=""/> shall be updated
[290]636   with the permanent registrations below (see <xref target="RFC3864"/>):
[680]638<?BEGININC p7-auth.iana-headers ?>
[253]639<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
[290]640<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
[253]641   <ttcol>Header Field Name</ttcol>
642   <ttcol>Protocol</ttcol>
643   <ttcol>Status</ttcol>
644   <ttcol>Reference</ttcol>
646   <c>Authorization</c>
647   <c>http</c>
648   <c>standard</c>
649   <c>
650      <xref target="header.authorization"/>
651   </c>
652   <c>Proxy-Authenticate</c>
653   <c>http</c>
654   <c>standard</c>
655   <c>
656      <xref target="header.proxy-authenticate"/>
657   </c>
658   <c>Proxy-Authorization</c>
659   <c>http</c>
660   <c>standard</c>
661   <c>
662      <xref target="header.proxy-authorization"/>
663   </c>
664   <c>WWW-Authenticate</c>
665   <c>http</c>
666   <c>standard</c>
667   <c>
668      <xref target="header.www-authenticate"/>
669   </c>
[680]672<?ENDINC p7-auth.iana-headers ?>
[290]674   The change controller is: "IETF ( - Internet Engineering Task Force".
679<section title="Security Considerations" anchor="security.considerations">
681   This section is meant to inform application developers, information
682   providers, and users of the security limitations in HTTP/1.1 as
683   described by this document. The discussion does not include
684   definitive solutions to the problems revealed, though it does make
685   some suggestions for reducing security risks.
688<section title="Authentication Credentials and Idle Clients" anchor="auth.credentials.and.idle.clients">
690   Existing HTTP clients and user agents typically retain authentication
[145]691   information indefinitely. HTTP/1.1 does not provide a method for a
[8]692   server to direct clients to discard these cached credentials. This is
693   a significant defect that requires further extensions to HTTP.
694   Circumstances under which credential caching can interfere with the
695   application's security model include but are not limited to:
696  <list style="symbols">
697     <t>Clients which have been idle for an extended period following
698        which the server might wish to cause the client to reprompt the
699        user for credentials.</t>
701     <t>Applications which include a session termination indication
[746]702        (such as a "logout" or "commit" button on a page) after which
703        the server side of the application "knows" that there is no
[8]704        further reason for the client to retain the credentials.</t>
705  </list>
708   This is currently under separate study. There are a number of work-arounds
709   to parts of this problem, and we encourage the use of
710   password protection in screen savers, idle time-outs, and other
711   methods which mitigate the security problems inherent in this
712   problem. In particular, user agents which cache credentials are
713   encouraged to provide a readily accessible mechanism for discarding
714   cached credentials under user control.
719<section title="Acknowledgments" anchor="ack">
[998]721  This specification takes over the definition of the HTTP Authentication
722  Framework, previously defined in <xref target="RFC2616" x:fmt="none">RFC 2617</xref>. We thank to John Franks,
723  Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. Lawrence,
724  Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for their work
725  on that specification.
728  <cref anchor="acks">HTTPbis acknowledgements.</cref>
[119]735<references title="Normative References">
[205]737<reference anchor="Part1">
738  <front>
739    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
740    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]741      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[205]742      <address><email></email></address>
743    </author>
744    <author initials="J." surname="Gettys" fullname="Jim Gettys">
[844]745      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
746      <address><email></email></address>
[205]747    </author>
748    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
749      <organization abbrev="HP">Hewlett-Packard Company</organization>
750      <address><email></email></address>
751    </author>
752    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
753      <organization abbrev="Microsoft">Microsoft Corporation</organization>
754      <address><email></email></address>
755    </author>
756    <author initials="L." surname="Masinter" fullname="Larry Masinter">
[1106]757      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[205]758      <address><email></email></address>
759    </author>
760    <author initials="P." surname="Leach" fullname="Paul J. Leach">
761      <organization abbrev="Microsoft">Microsoft Corporation</organization>
762      <address><email></email></address>
763    </author>
764    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
765      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
766      <address><email></email></address>
767    </author>
768    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
769      <organization abbrev="W3C">World Wide Web Consortium</organization>
770      <address><email></email></address>
771    </author>
772    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
773      <organization abbrev="greenbytes">greenbytes GmbH</organization>
774      <address><email></email></address>
775    </author>
776    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
777  </front>
778  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
779  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
[31]782<reference anchor="Part6">
[119]783  <front>
784    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
785    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]786      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]787      <address><email></email></address>
788    </author>
789    <author initials="J." surname="Gettys" fullname="Jim Gettys">
[844]790      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
791      <address><email></email></address>
[119]792    </author>
793    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
794      <organization abbrev="HP">Hewlett-Packard Company</organization>
795      <address><email></email></address>
796    </author>
797    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
798      <organization abbrev="Microsoft">Microsoft Corporation</organization>
799      <address><email></email></address>
800    </author>
801    <author initials="L." surname="Masinter" fullname="Larry Masinter">
[1106]802      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]803      <address><email></email></address>
804    </author>
805    <author initials="P." surname="Leach" fullname="Paul J. Leach">
806      <organization abbrev="Microsoft">Microsoft Corporation</organization>
807      <address><email></email></address>
808    </author>
809    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
810      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
811      <address><email></email></address>
812    </author>
813    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
814      <organization abbrev="W3C">World Wide Web Consortium</organization>
815      <address><email></email></address>
816    </author>
[601]817    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
818      <address><email></email></address>
819    </author>
[119]820    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
821      <organization abbrev="greenbytes">greenbytes GmbH</organization>
822      <address><email></email></address>
823    </author>
824    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
825  </front>
826  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
827  <x:source href="p6-cache.xml" basename="p6-cache"/>
[96]830<reference anchor="RFC2119">
831  <front>
832    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
833    <author initials="S." surname="Bradner" fullname="Scott Bradner">
834      <organization>Harvard University</organization>
835      <address><email></email></address>
836    </author>
837    <date month="March" year="1997"/>
838  </front>
839  <seriesInfo name="BCP" value="14"/>
840  <seriesInfo name="RFC" value="2119"/>
[425]843<reference anchor="RFC5234">
844  <front>
845    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
846    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
847      <organization>Brandenburg InternetWorking</organization>
848      <address>
[728]849        <email></email>
850      </address> 
[425]851    </author>
852    <author initials="P." surname="Overell" fullname="Paul Overell">
853      <organization>THUS plc.</organization>
854      <address>
[728]855        <email></email>
856      </address>
[425]857    </author>
858    <date month="January" year="2008"/>
859  </front>
860  <seriesInfo name="STD" value="68"/>
861  <seriesInfo name="RFC" value="5234"/>
866<references title="Informative References">
868<reference anchor="RFC2616">
869  <front>
870    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
871    <author initials="R." surname="Fielding" fullname="R. Fielding">
872      <organization>University of California, Irvine</organization>
873      <address><email></email></address>
874    </author>
875    <author initials="J." surname="Gettys" fullname="J. Gettys">
876      <organization>W3C</organization>
877      <address><email></email></address>
878    </author>
879    <author initials="J." surname="Mogul" fullname="J. Mogul">
880      <organization>Compaq Computer Corporation</organization>
881      <address><email></email></address>
882    </author>
883    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
884      <organization>MIT Laboratory for Computer Science</organization>
885      <address><email></email></address>
886    </author>
887    <author initials="L." surname="Masinter" fullname="L. Masinter">
888      <organization>Xerox Corporation</organization>
889      <address><email></email></address>
890    </author>
891    <author initials="P." surname="Leach" fullname="P. Leach">
892      <organization>Microsoft Corporation</organization>
893      <address><email></email></address>
894    </author>
895    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
896      <organization>W3C</organization>
897      <address><email></email></address>
898    </author>
899    <date month="June" year="1999"/>
900  </front>
901  <seriesInfo name="RFC" value="2616"/>
[998]904<reference anchor="RFC2617">
905  <front>
906    <title abbrev="HTTP Authentication">HTTP Authentication: Basic and Digest Access Authentication</title>
907    <author initials="J." surname="Franks" fullname="John Franks">
908      <organization>Northwestern University, Department of Mathematics</organization>
909      <address><email></email></address>
910    </author>
911    <author initials="P.M." surname="Hallam-Baker" fullname="Phillip M. Hallam-Baker">
912      <organization>Verisign Inc.</organization>
913      <address><email></email></address>
914    </author>
915    <author initials="J.L." surname="Hostetler" fullname="Jeffery L. Hostetler">
916      <organization>AbiSource, Inc.</organization>
917      <address><email></email></address>
918    </author>
919    <author initials="S.D." surname="Lawrence" fullname="Scott D. Lawrence">
920      <organization>Agranat Systems, Inc.</organization>
921      <address><email></email></address>
922    </author>
923    <author initials="P.J." surname="Leach" fullname="Paul J. Leach">
924      <organization>Microsoft Corporation</organization>
925      <address><email></email></address>
926    </author>
927    <author initials="A." surname="Luotonen" fullname="Ari Luotonen">
928      <organization>Netscape Communications Corporation</organization>
929    </author>
930    <author initials="L." surname="Stewart" fullname="Lawrence C. Stewart">
931      <organization>Open Market, Inc.</organization>
932      <address><email></email></address>
933    </author>
934    <date month="June" year="1999"/>
935  </front>
936  <seriesInfo name="RFC" value="2617"/>
[253]939<reference anchor='RFC3864'>
940  <front>
941    <title>Registration Procedures for Message Header Fields</title>
942    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
943      <organization>Nine by Nine</organization>
944      <address><email></email></address>
945    </author>
946    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
947      <organization>BEA Systems</organization>
948      <address><email></email></address>
949    </author>
950    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
951      <organization>HP Labs</organization>
952      <address><email></email></address>
953    </author>
954    <date year='2004' month='September' />
955  </front>
956  <seriesInfo name='BCP' value='90' />
957  <seriesInfo name='RFC' value='3864' />
[1026]960<reference anchor='RFC5226'>
961  <front>
962    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
963    <author initials='T.' surname='Narten' fullname='T. Narten'>
964      <organization>IBM</organization>
965      <address><email></email></address>
966    </author>
967    <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
968      <organization>Google</organization>
969      <address><email></email></address>
970    </author>
971    <date year='2008' month='May' />
972  </front>
973  <seriesInfo name='BCP' value='26' />
974  <seriesInfo name='RFC' value='5226' />
979<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
981  Change ABNF productions for header fields to only define the field value.
982  (<xref target="header.fields"/>)
[680]986<?BEGININC p7-auth.abnf-appendix ?>
[427]987<section xmlns:x="" title="Collected ABNF" anchor="collected.abnf">
989<artwork type="abnf" name="p7-auth.parsed-abnf">
[1230]990<x:ref>Authorization</x:ref> = credentials
992<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 1.2.2&gt;
[1230]994<x:ref>Proxy-Authenticate</x:ref> = *( "," OWS ) challenge *( OWS "," [ OWS
[425]995 challenge ] )
[1230]996<x:ref>Proxy-Authorization</x:ref> = credentials
[1230]998<x:ref>WWW-Authenticate</x:ref> = *( "," OWS ) challenge *( OWS "," [ OWS challenge
999 ] )
[998]1001<x:ref>auth-param</x:ref> = token "=" ( token / quoted-string )
1002<x:ref>auth-scheme</x:ref> = token
1004<x:ref>challenge</x:ref> = auth-scheme 1*SP *( "," OWS ) auth-param *( OWS "," [ OWS
1005 auth-param ] )
1006<x:ref>credentials</x:ref> = auth-scheme ( token / quoted-string / [ ( "," /
1007 auth-param ) *( OWS "," [ OWS auth-param ] ) ] )
1009<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 1.2.2&gt;
1011realm = "realm=" realm-value
1012realm-value = quoted-string
1014<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 1.2.2&gt;
[532]1017<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
1018; Authorization defined but not used
[425]1019; Proxy-Authenticate defined but not used
1020; Proxy-Authorization defined but not used
1021; WWW-Authenticate defined but not used
[998]1022; realm defined but not used
[680]1024<?ENDINC p7-auth.abnf-appendix ?>
[252]1026<section title="Change Log (to be removed by RFC Editor before publication)"  anchor="change.log">
[1002]1028<section title="Since RFC 2616">
1030  Extracted relevant partitions from <xref target="RFC2616"/>.
1034<section title="Since draft-ietf-httpbis-p7-auth-00">
[152]1036  Closed issues:
1037  <list style="symbols">
[119]1038    <t>
[324]1039      <eref target=""/>:
[152]1040      "Normative and Informative references"
[119]1041    </t>
1042  </list>
[170]1046<section title="Since draft-ietf-httpbis-p7-auth-01">
[324]1048  Ongoing work on ABNF conversion (<eref target=""/>):
[191]1049  <list style="symbols">
1050    <t>
1051      Explicitly import BNF rules for "challenge" and "credentials" from RFC2617.
1052    </t>
[205]1053    <t>
1054      Add explicit references to BNF syntax and rules imported from other parts of the specification.
1055    </t>
[191]1056  </list>
[252]1060<section title="Since draft-ietf-httpbis-p7-auth-02" anchor="changes.since.02">
[994]1062  Ongoing work on IANA Message Header Field Registration (<eref target=""/>):
[253]1063  <list style="symbols">
1064    <t>
[994]1065      Reference RFC 3984, and update header field registrations for header fields defined
[253]1066      in this document.
1067    </t>
1068  </list>
[267]1072<section title="Since draft-ietf-httpbis-p7-auth-03" anchor="changes.since.03">
[323]1077<section title="Since draft-ietf-httpbis-p7-auth-04" anchor="changes.since.04">
[365]1079  Ongoing work on ABNF conversion (<eref target=""/>):
1080  <list style="symbols">
1081    <t>
1082      Use "/" instead of "|" for alternatives.
1083    </t>
1084    <t>
1085      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
1086      whitespace ("OWS") and required whitespace ("RWS").
1087    </t>
1088    <t>
1089      Rewrite ABNFs to spell out whitespace rules, factor out
[994]1090      header field value format definitions.
[365]1091    </t>
1092  </list>
[382]1096<section title="Since draft-ietf-httpbis-p7-auth-05" anchor="changes.since.05">
[543]1098  Final work on ABNF conversion (<eref target=""/>):
[421]1099  <list style="symbols">
1100    <t>
[424]1101      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
[421]1102    </t>
1103  </list>
[547]1107<section title="Since draft-ietf-httpbis-p7-auth-06" anchor="changes.since.06">
[603]1109  None.
[604]1113<section title="Since draft-ietf-httpbis-p7-auth-07" anchor="changes.since.07">
[700]1115  Closed issues:
1116  <list style="symbols">
1117    <t>
1118      <eref target=""/>:
1119      "move IANA registrations for optional status codes"
1120    </t>
1121  </list>
[720]1125<section title="Since draft-ietf-httpbis-p7-auth-08" anchor="changes.since.08">
[765]1127  No significant changes.
[773]1131<section title="Since draft-ietf-httpbis-p7-auth-09" anchor="changes.since.09">
[823]1133  Partly resolved issues:
1134  <list style="symbols">
1135    <t>
1136      <eref target=""/>:
1137      "Term for the requested resource's URI"
1138    </t>
1139  </list>
[841]1143<section title="Since draft-ietf-httpbis-p7-auth-10" anchor="changes.since.10">
1145  None yet.
[973]1149<section title="Since draft-ietf-httpbis-p7-auth-11" anchor="changes.since.11">
[998]1151  Closed issues:
1152  <list style="symbols">
1153    <t>
[1006]1154      <eref target=""/>:
1155      "introduction to part 7 is work-in-progress"
1156    </t>
1157    <t>
[998]1158      <eref target=""/>:
1159      "auth-param syntax"
1160    </t>
1161    <t>
[1165]1162      <eref target=""/>:
1163      "Header Classification"
1164    </t>
1165    <t>
[998]1166      <eref target=""/>:
1167      "absorbing the auth framework from 2617"
1168    </t>
1169  </list>
1172  Partly resolved issues:
1173  <list style="symbols">
1174    <t>
1175      <eref target=""/>:
1176      "should we have an auth scheme registry"
1177    </t>
1178  </list>
[1052]1182<section title="Since draft-ietf-httpbis-p7-auth-12" anchor="changes.since.12">
[1180]1184  None.
1188<section title="Since draft-ietf-httpbis-p7-auth-13" anchor="changes.since.13">
[1230]1190  Closed issues:
1191  <list style="symbols">
1192    <t>
1193      <eref target=""/>:
1194      "untangle ABNFs for header fields"
1195    </t>
1196  </list>
[1271]1200<section title="Since draft-ietf-httpbis-p7-auth-14" anchor="changes.since.14">
1202  None yet.
Note: See TracBrowser for help on using the repository browser.