source: draft-ietf-httpbis/25/draft-ietf-httpbis-p7-auth-25.xml @ 2656

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

prepare publication of -25 drafts on 2013-11-17

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