source: draft-ietf-httpbis/21/draft-ietf-httpbis-p7-auth-21.xml @ 2211

Last change on this file since 2211 was 1929, checked in by julian.reschke@…, 8 years ago

prepare release of -21 drafts on Oct 4

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 45.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3    This XML document is the output of clean-for-DTD.xslt; a tool that strips
4    extensions to RFC2629(bis) from documents for processing with xml2rfc.
5-->
6<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
7<?rfc toc="yes" ?>
8<?rfc symrefs="yes" ?>
9<?rfc sortrefs="yes" ?>
10<?rfc compact="yes"?>
11<?rfc subcompact="no" ?>
12<?rfc linkmailto="no" ?>
13<?rfc editing="no" ?>
14<?rfc comments="yes"?>
15<?rfc inline="yes"?>
16<?rfc rfcedstyle="yes"?>
17<!DOCTYPE rfc
18  PUBLIC "" "rfc2629.dtd">
19<rfc obsoletes="2616" updates="2617" category="std" ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p7-auth-21">
20
21
22<front>
23
24  <title abbrev="HTTP/1.1 Authentication">Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
25
26  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
27    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
28    <address>
29      <postal>
30        <street>345 Park Ave</street>
31        <city>San Jose</city>
32        <region>CA</region>
33        <code>95110</code>
34        <country>USA</country>
35      </postal>
36      <email>fielding@gbiv.com</email>
37      <uri>http://roy.gbiv.com/</uri>
38    </address>
39  </author>
40
41  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
42    <organization abbrev="greenbytes">greenbytes GmbH</organization>
43    <address>
44      <postal>
45        <street>Hafenweg 16</street>
46        <city>Muenster</city><region>NW</region><code>48155</code>
47        <country>Germany</country>
48      </postal>
49      <email>julian.reschke@greenbytes.de</email>
50      <uri>http://greenbytes.de/tech/webdav/</uri>
51    </address>
52  </author>
53
54  <date month="October" year="2012" day="4"/>
55  <workgroup>HTTPbis Working Group</workgroup>
56
57<abstract>
58<t>
59   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
60   distributed, collaborative, hypermedia information systems. This document
61   defines the HTTP Authentication framework.
62</t>
63</abstract>
64
65<note title="Editorial Note (To be removed by RFC Editor)">
66  <t>
67    Discussion of this draft takes place on the HTTPBIS working group
68    mailing list (ietf-http-wg@w3.org), which is archived at
69    <eref target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
70  </t>
71  <t>
72    The current issues list is at
73    <eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> and related
74    documents (including fancy diffs) can be found at
75    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
76  </t>
77  <t>
78    The changes in this draft are summarized in <xref target="changes.since.20"/>.
79  </t>
80</note>
81</front>
82<middle>
83<section title="Introduction" anchor="introduction">
84<t>
85   This document defines HTTP/1.1 access control and authentication. It
86   includes the relevant parts of RFC 2616
87   with only minor changes (<xref target="RFC2616"/>), plus the general framework for HTTP authentication,
88   as previously defined in "HTTP Authentication: Basic and Digest Access
89   Authentication" (<xref target="RFC2617"/>).
90</t>
91<t>
92   HTTP provides several OPTIONAL challenge-response authentication
93   mechanisms which can be used by a server to challenge a client request and
94   by a client to provide authentication information. The "basic" and "digest"
95   authentication schemes continue to be specified in
96   RFC 2617.
97</t>
98
99<section title="Conformance and Error Handling" anchor="conformance">
100<t>
101   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
102   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
103   document are to be interpreted as described in <xref target="RFC2119"/>.
104</t>
105<t>
106   Conformance criteria and considerations regarding error handling
107   are defined in Section 2.5 of <xref target="Part1"/>.
108</t>
109</section>
110
111<section title="Syntax Notation" anchor="notation">
112<t>
113   This specification uses the Augmented Backus-Naur Form (ABNF) notation
114   of <xref target="RFC5234"/> with the list rule extension defined in
115   Section 1.2 of <xref target="Part1"/>. <xref target="imported.abnf"/> describes rules imported from
116   other documents. <xref target="collected.abnf"/> shows the collected ABNF
117   with the list rule expanded.
118</t>
119</section>
120</section>
121
122<section title="Access Authentication Framework" anchor="access.authentication.framework">
123
124<section title="Challenge and Response" anchor="challenge.and.response">
125 
126 
127 
128 
129 
130<t>
131   HTTP provides a simple challenge-response authentication mechanism
132   that can be used by a server to challenge a client request and by a
133   client to provide authentication information. It uses an extensible,
134   case-insensitive token to identify the authentication scheme, followed
135   by additional information necessary for achieving authentication via that
136   scheme. The latter can either be a comma-separated list of parameters or a
137   single sequence of characters capable of holding base64-encoded
138   information.
139</t>
140<t>
141   Parameters are name-value pairs where the name is matched case-insensitively,
142   and each parameter name MUST only occur once per challenge.
143</t>
144<figure><iref primary="true" item="Grammar" subitem="auth-scheme"/><iref primary="true" item="Grammar" subitem="auth-param"/><iref primary="true" item="Grammar" subitem="token68"/><artwork type="abnf2616"><![CDATA[
145  auth-scheme    = token
146 
147  auth-param     = token BWS "=" BWS ( token / quoted-string )
148
149  token68        = 1*( ALPHA / DIGIT /
150                       "-" / "." / "_" / "~" / "+" / "/" ) *"="
151]]></artwork></figure>
152<t>
153   The "token68" syntax allows the 66 unreserved URI characters (<xref target="RFC3986"/>),
154   plus a few others, so that it can hold a base64, base64url (URL and filename
155   safe alphabet), base32, or base16 (hex) encoding, with or without padding, but
156   excluding whitespace (<xref target="RFC4648"/>).
157</t>
158<t>
159   The <xref target="status.401" format="none">401 (Unauthorized)</xref> response message is used by an origin server
160   to challenge the authorization of a user agent. This response MUST
161   include a <xref target="header.www-authenticate" format="none">WWW-Authenticate</xref> header field containing at least one
162   challenge applicable to the requested resource.
163</t>
164<t>  
165   The <xref target="status.407" format="none">407 (Proxy Authentication Required)</xref> response message is
166   used by a proxy to challenge the authorization of a client and MUST
167   include a <xref target="header.proxy-authenticate" format="none">Proxy-Authenticate</xref> header field containing at least
168   one challenge applicable to the proxy for the requested resource.
169</t>
170<figure><iref primary="true" item="Grammar" subitem="challenge"/><artwork type="abnf2616"><![CDATA[
171  challenge   = auth-scheme [ 1*SP ( token68 / #auth-param ) ]
172]]></artwork></figure>
173<t><list>
174  <t>
175     Note: User agents will need to take special care in parsing the
176     <xref target="header.www-authenticate" format="none">WWW-Authenticate</xref> and <xref target="header.proxy-authenticate" format="none">Proxy-Authenticate</xref>
177     header field values because they can contain more than one challenge, or
178     if more than one of each is provided, since the contents of a challenge
179     can itself contain a comma-separated list of authentication parameters.
180  </t>
181</list></t>
182<t><list>
183  <t>
184     Note: Many clients fail to parse challenges containing unknown
185     schemes. A workaround for this problem is to list well-supported schemes
186     (such as "basic") first.<!-- see http://greenbytes.de/tech/tc/httpauth/#multibasicunknown2 -->
187  </t>
188</list></t>
189<t>
190   A user agent that wishes to authenticate itself with an origin server
191   — usually, but not necessarily, after receiving a <xref target="status.401" format="none">401 (Unauthorized)</xref>
192   — can do so by including an <xref target="header.authorization" format="none">Authorization</xref> header field with the
193   request.
194</t>
195<t>  
196   A client that wishes to authenticate itself with a proxy — usually,
197   but not necessarily, after receiving a <xref target="status.407" format="none">407 (Proxy Authentication Required)</xref>
198   — can do so by including a <xref target="header.proxy-authorization" format="none">Proxy-Authorization</xref> header field with the
199   request.
200</t>
201<t>
202   Both the <xref target="header.authorization" format="none">Authorization</xref> field value and the <xref target="header.proxy-authorization" format="none">Proxy-Authorization</xref> field value
203   contain the client's credentials for the realm of the resource being
204   requested, based upon a challenge received from the server (possibly at
205   some point in the past). When creating their values, the user agent ought to
206   do so by selecting the challenge with what it considers to be the most
207   secure auth-scheme that it understands, obtaining credentials from the user
208   as appropriate.
209</t>
210<figure><iref primary="true" item="Grammar" subitem="credentials"/><artwork type="abnf2616"><![CDATA[
211  credentials = auth-scheme [ 1*SP ( token68 / #auth-param ) ]
212]]></artwork></figure>
213<t>
214   Upon a request for a protected resource that omits credentials, contains
215   invalid credentials (e.g., a bad password) or partial credentials (e.g.,
216   when the authentication scheme requires more than one round trip), an origin
217   server SHOULD return a <xref target="status.401" format="none">401 (Unauthorized)</xref> response. Such
218   responses MUST include a <xref target="header.www-authenticate" format="none">WWW-Authenticate</xref> header field
219   containing at least one (possibly new) challenge applicable to the
220   requested resource.
221</t>
222<t>
223   Likewise, upon a request that requires authentication by proxies that omit
224   credentials or contain invalid or partial credentials, a proxy SHOULD
225   return a <xref target="status.407" format="none">407 (Proxy Authentication Required)</xref> response. Such responses
226   MUST include a <xref target="header.proxy-authenticate" format="none">Proxy-Authenticate</xref> header field containing a (possibly
227   new) challenge applicable to the proxy.
228</t>
229<t>
230   A server receiving credentials that are valid, but not adequate to gain
231   access, ought to respond with the 403 (Forbidden) status code (Section 7.5.3 of <xref target="Part2"/>).
232</t>
233<t>
234   The HTTP protocol does not restrict applications to this simple
235   challenge-response mechanism for access authentication. Additional
236   mechanisms MAY be used, such as encryption at the transport level or
237   via message encapsulation, and with additional header fields
238   specifying authentication information. However, such additional
239   mechanisms are not defined by this specification.
240</t>
241<t>
242   Proxies MUST forward the <xref target="header.www-authenticate" format="none">WWW-Authenticate</xref> and
243   <xref target="header.authorization" format="none">Authorization</xref> header fields unmodified and follow the rules
244   found in <xref target="header.authorization"/>.
245</t>
246</section>
247
248<section title="Protection Space (Realm)" anchor="protection.space">
249  <iref item="Protection Space"/>
250  <iref item="Realm"/>
251  <iref item="Canonical Root URI"/>
252<t>
253   The authentication parameter realm is reserved for use by authentication
254   schemes that wish to indicate the scope of protection.
255</t>
256<t>
257   A protection space is defined by the canonical root URI (the
258   scheme and authority components of the effective request URI; see
259   Section 5.5 of <xref target="Part1"/>) of the
260   server being accessed, in combination with the realm value if present.
261   These realms allow the protected resources on a server to be
262   partitioned into a set of protection spaces, each with its own
263   authentication scheme and/or authorization database. The realm value
264   is a string, generally assigned by the origin server, which can have
265   additional semantics specific to the authentication scheme. Note that
266   there can be multiple challenges with the same auth-scheme but
267   different realms.
268</t>
269<t>
270   The protection space determines the domain over which credentials can
271   be automatically applied. If a prior request has been authorized, the
272   same credentials MAY be reused for all other requests within that
273   protection space for a period of time determined by the
274   authentication scheme, parameters, and/or user preference. Unless
275   otherwise defined by the authentication scheme, a single protection
276   space cannot extend outside the scope of its server.
277</t>
278<t>
279   For historical reasons, senders MUST only use the quoted-string syntax.
280   Recipients might have to support both token and quoted-string syntax for
281   maximum interoperability with existing clients that have been accepting both
282   notations for a long time.
283</t>
284</section>
285
286<section title="Authentication Scheme Registry" anchor="authentication.scheme.registry">
287<t>
288  The HTTP Authentication Scheme Registry defines the name space for the
289  authentication schemes in challenges and credentials.
290</t>
291<t>
292  Registrations MUST include the following fields:
293  <list style="symbols">
294    <t>Authentication Scheme Name</t>
295    <t>Pointer to specification text</t>
296    <t>Notes (optional)</t>
297  </list>
298</t>
299<t>
300  Values to be added to this name space require IETF Review
301  (see <xref target="RFC5226"/>, Section 4.1).
302</t>
303<t>
304  The registry itself is maintained at <eref target="http://www.iana.org/assignments/http-authschemes"/>.
305</t>
306
307<section title="Considerations for New Authentication Schemes" anchor="considerations.for.new.authentication.schemes">
308<t>
309  There are certain aspects of the HTTP Authentication Framework that put
310  constraints on how new authentication schemes can work:
311</t>
312<t>
313  <list style="symbols">
314    <t>
315      HTTP authentication is presumed to be stateless: all of the information
316      necessary to authenticate a request MUST be provided in the request,
317      rather than be dependent on the server remembering prior requests.
318      Authentication based on, or bound to, the underlying connection is
319      outside the scope of this specification and inherently flawed unless
320      steps are taken to ensure that the connection cannot be used by any
321      party other than the authenticated user
322      (see Section 2.3 of <xref target="Part1"/>).
323    </t>
324    <t>
325      The authentication parameter "realm" is reserved for defining Protection
326      Spaces as defined in <xref target="protection.space"/>. New schemes
327      MUST NOT use it in a way incompatible with that definition.
328    </t>
329    <t>
330      The "token68" notation was introduced for compatibility with existing
331      authentication schemes and can only be used once per challenge/credentials.
332      New schemes thus ought to use the "auth-param" syntax instead, because
333      otherwise future extensions will be impossible.
334    </t>
335    <t>
336      The parsing of challenges and credentials is defined by this specification,
337      and cannot be modified by new authentication schemes. When the auth-param
338      syntax is used, all parameters ought to support both token and
339      quoted-string syntax, and syntactical constraints ought to be defined on
340      the field value after parsing (i.e., quoted-string processing). This is
341      necessary so that recipients can use a generic parser that applies to
342      all authentication schemes.
343    <vspace blankLines="1"/>
344      Note: The fact that the value syntax for the "realm" parameter
345      is restricted to quoted-string was a bad design choice not to be repeated
346      for new parameters.
347    </t>
348    <t>
349      Definitions of new schemes ought to define the treatment of unknown
350      extension parameters. In general, a "must-ignore" rule is preferable
351      over "must-understand", because otherwise it will be hard to introduce
352      new parameters in the presence of legacy recipients. Furthermore,
353      it's good to describe the policy for defining new parameters (such
354      as "update the specification", or "use this registry").
355    </t>
356    <t>
357      Authentication schemes need to document whether they are usable in
358      origin-server authentication (i.e., using <xref target="header.www-authenticate" format="none">WWW-Authenticate</xref>),
359      and/or proxy authentication (i.e., using <xref target="header.proxy-authenticate" format="none">Proxy-Authenticate</xref>).
360    </t>
361    <t>
362      The credentials carried in an <xref target="header.authorization" format="none">Authorization</xref> header field are specific to
363      the User Agent, and therefore have the same effect on HTTP caches as the
364      "private" Cache-Control response directive, within the scope of the
365      request they appear in.
366    <vspace blankLines="1"/>
367      Therefore, new authentication schemes which choose not to carry
368      credentials in the <xref target="header.authorization" format="none">Authorization</xref> header field (e.g., using a newly defined
369      header field) will need to explicitly disallow caching, by mandating the use of
370      either Cache-Control request directives (e.g., "no-store") or response
371      directives (e.g., "private").
372    </t>
373  </list>
374</t>
375</section>
376
377</section>
378
379</section>
380
381<section title="Status Code Definitions" anchor="status.code.definitions">
382<section title="401 Unauthorized" anchor="status.401">
383  <iref primary="true" item="401 Unauthorized (status code)"/>
384 
385<t>
386   The request requires user authentication. The response MUST include a
387   <xref target="header.www-authenticate" format="none">WWW-Authenticate</xref> header field (<xref target="header.www-authenticate"/>)
388   containing a challenge applicable to the target resource. The client MAY
389   repeat the request with a suitable <xref target="header.authorization" format="none">Authorization</xref> header field
390   (<xref target="header.authorization"/>). If the request already included
391   Authorization credentials, then the 401 response indicates that authorization
392   has been refused for those credentials. If the 401 response contains the
393   same challenge as the prior response, and the user agent has already attempted
394   authentication at least once, then the user SHOULD be presented the
395   representation that was given in the response, since that representation might
396   include relevant diagnostic information.
397</t>
398</section>
399<section title="407 Proxy Authentication Required" anchor="status.407">
400  <iref primary="true" item="407 Proxy Authentication Required (status code)"/>
401 
402<t>
403   This code is similar to <xref target="status.401" format="none">401 (Unauthorized)</xref>, but indicates that the
404   client ought to first authenticate itself with the proxy. The proxy MUST
405   return a <xref target="header.proxy-authenticate" format="none">Proxy-Authenticate</xref> header field (<xref target="header.proxy-authenticate"/>) containing a
406   challenge applicable to the proxy for the target resource. The
407   client MAY repeat the request with a suitable <xref target="header.proxy-authorization" format="none">Proxy-Authorization</xref>
408   header field (<xref target="header.proxy-authorization"/>).
409</t>
410</section>
411</section>
412
413<section title="Header Field Definitions" anchor="header.field.definitions">
414<t>
415   This section defines the syntax and semantics of HTTP/1.1 header fields
416   related to authentication.
417</t>
418
419<section title="Authorization" anchor="header.authorization">
420  <iref primary="true" item="Authorization header field"/>
421 
422<t>
423   The "Authorization" header field allows a user agent to authenticate
424   itself with a server — usually, but not necessarily, after receiving a <xref target="status.401" format="none">401
425   (Unauthorized)</xref> response. Its value consists of credentials containing
426   information of the user agent for the realm of the resource being
427   requested.
428</t>
429<figure><iref primary="true" item="Grammar" subitem="Authorization"/><artwork type="abnf2616"><![CDATA[
430  Authorization = credentials
431]]></artwork></figure>
432<t>
433   If a request is
434   authenticated and a realm specified, the same credentials SHOULD
435   be valid for all other requests within this realm (assuming that
436   the authentication scheme itself does not require otherwise, such
437   as credentials that vary according to a challenge value or using
438   synchronized clocks).
439</t>
440<t>
441      When a shared cache (see Section 1.2 of <xref target="Part6"/>) receives a request
442      containing an Authorization field, it MUST NOT return the
443      corresponding response as a reply to any other request, unless one
444      of the following specific exceptions holds:
445</t>
446<t>
447  <list style="numbers">
448      <t>If the response includes the "s-maxage" cache-control
449         directive, the cache MAY use that response in replying to a
450         subsequent request. But (if the specified maximum age has
451         passed) a proxy cache MUST first revalidate it with the origin
452         server, using the header fields from the new request to allow
453         the origin server to authenticate the new request. (This is the
454         defined behavior for s-maxage.) If the response includes "s-maxage=0",
455         the proxy MUST always revalidate it before re-using
456         it.</t>
457
458      <t>If the response includes the "must-revalidate" cache-control
459         directive, the cache MAY use that response in replying to a
460         subsequent request. But if the response is stale, all caches
461         MUST first revalidate it with the origin server, using the
462         header fields from the new request to allow the origin server
463         to authenticate the new request.</t>
464
465      <t>If the response includes the "public" cache-control directive,
466         it MAY be returned in reply to any subsequent request.</t>
467  </list>
468</t>
469</section>
470
471<section title="Proxy-Authenticate" anchor="header.proxy-authenticate">
472  <iref primary="true" item="Proxy-Authenticate header field"/>
473 
474<t>
475   The "Proxy-Authenticate" header field consists of at least one
476   challenge that indicates the authentication scheme(s) and parameters
477   applicable to the proxy for this effective request URI (Section 5.5 of <xref target="Part1"/>).
478   It MUST be included as part of a <xref target="status.407" format="none">407 (Proxy Authentication Required)</xref> response.
479</t>
480<figure><iref primary="true" item="Grammar" subitem="Proxy-Authenticate"/><artwork type="abnf2616"><![CDATA[
481  Proxy-Authenticate = 1#challenge
482]]></artwork></figure>
483<t>
484   Unlike <xref target="header.www-authenticate" format="none">WWW-Authenticate</xref>, the Proxy-Authenticate header field
485   applies only to the current connection, and intermediaries SHOULD NOT
486   forward it to downstream clients. However, an intermediate proxy might need
487   to obtain its own credentials by requesting them from the downstream client,
488   which in some circumstances will appear as if the proxy is forwarding the
489   Proxy-Authenticate header field.
490</t>
491<t>
492   Note that the parsing considerations for <xref target="header.www-authenticate" format="none">WWW-Authenticate</xref>
493   apply to this header field as well; see <xref target="header.www-authenticate"/>
494   for details.
495</t>
496</section>
497
498<section title="Proxy-Authorization" anchor="header.proxy-authorization">
499  <iref primary="true" item="Proxy-Authorization header field"/>
500 
501<t>
502   The "Proxy-Authorization" header field allows the client to
503   identify itself (or its user) to a proxy which requires
504   authentication. Its value consists of
505   credentials containing the authentication information of the user
506   agent for the proxy and/or realm of the resource being requested.
507</t>
508<figure><iref primary="true" item="Grammar" subitem="Proxy-Authorization"/><artwork type="abnf2616"><![CDATA[
509  Proxy-Authorization = credentials
510]]></artwork></figure>
511<t>
512   Unlike <xref target="header.authorization" format="none">Authorization</xref>, the Proxy-Authorization header field applies only to
513   the next outbound proxy that demanded authentication using the <xref target="header.proxy-authenticate" format="none">Proxy-Authenticate</xref>
514   field. When multiple proxies are used in a chain, the
515   Proxy-Authorization header field is consumed by the first outbound
516   proxy that was expecting to receive credentials. A proxy MAY relay
517   the credentials from the client request to the next proxy if that is
518   the mechanism by which the proxies cooperatively authenticate a given
519   request.
520</t>
521</section>
522
523<section title="WWW-Authenticate" anchor="header.www-authenticate">
524  <iref primary="true" item="WWW-Authenticate header field"/>
525 
526<t>
527   The "WWW-Authenticate" header field consists of at least one
528   challenge that indicates the authentication scheme(s) and parameters
529   applicable to the effective request URI (Section 5.5 of <xref target="Part1"/>).
530</t>
531<t>  
532   It MUST be included in <xref target="status.401" format="none">401 (Unauthorized)</xref> response messages and MAY be
533   included in other response messages to indicate that supplying credentials
534   (or different credentials) might affect the response.
535</t>
536<figure><iref primary="true" item="Grammar" subitem="WWW-Authenticate"/><artwork type="abnf2616"><![CDATA[
537  WWW-Authenticate = 1#challenge
538]]></artwork></figure>
539<t>
540   User agents are advised to take special care in parsing the WWW-Authenticate
541   field value as it might contain more than one challenge,
542   or if more than one WWW-Authenticate header field is provided, the
543   contents of a challenge itself can contain a comma-separated list of
544   authentication parameters.
545</t>
546<figure>
547  <preamble>For instance:</preamble>
548  <artwork type="example"><![CDATA[
549  WWW-Authenticate: Newauth realm="apps", type=1,
550                    title="Login to \"apps\"", Basic realm="simple"
551]]></artwork>
552  <postamble>
553  This header field contains two challenges; one for the "Newauth" scheme
554  with a realm value of "apps", and two additional parameters "type" and
555  "title", and another one for the "Basic" scheme with a realm value of
556  "simple".
557</postamble></figure>
558<t><list>
559  <t>
560    Note: The challenge grammar production uses the list syntax as
561    well. Therefore, a sequence of comma, whitespace, and comma can be
562    considered both as applying to the preceding challenge, or to be an
563    empty entry in the list of challenges. In practice, this ambiguity
564    does not affect the semantics of the header field value and thus is
565    harmless.
566  </t>
567</list></t>
568</section>
569
570</section>
571
572<section title="IANA Considerations" anchor="IANA.considerations">
573
574<section title="Authentication Scheme Registry" anchor="authentication.scheme.registration">
575<t>
576  The registration procedure for HTTP Authentication Schemes is defined by
577  <xref target="authentication.scheme.registry"/> of this document.
578</t>
579<t>
580   The HTTP Method Authentication Scheme shall be created at <eref target="http://www.iana.org/assignments/http-authschemes"/>.
581</t>
582</section>
583
584<section title="Status Code Registration" anchor="status.code.registration">
585<t>
586   The HTTP Status Code Registry located at <eref target="http://www.iana.org/assignments/http-status-codes"/>
587   shall be updated with the registrations below:
588</t>
589
590<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
591<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
592   <ttcol>Value</ttcol>
593   <ttcol>Description</ttcol>
594   <ttcol>Reference</ttcol>
595   <c>401</c>
596   <c>Unauthorized</c>
597   <c>
598      <xref target="status.401"/>
599   </c>
600   <c>407</c>
601   <c>Proxy Authentication Required</c>
602   <c>
603      <xref target="status.407"/>
604   </c>
605</texttable>
606<!--(END)-->
607
608</section>
609
610<section title="Header Field Registration" anchor="header.field.registration">
611<t>
612   The Message Header Field Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> shall be updated
613   with the permanent registrations below (see <xref target="RFC3864"/>):
614</t>
615
616<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
617<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
618   <ttcol>Header Field Name</ttcol>
619   <ttcol>Protocol</ttcol>
620   <ttcol>Status</ttcol>
621   <ttcol>Reference</ttcol>
622
623   <c>Authorization</c>
624   <c>http</c>
625   <c>standard</c>
626   <c>
627      <xref target="header.authorization"/>
628   </c>
629   <c>Proxy-Authenticate</c>
630   <c>http</c>
631   <c>standard</c>
632   <c>
633      <xref target="header.proxy-authenticate"/>
634   </c>
635   <c>Proxy-Authorization</c>
636   <c>http</c>
637   <c>standard</c>
638   <c>
639      <xref target="header.proxy-authorization"/>
640   </c>
641   <c>WWW-Authenticate</c>
642   <c>http</c>
643   <c>standard</c>
644   <c>
645      <xref target="header.www-authenticate"/>
646   </c>
647</texttable>
648<!--(END)-->
649
650<t>
651   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
652</t>
653</section>
654</section>
655
656<section title="Security Considerations" anchor="security.considerations">
657<t>
658   This section is meant to inform application developers, information
659   providers, and users of the security limitations in HTTP/1.1 as
660   described by this document. The discussion does not include
661   definitive solutions to the problems revealed, though it does make
662   some suggestions for reducing security risks.
663</t>
664
665<section title="Authentication Credentials and Idle Clients" anchor="auth.credentials.and.idle.clients">
666<t>
667   Existing HTTP clients and user agents typically retain authentication
668   information indefinitely. HTTP/1.1 does not provide a method for a
669   server to direct clients to discard these cached credentials. This is
670   a significant defect that requires further extensions to HTTP.
671   Circumstances under which credential caching can interfere with the
672   application's security model include but are not limited to:
673  <list style="symbols">
674     <t>Clients which have been idle for an extended period following
675        which the server might wish to cause the client to reprompt the
676        user for credentials.</t>
677
678     <t>Applications which include a session termination indication
679        (such as a "logout" or "commit" button on a page) after which
680        the server side of the application "knows" that there is no
681        further reason for the client to retain the credentials.</t>
682  </list>
683</t>
684<t>
685   This is currently under separate study. There are a number of work-arounds
686   to parts of this problem, and we encourage the use of
687   password protection in screen savers, idle time-outs, and other
688   methods which mitigate the security problems inherent in this
689   problem. In particular, user agents which cache credentials are
690   encouraged to provide a readily accessible mechanism for discarding
691   cached credentials under user control.
692</t>
693</section>
694
695<section title="Protection Spaces" anchor="protection.spaces">
696<t>
697  Authentication schemes that solely rely on the "realm" mechanism for
698  establishing a protection space will expose credentials to all resources on a
699  server. Clients that have successfully made authenticated requests with a
700  resource can use the same authentication credentials for other resources on
701  the same server. This makes it possible for a different resource to harvest
702  authentication credentials for other resources.
703</t>
704<t>
705  This is of particular concern when a server hosts resources for multiple
706  parties under the same canonical root URI (<xref target="protection.space"/>).
707  Possible mitigation strategies include restricting direct access to
708  authentication credentials (i.e., not making the content of the
709  <xref target="header.authorization" format="none">Authorization</xref> request header field available), and separating protection
710  spaces by using a different host name for each party.
711</t>
712</section>
713</section>
714
715<section title="Acknowledgments" anchor="acks">
716<t>
717  This specification takes over the definition of the HTTP Authentication
718  Framework, previously defined in RFC 2617.
719  We thank John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. Lawrence,
720  Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for their work
721  on that specification. See Section 6 of <xref target="RFC2617"/>
722  for further acknowledgements. 
723</t>
724<t>
725  See Section 9 of <xref target="Part1"/> for the Acknowledgments related to this document revision.
726</t>
727</section>
728</middle>
729
730<back>
731
732<references title="Normative References">
733
734<reference anchor="Part1">
735  <front>
736    <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
737    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
738      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
739      <address><email>fielding@gbiv.com</email></address>
740    </author>
741    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
742      <organization abbrev="greenbytes">greenbytes GmbH</organization>
743      <address><email>julian.reschke@greenbytes.de</email></address>
744    </author>
745    <date month="October" year="2012"/>
746  </front>
747  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-21"/>
748 
749</reference>
750
751<reference anchor="Part2">
752  <front>
753    <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
754    <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
755      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
756      <address><email>fielding@gbiv.com</email></address>
757    </author>
758    <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
759      <organization abbrev="greenbytes">greenbytes GmbH</organization>
760      <address><email>julian.reschke@greenbytes.de</email></address>
761    </author>
762    <date month="October" year="2012"/>
763  </front>
764  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-21"/>
765 
766</reference>
767
768<reference anchor="Part6">
769  <front>
770    <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
771    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
772      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
773      <address><email>fielding@gbiv.com</email></address>
774    </author>
775    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
776      <organization>Akamai</organization>
777      <address><email>mnot@mnot.net</email></address>
778    </author>
779    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
780      <organization abbrev="greenbytes">greenbytes GmbH</organization>
781      <address><email>julian.reschke@greenbytes.de</email></address>
782    </author>
783    <date month="October" year="2012"/>
784  </front>
785  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-21"/>
786 
787</reference>
788
789<reference anchor="RFC2119">
790  <front>
791    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
792    <author initials="S." surname="Bradner" fullname="Scott Bradner">
793      <organization>Harvard University</organization>
794      <address><email>sob@harvard.edu</email></address>
795    </author>
796    <date month="March" year="1997"/>
797  </front>
798  <seriesInfo name="BCP" value="14"/>
799  <seriesInfo name="RFC" value="2119"/>
800</reference>
801
802<reference anchor="RFC5234">
803  <front>
804    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
805    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
806      <organization>Brandenburg InternetWorking</organization>
807      <address>
808        <email>dcrocker@bbiw.net</email>
809      </address> 
810    </author>
811    <author initials="P." surname="Overell" fullname="Paul Overell">
812      <organization>THUS plc.</organization>
813      <address>
814        <email>paul.overell@thus.net</email>
815      </address>
816    </author>
817    <date month="January" year="2008"/>
818  </front>
819  <seriesInfo name="STD" value="68"/>
820  <seriesInfo name="RFC" value="5234"/>
821</reference>
822
823</references>
824
825<references title="Informative References">
826
827<reference anchor="RFC2616">
828  <front>
829    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
830    <author initials="R." surname="Fielding" fullname="R. Fielding">
831      <organization>University of California, Irvine</organization>
832      <address><email>fielding@ics.uci.edu</email></address>
833    </author>
834    <author initials="J." surname="Gettys" fullname="J. Gettys">
835      <organization>W3C</organization>
836      <address><email>jg@w3.org</email></address>
837    </author>
838    <author initials="J." surname="Mogul" fullname="J. Mogul">
839      <organization>Compaq Computer Corporation</organization>
840      <address><email>mogul@wrl.dec.com</email></address>
841    </author>
842    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
843      <organization>MIT Laboratory for Computer Science</organization>
844      <address><email>frystyk@w3.org</email></address>
845    </author>
846    <author initials="L." surname="Masinter" fullname="L. Masinter">
847      <organization>Xerox Corporation</organization>
848      <address><email>masinter@parc.xerox.com</email></address>
849    </author>
850    <author initials="P." surname="Leach" fullname="P. Leach">
851      <organization>Microsoft Corporation</organization>
852      <address><email>paulle@microsoft.com</email></address>
853    </author>
854    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
855      <organization>W3C</organization>
856      <address><email>timbl@w3.org</email></address>
857    </author>
858    <date month="June" year="1999"/>
859  </front>
860  <seriesInfo name="RFC" value="2616"/>
861</reference>
862
863<reference anchor="RFC2617">
864  <front>
865    <title abbrev="HTTP Authentication">HTTP Authentication: Basic and Digest Access Authentication</title>
866    <author initials="J." surname="Franks" fullname="John Franks">
867      <organization>Northwestern University, Department of Mathematics</organization>
868      <address><email>john@math.nwu.edu</email></address>
869    </author>
870    <author initials="P.M." surname="Hallam-Baker" fullname="Phillip M. Hallam-Baker">
871      <organization>Verisign Inc.</organization>
872      <address><email>pbaker@verisign.com</email></address>
873    </author>
874    <author initials="J.L." surname="Hostetler" fullname="Jeffery L. Hostetler">
875      <organization>AbiSource, Inc.</organization>
876      <address><email>jeff@AbiSource.com</email></address>
877    </author>
878    <author initials="S.D." surname="Lawrence" fullname="Scott D. Lawrence">
879      <organization>Agranat Systems, Inc.</organization>
880      <address><email>lawrence@agranat.com</email></address>
881    </author>
882    <author initials="P.J." surname="Leach" fullname="Paul J. Leach">
883      <organization>Microsoft Corporation</organization>
884      <address><email>paulle@microsoft.com</email></address>
885    </author>
886    <author initials="A." surname="Luotonen" fullname="Ari Luotonen">
887      <organization>Netscape Communications Corporation</organization>
888    </author>
889    <author initials="L." surname="Stewart" fullname="Lawrence C. Stewart">
890      <organization>Open Market, Inc.</organization>
891      <address><email>stewart@OpenMarket.com</email></address>
892    </author>
893    <date month="June" year="1999"/>
894  </front>
895  <seriesInfo name="RFC" value="2617"/>
896</reference>
897
898<reference anchor="RFC3864">
899  <front>
900    <title>Registration Procedures for Message Header Fields</title>
901    <author initials="G." surname="Klyne" fullname="G. Klyne">
902      <organization>Nine by Nine</organization>
903      <address><email>GK-IETF@ninebynine.org</email></address>
904    </author>
905    <author initials="M." surname="Nottingham" fullname="M. Nottingham">
906      <organization>BEA Systems</organization>
907      <address><email>mnot@pobox.com</email></address>
908    </author>
909    <author initials="J." surname="Mogul" fullname="J. Mogul">
910      <organization>HP Labs</organization>
911      <address><email>JeffMogul@acm.org</email></address>
912    </author>
913    <date year="2004" month="September"/>
914  </front>
915  <seriesInfo name="BCP" value="90"/>
916  <seriesInfo name="RFC" value="3864"/>
917</reference>
918
919<reference anchor="RFC3986">
920 <front>
921  <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
922  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
923    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
924    <address>
925       <email>timbl@w3.org</email>
926       <uri>http://www.w3.org/People/Berners-Lee/</uri>
927    </address>
928  </author>
929  <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
930    <organization abbrev="Day Software">Day Software</organization>
931    <address>
932      <email>fielding@gbiv.com</email>
933      <uri>http://roy.gbiv.com/</uri>
934    </address>
935  </author>
936  <author initials="L." surname="Masinter" fullname="Larry Masinter">
937    <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
938    <address>
939      <email>LMM@acm.org</email>
940      <uri>http://larry.masinter.net/</uri>
941    </address>
942  </author>
943  <date month="January" year="2005"/>
944 </front>
945 <seriesInfo name="STD" value="66"/>
946 <seriesInfo name="RFC" value="3986"/>
947</reference>
948
949<reference anchor="RFC4648">
950  <front>
951    <title>The Base16, Base32, and Base64 Data Encodings</title>
952    <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
953    <date year="2006" month="October"/>
954  </front>
955  <seriesInfo value="4648" name="RFC"/>
956</reference>
957
958<reference anchor="RFC5226">
959  <front>
960    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
961    <author initials="T." surname="Narten" fullname="T. Narten">
962      <organization>IBM</organization>
963      <address><email>narten@us.ibm.com</email></address>
964    </author>
965    <author initials="H." surname="Alvestrand" fullname="H. Alvestrand">
966      <organization>Google</organization>
967      <address><email>Harald@Alvestrand.no</email></address>
968    </author>
969    <date year="2008" month="May"/>
970  </front>
971  <seriesInfo name="BCP" value="26"/>
972  <seriesInfo name="RFC" value="5226"/>
973</reference>
974
975</references>
976
977<section title="Changes from RFCs 2616 and 2617" anchor="changes.from.rfc.2616">
978<t>
979  The "realm" parameter isn't required anymore in general; consequently, the
980  ABNF allows challenges without any auth parameters.
981  (<xref target="access.authentication.framework"/>)
982</t>
983<t>
984  The "token68" alternative to auth-param lists has been added for consistency
985  with legacy authentication schemes such as "Basic".
986  (<xref target="access.authentication.framework"/>)
987</t>
988<t>
989  Introduce Authentication Scheme Registry.
990  (<xref target="authentication.scheme.registry"/>)
991</t>
992</section>
993 
994<section title="Imported ABNF" anchor="imported.abnf">
995 
996 
997 
998 
999 
1000 
1001 
1002 
1003 
1004 
1005 
1006<t>
1007  The following core rules are included by
1008  reference, as defined in Appendix B.1 of <xref target="RFC5234"/>:
1009  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
1010  DIGIT (decimal 0-9), DQUOTE (double quote),
1011  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
1012  OCTET (any 8-bit sequence of data), SP (space), and
1013  VCHAR (any visible US-ASCII character).
1014</t>
1015<t>
1016   The rules below are defined in <xref target="Part1"/>:
1017</t>
1018<figure><artwork type="abnf2616"><![CDATA[
1019  BWS           = <BWS, defined in [Part1], Section 3.2.1>
1020  OWS           = <OWS, defined in [Part1], Section 3.2.1>
1021  quoted-string = <quoted-string, defined in [Part1], Section 3.2.4>
1022  token         = <token, defined in [Part1], Section 3.2.4>
1023]]></artwork></figure>
1024</section>
1025
1026
1027<section title="Collected ABNF" anchor="collected.abnf">
1028<figure>
1029<artwork type="abnf" name="p7-auth.parsed-abnf"><![CDATA[
1030Authorization = credentials
1031
1032BWS = <BWS, defined in [Part1], Section 3.2.1>
1033
1034OWS = <OWS, defined in [Part1], Section 3.2.1>
1035
1036Proxy-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS
1037 challenge ] )
1038Proxy-Authorization = credentials
1039
1040WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge
1041 ] )
1042
1043auth-param = token BWS "=" BWS ( token / quoted-string )
1044auth-scheme = token
1045
1046challenge = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param ) *(
1047 OWS "," [ OWS auth-param ] ) ] ) ]
1048credentials = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param )
1049 *( OWS "," [ OWS auth-param ] ) ] ) ]
1050
1051quoted-string = <quoted-string, defined in [Part1], Section 3.2.4>
1052
1053token = <token, defined in [Part1], Section 3.2.4>
1054token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" )
1055 *"="
1056]]></artwork>
1057</figure>
1058</section>
1059
1060
1061<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
1062<t>
1063  Changes up to the first Working Group Last Call draft are summarized
1064  in <eref target="http://trac.tools.ietf.org/html/draft-ietf-httpbis-p7-auth-19#appendix-C"/>.
1065</t>
1066
1067<section title="Since draft-ietf-httpbis-p7-auth-19" anchor="changes.since.19">
1068<t>
1069  Closed issues:
1070  <list style="symbols">
1071    <t>
1072      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/348"/>:
1073      "Realms and scope"
1074    </t>
1075    <t>
1076      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/349"/>:
1077      "Strength"
1078    </t>
1079    <t>
1080      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/357"/>:
1081      "Authentication exchanges"
1082    </t>
1083    <t>
1084      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/361"/>:
1085      "ABNF requirements for recipients"
1086    </t>
1087    <t>
1088      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/368"/>:
1089      "note introduction of new IANA registries as normative changes"
1090    </t>
1091  </list>
1092</t>
1093</section>
1094
1095<section title="Since draft-ietf-httpbis-p7-auth-20" anchor="changes.since.20">
1096<t>
1097  Closed issues:
1098  <list style="symbols">
1099    <t>
1100      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/376"/>:
1101      "rename b64token for clarity"
1102    </t>
1103  </list>
1104</t>
1105<t>
1106  Other changes:
1107  <list style="symbols">
1108    <t>
1109      Conformance criteria and considerations regarding error handling are
1110      now defined in Part 1.
1111    </t>
1112  </list>
1113</t>
1114</section>
1115</section>
1116
1117</back>
1118</rfc>
Note: See TracBrowser for help on using the repository browser.