source: draft-ietf-httpbis/latest/auth48/rfc7235-to-be.xml @ 2706

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

updated AUTH48 version of RFC7235 (#553)

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