source: draft-ietf-httpbis/23/draft-ietf-httpbis-p7-auth-23.xml

Last change on this file was 2304, checked in by julian.reschke@…, 7 years ago

prepare release of -23

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