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

Last change on this file since 1163 was 1163, checked in by fielding@…, 10 years ago

Remove header field classifications.

Addresses #224 and #104

  • Property svn:eol-style set to native
File size: 47.8 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">
[1145]15  <!ENTITY ID-MONTH "March">
[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
196    mailing list ( The current issues list is
[848]197    at <eref target=""/>
[36]198    and related documents (including fancy diffs) can be found at
[324]199    <eref target=""/>.
[36]200  </t>
[153]201  <t>
[1052]202    The changes in this draft are summarized in <xref target="changes.since.12"/>.
[153]203  </t>
207<section title="Introduction" anchor="introduction">
[998]209   This document defines HTTP/1.1 access control and authentication. It
210   includes the relevant parts of <xref target="RFC2616" x:fmt="none">RFC 2616</xref>
211   with only minor changes, plus the general framework for HTTP authentication,
212   as previously defined in "HTTP Authentication: Basic and Digest Access
213   Authentication" (<xref target="RFC2617"/>).
216   HTTP provides several &OPTIONAL; challenge-response authentication
[998]217   mechanisms which can be used by a server to challenge a client request and
218   by a client to provide authentication information. The "basic" and "digest"
219   authentication schemes continue to be specified in
220   <xref target="RFC2617" x:fmt="none">RFC 2617</xref>.
223<section title="Requirements" anchor="intro.requirements">
225   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
226   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
227   document are to be interpreted as described in <xref target="RFC2119"/>.
230   An implementation is not compliant if it fails to satisfy one or more
[847]231   of the "MUST" or "REQUIRED" level requirements for the protocols it
232   implements. An implementation that satisfies all the "MUST" or "REQUIRED"
233   level and all the "SHOULD" level requirements for its protocols is said
234   to be "unconditionally compliant"; one that satisfies all the "MUST"
235   level requirements but not all the "SHOULD" level requirements for its
236   protocols is said to be "conditionally compliant".
[424]240<section title="Syntax Notation" anchor="notation">
[425]241  <x:anchor-alias value="ALPHA"/>
242  <x:anchor-alias value="CR"/>
243  <x:anchor-alias value="DIGIT"/>
244  <x:anchor-alias value="LF"/>
245  <x:anchor-alias value="OCTET"/>
246  <x:anchor-alias value="VCHAR"/>
[998]247  <x:anchor-alias value="SP"/>
[425]248  <x:anchor-alias value="WSP"/>
[543]250  This specification uses the ABNF syntax defined in &notation; (which
251  extends the syntax defined in <xref target="RFC5234"/> with a list rule).
252  <xref target="collected.abnf"/> shows the collected ABNF, with the list
253  rule expanded.
[425]256  The following core rules are included by
257  reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
258  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
259  DIGIT (decimal 0-9), DQUOTE (double quote),
260  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
261  OCTET (any 8-bit sequence of data), SP (space),
262  VCHAR (any visible USASCII character),
263  and WSP (whitespace).
266<section title="Core Rules" anchor="core.rules">
[998]267   <x:anchor-alias value="quoted-string"/>
268   <x:anchor-alias value="token"/>
269   <x:anchor-alias value="OWS"/>
[998]271   The core rules below are defined in &basic-rules;:
273<figure><artwork type="abnf2616">
[998]274  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &basic-rules;&gt;
275  <x:ref>token</x:ref>         = &lt;token, defined in &basic-rules;&gt;
276  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &basic-rules;&gt;
[998]282<section title="Access Authentication Framework" anchor="access.authentication.framework">
283  <x:anchor-alias value="auth-scheme"/>
284  <x:anchor-alias value="auth-param"/>
[229]285  <x:anchor-alias value="challenge"/>
286  <x:anchor-alias value="credentials"/>
[998]288   HTTP provides a simple challenge-response authentication mechanism
289   that can be used by a server to challenge a client request and by a
290   client to provide authentication information. It uses an extensible,
291   case-insensitive token to identify the authentication scheme,
292   followed by a comma-separated list of attribute-value pairs which
293   carry the parameters necessary for achieving authentication via that
294   scheme.
[998]296<figure><artwork type="abnf2616"><iref item="auth-scheme" primary="true"/><iref item="auth-param" primary="true"/>
297  auth-scheme    = token
298  auth-param     = token "=" ( token / quoted-string )
301   The 401 (Unauthorized) response message is used by an origin server
302   to challenge the authorization of a user agent. This response &MUST;
303   include a WWW-Authenticate header field containing at least one
304   challenge applicable to the requested resource. The 407 (Proxy
305   Authentication Required) response message is used by a proxy to
306   challenge the authorization of a client and &MUST; include a Proxy-Authenticate
307   header field containing at least one challenge
308   applicable to the proxy for the requested resource.
310<figure><artwork type="abnf2616"><iref item="challenge" primary="true"/>
311  <x:ref>challenge</x:ref>   = <x:ref>auth-scheme</x:ref> 1*<x:ref>SP</x:ref> 1#<x:ref>auth-param</x:ref>
314  <t>
315   <x:h>Note:</x:h> User agents will need to take special care in parsing the WWW-Authenticate
316   or Proxy-Authenticate header field value if it contains
317   more than one challenge, or if more than one WWW-Authenticate header
318   field is provided, since the contents of a challenge can itself
319   contain a comma-separated list of authentication parameters.
320  </t>
323  <t>
324      <x:h>Note:</x:h> Many browsers fail to parse challenges containing unknown
325      schemes. A workaround for this problem is to list well-supported schemes
326      (such as "basic") first.
327  </t>
330   The authentication parameter realm is defined for all authentication
331   schemes:
333<figure><artwork type="abnf2616"><iref item="realm" primary="true"/><iref item="realm-value" primary="true"/>
334  realm       = "realm" "=" realm-value
335  realm-value = quoted-string
338   The realm directive (case-insensitive) is required for all
339   authentication schemes that issue a challenge. The realm value
[1007]340   (case-sensitive), in combination with the canonical root URI
341   (the scheme and authority components of the effective request URI; see
342   <xref target="Part1" x:fmt="of" x:rel="#effective.request.uri"/>) of the server being accessed, defines the protection space.
[998]343   These realms allow the protected resources on a server to be
344   partitioned into a set of protection spaces, each with its own
345   authentication scheme and/or authorization database. The realm value
346   is a string, generally assigned by the origin server, which can have
347   additional semantics specific to the authentication scheme. Note that
348   there can be multiple challenges with the same auth-scheme but
349   different realms.
352   A user agent that wishes to authenticate itself with an origin
[1101]353   server &mdash; usually, but not necessarily, after receiving a 401
354   (Unauthorized) &mdash; &MAY; do so by including an Authorization header field
[998]355   with the request. A client that wishes to authenticate itself with a
[1101]356   proxy &mdash; usually, but not necessarily, after receiving a 407 (Proxy
357   Authentication Required) &mdash; &MAY; do so by including a Proxy-Authorization
[998]358   header field with the request.  Both the Authorization
359   field value and the Proxy-Authorization field value consist of
360   credentials containing the authentication information of the client
361   for the realm of the resource being requested. The user agent &MUST;
362   choose to use one of the challenges with the strongest auth-scheme it
363   understands and request credentials from the user based upon that
364   challenge.
366<figure><artwork type="abnf2616"><iref item="credentials" primary="true"/>
367  <x:ref>credentials</x:ref> = <x:ref>auth-scheme</x:ref> ( <x:ref>token</x:ref>
368                            / <x:ref>quoted-string</x:ref>
369                            / #<x:ref>auth-param</x:ref> )
372   The protection space determines the domain over which credentials can
373   be automatically applied. If a prior request has been authorized, the
374   same credentials &MAY; be reused for all other requests within that
375   protection space for a period of time determined by the
376   authentication scheme, parameters, and/or user preference. Unless
377   otherwise defined by the authentication scheme, a single protection
378   space cannot extend outside the scope of its server.
381   If the origin server does not wish to accept the credentials sent
382   with a request, it &SHOULD; return a 401 (Unauthorized) response. The
383   response &MUST; include a WWW-Authenticate header field containing at
384   least one (possibly new) challenge applicable to the requested
385   resource. If a proxy does not accept the credentials sent with a
386   request, it &SHOULD; return a 407 (Proxy Authentication Required). The
387   response &MUST; include a Proxy-Authenticate header field containing a
388   (possibly new) challenge applicable to the proxy for the requested
389   resource.
392   The HTTP protocol does not restrict applications to this simple
393   challenge-response mechanism for access authentication. Additional
394   mechanisms &MAY; be used, such as encryption at the transport level or
395   via message encapsulation, and with additional header fields
[1107]396   specifying authentication information. However, such additional
[998]397   mechanisms are not defined by this specification.
[1107]400   Proxies &MUST; forward the WWW-Authenticate and Authorization headers
401   unmodified and follow the rules found in <xref target="header.authorization"/>.
404<section title="Authentication Scheme Registry" anchor="authentication.scheme.registry">
406  The HTTP Authentication Scheme Registry defines the name space for the
407  authentication schemes in challenges and credentials.
410  Registrations &MUST; include the following fields:
411  <list style="symbols">
412    <t>Authentication Scheme Name</t>
413    <t>Pointer to specification text</t>
414  </list>
417  Values to be added to this name space are subject to IETF review
418  (<xref target="RFC5226" x:fmt="," x:sec="4.1"/>).
421  The registry itself is maintained at <eref target=""/>.
[838]427<section title="Status Code Definitions" anchor="status.code.definitions">
[39]428<section title="401 Unauthorized" anchor="status.401">
429  <iref primary="true" item="401 Unauthorized (status code)" x:for-anchor=""/>
430  <iref primary="true" item="Status Codes" subitem="401 Unauthorized" x:for-anchor=""/>
432   The request requires user authentication. The response &MUST; include a
433   WWW-Authenticate header field (<xref target="header.www-authenticate"/>) containing a challenge
[965]434   applicable to the target resource. The client &MAY; repeat the
[39]435   request with a suitable Authorization header field (<xref target="header.authorization"/>). If
436   the request already included Authorization credentials, then the 401
437   response indicates that authorization has been refused for those
438   credentials. If the 401 response contains the same challenge as the
439   prior response, and the user agent has already attempted
440   authentication at least once, then the user &SHOULD; be presented the
[874]441   representation that was given in the response, since that representation might
[998]442   include relevant diagnostic information.
445<section title="407 Proxy Authentication Required" anchor="status.407">
446  <iref primary="true" item="407 Proxy Authentication Required (status code)" x:for-anchor=""/>
447  <iref primary="true" item="Status Codes" subitem="407 Proxy Authentication Required" x:for-anchor=""/>
449   This code is similar to 401 (Unauthorized), but indicates that the
[998]450   client ought to first authenticate itself with the proxy. The proxy &MUST;
[39]451   return a Proxy-Authenticate header field (<xref target="header.proxy-authenticate"/>) containing a
[965]452   challenge applicable to the proxy for the target resource. The
[39]453   client &MAY; repeat the request with a suitable Proxy-Authorization
[998]454   header field (<xref target="header.proxy-authorization"/>).
[8]459<section title="Header Field Definitions" anchor="header.fields">
[117]461   This section defines the syntax and semantics of HTTP/1.1 header fields
462   related to authentication.
465<section title="Authorization" anchor="header.authorization">
[1120]466  <iref primary="true" item="Authorization header field" x:for-anchor=""/>
467  <iref primary="true" item="Header Fields" subitem="Authorization" x:for-anchor=""/>
[229]468  <x:anchor-alias value="Authorization"/>
[365]469  <x:anchor-alias value="Authorization-v"/>
[1163]471   The "Authorization" header field allows a user agent to authenticate
[1101]472   itself with a server &mdash; usually, but not necessarily, after receiving a 401
[698]473   (Unauthorized) response. Its value consists of credentials containing
474   information of the user agent for the realm of the resource being
475   requested.
[365]477<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Authorization"/><iref primary="true" item="Grammar" subitem="Authorization-v"/>
[366]478  <x:ref>Authorization</x:ref>   = "Authorization" ":" <x:ref>OWS</x:ref> <x:ref>Authorization-v</x:ref>
[365]479  <x:ref>Authorization-v</x:ref> = <x:ref>credentials</x:ref>
[998]482   If a request is
[698]483   authenticated and a realm specified, the same credentials &SHOULD;
484   be valid for all other requests within this realm (assuming that
485   the authentication scheme itself does not require otherwise, such
486   as credentials that vary according to a challenge value or using
487   synchronized clocks).
[29]490      When a shared cache (see &shared-and-non-shared-caches;) receives a request
[8]491      containing an Authorization field, it &MUST-NOT; return the
492      corresponding response as a reply to any other request, unless one
493      of the following specific exceptions holds:
496  <list style="numbers">
497      <t>If the response includes the "s-maxage" cache-control
498         directive, the cache &MAY; use that response in replying to a
499         subsequent request. But (if the specified maximum age has
500         passed) a proxy cache &MUST; first revalidate it with the origin
[1163]501         server, using the header fields from the new request to allow
[8]502         the origin server to authenticate the new request. (This is the
503         defined behavior for s-maxage.) If the response includes "s-maxage=0",
504         the proxy &MUST; always revalidate it before re-using
505         it.</t>
507      <t>If the response includes the "must-revalidate" cache-control
508         directive, the cache &MAY; use that response in replying to a
509         subsequent request. But if the response is stale, all caches
510         &MUST; first revalidate it with the origin server, using the
[1163]511         header fields from the new request to allow the origin server
[8]512         to authenticate the new request.</t>
514      <t>If the response includes the "public" cache-control directive,
515         it &MAY; be returned in reply to any subsequent request.</t>
516  </list>
520<section title="Proxy-Authenticate" anchor="header.proxy-authenticate">
[1120]521  <iref primary="true" item="Proxy-Authenticate header field" x:for-anchor=""/>
522  <iref primary="true" item="Header Fields" subitem="Proxy-Authenticate" x:for-anchor=""/>
[229]523  <x:anchor-alias value="Proxy-Authenticate"/>
[365]524  <x:anchor-alias value="Proxy-Authenticate-v"/>
[1163]526   The "Proxy-Authenticate" header field consists of a challenge that
[698]527   indicates the authentication scheme and parameters applicable to the proxy
[965]528   for this effective request URI (&effective-request-uri;). It &MUST; be included as part
[698]529   of a 407 (Proxy Authentication Required) response.
[365]531<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Proxy-Authenticate"/><iref primary="true" item="Grammar" subitem="Proxy-Authenticate-v"/>
[376]532  <x:ref>Proxy-Authenticate</x:ref>   = "Proxy-Authenticate" ":" <x:ref>OWS</x:ref>
533                         <x:ref>Proxy-Authenticate-v</x:ref>
[365]534  <x:ref>Proxy-Authenticate-v</x:ref> = 1#<x:ref>challenge</x:ref>
[998]537   Unlike WWW-Authenticate, the Proxy-Authenticate header field applies only to
[8]538   the current connection and &SHOULD-NOT;  be passed on to downstream
539   clients. However, an intermediate proxy might need to obtain its own
540   credentials by requesting them from the downstream client, which in
541   some circumstances will appear as if the proxy is forwarding the
542   Proxy-Authenticate header field.
546<section title="Proxy-Authorization" anchor="header.proxy-authorization">
[1120]547  <iref primary="true" item="Proxy-Authorization header field" x:for-anchor=""/>
548  <iref primary="true" item="Header Fields" subitem="Proxy-Authorization" x:for-anchor=""/>
[229]549  <x:anchor-alias value="Proxy-Authorization"/>
[365]550  <x:anchor-alias value="Proxy-Authorization-v"/>
[1163]552   The "Proxy-Authorization" header field allows the client to
[8]553   identify itself (or its user) to a proxy which requires
[698]554   authentication. Its value consists of
[8]555   credentials containing the authentication information of the user
556   agent for the proxy and/or realm of the resource being requested.
[365]558<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Proxy-Authorization"/><iref primary="true" item="Grammar" subitem="Proxy-Authorization-v"/>
[376]559  <x:ref>Proxy-Authorization</x:ref>   = "Proxy-Authorization" ":" <x:ref>OWS</x:ref>
560                          <x:ref>Proxy-Authorization-v</x:ref>
561  <x:ref>Proxy-Authorization-v</x:ref> = <x:ref>credentials</x:ref>
[998]564   Unlike Authorization, the Proxy-Authorization header field applies only to
[8]565   the next outbound proxy that demanded authentication using the Proxy-Authenticate
566   field. When multiple proxies are used in a chain, the
567   Proxy-Authorization header field is consumed by the first outbound
568   proxy that was expecting to receive credentials. A proxy &MAY; relay
569   the credentials from the client request to the next proxy if that is
570   the mechanism by which the proxies cooperatively authenticate a given
571   request.
575<section title="WWW-Authenticate" anchor="header.www-authenticate">
[1120]576  <iref primary="true" item="WWW-Authenticate header field" x:for-anchor=""/>
577  <iref primary="true" item="Header Fields" subitem="WWW-Authenticate" x:for-anchor=""/>
[229]578  <x:anchor-alias value="WWW-Authenticate"/>
[365]579  <x:anchor-alias value="WWW-Authenticate-v"/>
[1163]581   The "WWW-Authenticate" header field consists of at least one
[698]582   challenge that indicates the authentication scheme(s) and parameters
[965]583   applicable to the effective request URI (&effective-request-uri;). It &MUST; be included in 401
[698]584   (Unauthorized) response messages.
[365]586<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="WWW-Authenticate"/><iref primary="true" item="Grammar" subitem="WWW-Authenticate-v"/>
[366]587  <x:ref>WWW-Authenticate</x:ref>   = "WWW-Authenticate" ":" <x:ref>OWS</x:ref> <x:ref>WWW-Authenticate-v</x:ref>
[365]588  <x:ref>WWW-Authenticate-v</x:ref> = 1#<x:ref>challenge</x:ref>
[998]591   User agents are advised to take special care in parsing the WWW-Authenticate
[8]592   field value as it might contain more than one challenge,
593   or if more than one WWW-Authenticate header field is provided, the
594   contents of a challenge itself can contain a comma-separated list of
595   authentication parameters.
[29]601<section title="IANA Considerations" anchor="IANA.considerations">
[1026]603<section title="Authenticaton Scheme Registry" anchor="authentication.scheme.registration">
605  The registration procedure for HTTP Authentication Schemes is defined by
606  <xref target="authentication.scheme.registry"/> of this document.
609   The HTTP Method Authentication Scheme shall be created at <eref target=""/>.
[700]613<section title="Status Code Registration" anchor="status.code.registration">
615   The HTTP Status Code Registry located at <eref target=""/>
[969]616   shall be updated with the registrations below:
618<?BEGININC p7-auth.iana-status-codes ?>
619<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
620<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
621   <ttcol>Value</ttcol>
622   <ttcol>Description</ttcol>
623   <ttcol>Reference</ttcol>
624   <c>401</c>
625   <c>Unauthorized</c>
626   <c>
627      <xref target="status.401"/>
628   </c>
629   <c>407</c>
630   <c>Proxy Authentication Required</c>
631   <c>
632      <xref target="status.407"/>
633   </c>
636<?ENDINC p7-auth.iana-status-codes ?>
[921]639<section title="Header Field Registration" anchor="header.field.registration">
[969]641   The Message Header Field Registry located at <eref target=""/> shall be updated
[290]642   with the permanent registrations below (see <xref target="RFC3864"/>):
[680]644<?BEGININC p7-auth.iana-headers ?>
[253]645<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
[290]646<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
[253]647   <ttcol>Header Field Name</ttcol>
648   <ttcol>Protocol</ttcol>
649   <ttcol>Status</ttcol>
650   <ttcol>Reference</ttcol>
652   <c>Authorization</c>
653   <c>http</c>
654   <c>standard</c>
655   <c>
656      <xref target="header.authorization"/>
657   </c>
658   <c>Proxy-Authenticate</c>
659   <c>http</c>
660   <c>standard</c>
661   <c>
662      <xref target="header.proxy-authenticate"/>
663   </c>
664   <c>Proxy-Authorization</c>
665   <c>http</c>
666   <c>standard</c>
667   <c>
668      <xref target="header.proxy-authorization"/>
669   </c>
670   <c>WWW-Authenticate</c>
671   <c>http</c>
672   <c>standard</c>
673   <c>
674      <xref target="header.www-authenticate"/>
675   </c>
[680]678<?ENDINC p7-auth.iana-headers ?>
[290]680   The change controller is: "IETF ( - Internet Engineering Task Force".
685<section title="Security Considerations" anchor="security.considerations">
687   This section is meant to inform application developers, information
688   providers, and users of the security limitations in HTTP/1.1 as
689   described by this document. The discussion does not include
690   definitive solutions to the problems revealed, though it does make
691   some suggestions for reducing security risks.
694<section title="Authentication Credentials and Idle Clients" anchor="auth.credentials.and.idle.clients">
696   Existing HTTP clients and user agents typically retain authentication
[145]697   information indefinitely. HTTP/1.1 does not provide a method for a
[8]698   server to direct clients to discard these cached credentials. This is
699   a significant defect that requires further extensions to HTTP.
700   Circumstances under which credential caching can interfere with the
701   application's security model include but are not limited to:
702  <list style="symbols">
703     <t>Clients which have been idle for an extended period following
704        which the server might wish to cause the client to reprompt the
705        user for credentials.</t>
707     <t>Applications which include a session termination indication
[746]708        (such as a "logout" or "commit" button on a page) after which
709        the server side of the application "knows" that there is no
[8]710        further reason for the client to retain the credentials.</t>
711  </list>
714   This is currently under separate study. There are a number of work-arounds
715   to parts of this problem, and we encourage the use of
716   password protection in screen savers, idle time-outs, and other
717   methods which mitigate the security problems inherent in this
718   problem. In particular, user agents which cache credentials are
719   encouraged to provide a readily accessible mechanism for discarding
720   cached credentials under user control.
725<section title="Acknowledgments" anchor="ack">
[998]727  This specification takes over the definition of the HTTP Authentication
728  Framework, previously defined in <xref target="RFC2616" x:fmt="none">RFC 2617</xref>. We thank to John Franks,
729  Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. Lawrence,
730  Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for their work
731  on that specification.
734  <cref anchor="acks">HTTPbis acknowledgements.</cref>
[119]741<references title="Normative References">
[205]743<reference anchor="Part1">
744  <front>
745    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
746    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]747      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[205]748      <address><email></email></address>
749    </author>
750    <author initials="J." surname="Gettys" fullname="Jim Gettys">
[844]751      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
752      <address><email></email></address>
[205]753    </author>
754    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
755      <organization abbrev="HP">Hewlett-Packard Company</organization>
756      <address><email></email></address>
757    </author>
758    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
759      <organization abbrev="Microsoft">Microsoft Corporation</organization>
760      <address><email></email></address>
761    </author>
762    <author initials="L." surname="Masinter" fullname="Larry Masinter">
[1106]763      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[205]764      <address><email></email></address>
765    </author>
766    <author initials="P." surname="Leach" fullname="Paul J. Leach">
767      <organization abbrev="Microsoft">Microsoft Corporation</organization>
768      <address><email></email></address>
769    </author>
770    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
771      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
772      <address><email></email></address>
773    </author>
774    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
775      <organization abbrev="W3C">World Wide Web Consortium</organization>
776      <address><email></email></address>
777    </author>
778    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
779      <organization abbrev="greenbytes">greenbytes GmbH</organization>
780      <address><email></email></address>
781    </author>
782    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
783  </front>
784  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
785  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
[31]788<reference anchor="Part6">
[119]789  <front>
790    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
791    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]792      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]793      <address><email></email></address>
794    </author>
795    <author initials="J." surname="Gettys" fullname="Jim Gettys">
[844]796      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
797      <address><email></email></address>
[119]798    </author>
799    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
800      <organization abbrev="HP">Hewlett-Packard Company</organization>
801      <address><email></email></address>
802    </author>
803    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
804      <organization abbrev="Microsoft">Microsoft Corporation</organization>
805      <address><email></email></address>
806    </author>
807    <author initials="L." surname="Masinter" fullname="Larry Masinter">
[1106]808      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]809      <address><email></email></address>
810    </author>
811    <author initials="P." surname="Leach" fullname="Paul J. Leach">
812      <organization abbrev="Microsoft">Microsoft Corporation</organization>
813      <address><email></email></address>
814    </author>
815    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
816      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
817      <address><email></email></address>
818    </author>
819    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
820      <organization abbrev="W3C">World Wide Web Consortium</organization>
821      <address><email></email></address>
822    </author>
[601]823    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
824      <address><email></email></address>
825    </author>
[119]826    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
827      <organization abbrev="greenbytes">greenbytes GmbH</organization>
828      <address><email></email></address>
829    </author>
830    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
831  </front>
832  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
833  <x:source href="p6-cache.xml" basename="p6-cache"/>
[96]836<reference anchor="RFC2119">
837  <front>
838    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
839    <author initials="S." surname="Bradner" fullname="Scott Bradner">
840      <organization>Harvard University</organization>
841      <address><email></email></address>
842    </author>
843    <date month="March" year="1997"/>
844  </front>
845  <seriesInfo name="BCP" value="14"/>
846  <seriesInfo name="RFC" value="2119"/>
[425]849<reference anchor="RFC5234">
850  <front>
851    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
852    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
853      <organization>Brandenburg InternetWorking</organization>
854      <address>
[728]855        <email></email>
856      </address> 
[425]857    </author>
858    <author initials="P." surname="Overell" fullname="Paul Overell">
859      <organization>THUS plc.</organization>
860      <address>
[728]861        <email></email>
862      </address>
[425]863    </author>
864    <date month="January" year="2008"/>
865  </front>
866  <seriesInfo name="STD" value="68"/>
867  <seriesInfo name="RFC" value="5234"/>
872<references title="Informative References">
874<reference anchor="RFC2616">
875  <front>
876    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
877    <author initials="R." surname="Fielding" fullname="R. Fielding">
878      <organization>University of California, Irvine</organization>
879      <address><email></email></address>
880    </author>
881    <author initials="J." surname="Gettys" fullname="J. Gettys">
882      <organization>W3C</organization>
883      <address><email></email></address>
884    </author>
885    <author initials="J." surname="Mogul" fullname="J. Mogul">
886      <organization>Compaq Computer Corporation</organization>
887      <address><email></email></address>
888    </author>
889    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
890      <organization>MIT Laboratory for Computer Science</organization>
891      <address><email></email></address>
892    </author>
893    <author initials="L." surname="Masinter" fullname="L. Masinter">
894      <organization>Xerox Corporation</organization>
895      <address><email></email></address>
896    </author>
897    <author initials="P." surname="Leach" fullname="P. Leach">
898      <organization>Microsoft Corporation</organization>
899      <address><email></email></address>
900    </author>
901    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
902      <organization>W3C</organization>
903      <address><email></email></address>
904    </author>
905    <date month="June" year="1999"/>
906  </front>
907  <seriesInfo name="RFC" value="2616"/>
[998]910<reference anchor="RFC2617">
911  <front>
912    <title abbrev="HTTP Authentication">HTTP Authentication: Basic and Digest Access Authentication</title>
913    <author initials="J." surname="Franks" fullname="John Franks">
914      <organization>Northwestern University, Department of Mathematics</organization>
915      <address><email></email></address>
916    </author>
917    <author initials="P.M." surname="Hallam-Baker" fullname="Phillip M. Hallam-Baker">
918      <organization>Verisign Inc.</organization>
919      <address><email></email></address>
920    </author>
921    <author initials="J.L." surname="Hostetler" fullname="Jeffery L. Hostetler">
922      <organization>AbiSource, Inc.</organization>
923      <address><email></email></address>
924    </author>
925    <author initials="S.D." surname="Lawrence" fullname="Scott D. Lawrence">
926      <organization>Agranat Systems, Inc.</organization>
927      <address><email></email></address>
928    </author>
929    <author initials="P.J." surname="Leach" fullname="Paul J. Leach">
930      <organization>Microsoft Corporation</organization>
931      <address><email></email></address>
932    </author>
933    <author initials="A." surname="Luotonen" fullname="Ari Luotonen">
934      <organization>Netscape Communications Corporation</organization>
935    </author>
936    <author initials="L." surname="Stewart" fullname="Lawrence C. Stewart">
937      <organization>Open Market, Inc.</organization>
938      <address><email></email></address>
939    </author>
940    <date month="June" year="1999"/>
941  </front>
942  <seriesInfo name="RFC" value="2617"/>
[253]945<reference anchor='RFC3864'>
946  <front>
947    <title>Registration Procedures for Message Header Fields</title>
948    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
949      <organization>Nine by Nine</organization>
950      <address><email></email></address>
951    </author>
952    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
953      <organization>BEA Systems</organization>
954      <address><email></email></address>
955    </author>
956    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
957      <organization>HP Labs</organization>
958      <address><email></email></address>
959    </author>
960    <date year='2004' month='September' />
961  </front>
962  <seriesInfo name='BCP' value='90' />
963  <seriesInfo name='RFC' value='3864' />
[1026]966<reference anchor='RFC5226'>
967  <front>
968    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
969    <author initials='T.' surname='Narten' fullname='T. Narten'>
970      <organization>IBM</organization>
971      <address><email></email></address>
972    </author>
973    <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
974      <organization>Google</organization>
975      <address><email></email></address>
976    </author>
977    <date year='2008' month='May' />
978  </front>
979  <seriesInfo name='BCP' value='26' />
980  <seriesInfo name='RFC' value='5226' />
[911]985<!-- re-add this once we have changes
[99]986<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
[911]988 -->
[680]990<?BEGININC p7-auth.abnf-appendix ?>
[427]991<section xmlns:x="" title="Collected ABNF" anchor="collected.abnf">
993<artwork type="abnf" name="p7-auth.parsed-abnf">
994<x:ref>Authorization</x:ref> = "Authorization:" OWS Authorization-v
995<x:ref>Authorization-v</x:ref> = credentials
997<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 1.2.2&gt;
999<x:ref>Proxy-Authenticate</x:ref> = "Proxy-Authenticate:" OWS Proxy-Authenticate-v
1000<x:ref>Proxy-Authenticate-v</x:ref> = *( "," OWS ) challenge *( OWS "," [ OWS
[425]1001 challenge ] )
[427]1002<x:ref>Proxy-Authorization</x:ref> = "Proxy-Authorization:" OWS
[425]1003 Proxy-Authorization-v
[427]1004<x:ref>Proxy-Authorization-v</x:ref> = credentials
1006<x:ref>WWW-Authenticate</x:ref> = "WWW-Authenticate:" OWS WWW-Authenticate-v
1007<x:ref>WWW-Authenticate-v</x:ref> = *( "," OWS ) challenge *( OWS "," [ OWS
[425]1008 challenge ] )
[998]1010<x:ref>auth-param</x:ref> = token "=" ( token / quoted-string )
1011<x:ref>auth-scheme</x:ref> = token
1013<x:ref>challenge</x:ref> = auth-scheme 1*SP *( "," OWS ) auth-param *( OWS "," [ OWS
1014 auth-param ] )
1015<x:ref>credentials</x:ref> = auth-scheme ( token / quoted-string / [ ( "," /
1016 auth-param ) *( OWS "," [ OWS auth-param ] ) ] )
1018<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 1.2.2&gt;
1020realm = "realm=" realm-value
1021realm-value = quoted-string
1023<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 1.2.2&gt;
[532]1026<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
1027; Authorization defined but not used
[425]1028; Proxy-Authenticate defined but not used
1029; Proxy-Authorization defined but not used
1030; WWW-Authenticate defined but not used
[998]1031; realm defined but not used
[680]1033<?ENDINC p7-auth.abnf-appendix ?>
[252]1035<section title="Change Log (to be removed by RFC Editor before publication)"  anchor="change.log">
[1002]1037<section title="Since RFC 2616">
1039  Extracted relevant partitions from <xref target="RFC2616"/>.
1043<section title="Since draft-ietf-httpbis-p7-auth-00">
[152]1045  Closed issues:
1046  <list style="symbols">
[119]1047    <t>
[324]1048      <eref target=""/>:
[152]1049      "Normative and Informative references"
[119]1050    </t>
1051  </list>
[170]1055<section title="Since draft-ietf-httpbis-p7-auth-01">
[324]1057  Ongoing work on ABNF conversion (<eref target=""/>):
[191]1058  <list style="symbols">
1059    <t>
1060      Explicitly import BNF rules for "challenge" and "credentials" from RFC2617.
1061    </t>
[205]1062    <t>
1063      Add explicit references to BNF syntax and rules imported from other parts of the specification.
1064    </t>
[191]1065  </list>
[252]1069<section title="Since draft-ietf-httpbis-p7-auth-02" anchor="changes.since.02">
[994]1071  Ongoing work on IANA Message Header Field Registration (<eref target=""/>):
[253]1072  <list style="symbols">
1073    <t>
[994]1074      Reference RFC 3984, and update header field registrations for header fields defined
[253]1075      in this document.
1076    </t>
1077  </list>
[267]1081<section title="Since draft-ietf-httpbis-p7-auth-03" anchor="changes.since.03">
[323]1086<section title="Since draft-ietf-httpbis-p7-auth-04" anchor="changes.since.04">
[365]1088  Ongoing work on ABNF conversion (<eref target=""/>):
1089  <list style="symbols">
1090    <t>
1091      Use "/" instead of "|" for alternatives.
1092    </t>
1093    <t>
1094      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
1095      whitespace ("OWS") and required whitespace ("RWS").
1096    </t>
1097    <t>
1098      Rewrite ABNFs to spell out whitespace rules, factor out
[994]1099      header field value format definitions.
[365]1100    </t>
1101  </list>
[382]1105<section title="Since draft-ietf-httpbis-p7-auth-05" anchor="changes.since.05">
[543]1107  Final work on ABNF conversion (<eref target=""/>):
[421]1108  <list style="symbols">
1109    <t>
[424]1110      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
[421]1111    </t>
1112  </list>
[547]1116<section title="Since draft-ietf-httpbis-p7-auth-06" anchor="changes.since.06">
[603]1118  None.
[604]1122<section title="Since draft-ietf-httpbis-p7-auth-07" anchor="changes.since.07">
[700]1124  Closed issues:
1125  <list style="symbols">
1126    <t>
1127      <eref target=""/>:
1128      "move IANA registrations for optional status codes"
1129    </t>
1130  </list>
[720]1134<section title="Since draft-ietf-httpbis-p7-auth-08" anchor="changes.since.08">
[765]1136  No significant changes.
[773]1140<section title="Since draft-ietf-httpbis-p7-auth-09" anchor="changes.since.09">
[823]1142  Partly resolved issues:
1143  <list style="symbols">
1144    <t>
1145      <eref target=""/>:
1146      "Term for the requested resource's URI"
1147    </t>
1148  </list>
[841]1152<section title="Since draft-ietf-httpbis-p7-auth-10" anchor="changes.since.10">
1154  None yet.
[973]1158<section title="Since draft-ietf-httpbis-p7-auth-11" anchor="changes.since.11">
[998]1160  Closed issues:
1161  <list style="symbols">
1162    <t>
[1006]1163      <eref target=""/>:
1164      "introduction to part 7 is work-in-progress"
1165    </t>
1166    <t>
[998]1167      <eref target=""/>:
1168      "auth-param syntax"
1169    </t>
1170    <t>
1171      <eref target=""/>:
1172      "absorbing the auth framework from 2617"
1173    </t>
1174  </list>
1177  Partly resolved issues:
1178  <list style="symbols">
1179    <t>
1180      <eref target=""/>:
1181      "should we have an auth scheme registry"
1182    </t>
1183  </list>
[1052]1187<section title="Since draft-ietf-httpbis-p7-auth-12" anchor="changes.since.12">
1189  None yet.
Note: See TracBrowser for help on using the repository browser.