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

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

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