source: draft-ietf-httpbis/latest/p7-auth.html @ 1708

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

Work-in-progress: hyperlink status codes definitions (for those defined in parts 4, 5, and 7)

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/html;charset=utf-8
File size: 84.7 KB
Line 
1<!DOCTYPE html
2  PUBLIC "-//W3C//DTD HTML 4.01//EN">
3<html lang="en">
4   <head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
5      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6      <title>HTTP/1.1, part 7: Authentication</title><script>
7var buttonsAdded = false;
8
9function init() {
10  var fb = document.createElement("div");
11  fb.className = "feedback noprint";
12  fb.setAttribute("onclick", "feedback();");
13  fb.appendChild(document.createTextNode("feedback"));
14
15  var bodyl = document.getElementsByTagName("body");
16  bodyl.item(0).appendChild(fb);
17}
18
19function feedback() {
20  toggleButtonsToElementsByName("h1");
21  toggleButtonsToElementsByName("h2");
22  toggleButtonsToElementsByName("h3");
23  toggleButtonsToElementsByName("h4");
24 
25  buttonsAdded = !buttonsAdded;
26}
27
28function toggleButtonsToElementsByName(name) {
29  var list = document.getElementsByTagName(name);
30  for (var i = 0; i < list.length; i++) {
31    toggleButton(list.item(i));
32  }
33}
34
35function toggleButton(node) {
36  if (! buttonsAdded) {
37 
38    // docname
39    var template = "mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&body=<{ref}>:";
40
41    var id = node.getAttribute("id");
42    // better id available?
43    var titlelinks = node.getElementsByTagName("a");
44    for (var i = 0; i < titlelinks.length; i++) {
45      var tl = titlelinks.item(i);
46      if (tl.getAttribute("id")) {
47        id = tl.getAttribute("id");
48      }
49    }
50
51    // ref
52    var ref = window.location.toString();
53    var hash = ref.indexOf("#");
54    if (hash != -1) {
55      ref = ref.substring(0, hash);
56    }
57    if (id != "") {
58      ref += "#" + id;
59    }
60   
61    // docname
62    var docname = "draft-ietf-httpbis-p7-auth-latest";
63
64    // section
65    var section = node.textContent;
66    section = section.replace("\u00a0", " ");
67   
68    // build URI from template
69    var uri = template.replace("{docname}", encodeURIComponent(docname));
70    uri = uri.replace("{section}", encodeURIComponent(section));
71    uri = uri.replace("{ref}", encodeURIComponent(ref));
72 
73    var button = document.createElement("a");
74    button.className = "fbbutton noprint";
75    button.setAttribute("href", uri);
76    button.appendChild(document.createTextNode("send feedback"));
77    node.appendChild(button);
78  }
79  else {
80    var buttons = node.getElementsByTagName("a");
81    for (var i = 0; i < buttons.length; i++) {
82      var b = buttons.item(i);
83      if (b.className == "fbbutton noprint") {
84        node.removeChild(b);
85      }
86    }
87  }
88}</script><style type="text/css" title="Xml2Rfc (sans serif)">
89a {
90  text-decoration: none;
91}
92a.smpl {
93  color: black;
94}
95a:hover {
96  text-decoration: underline;
97}
98a:active {
99  text-decoration: underline;
100}
101address {
102  margin-top: 1em;
103  margin-left: 2em;
104  font-style: normal;
105}
106body {
107  color: black;
108  font-family: verdana, helvetica, arial, sans-serif;
109  font-size: 10pt;
110  margin-right: 2em;
111}
112cite {
113  font-style: normal;
114}
115div.note {
116  margin-left: 2em;
117}
118dl {
119  margin-left: 2em;
120}
121ul.empty {
122  list-style-type: none;
123}
124ul.empty li {
125  margin-top: .5em;
126}
127dl p {
128  margin-left: 0em;
129}
130dt {
131  margin-top: .5em;
132}
133h1 {
134  font-size: 14pt;
135  line-height: 21pt;
136  page-break-after: avoid;
137}
138h1.np {
139  page-break-before: always;
140}
141h1 a {
142  color: #333333;
143}
144h2 {
145  font-size: 12pt;
146  line-height: 15pt;
147  page-break-after: avoid;
148}
149h3, h4, h5, h6 {
150  font-size: 10pt;
151  page-break-after: avoid;
152}
153h2 a, h3 a, h4 a, h5 a, h6 a {
154  color: black;
155}
156img {
157  margin-left: 3em;
158}
159li {
160  margin-left: 2em;
161}
162ol {
163  margin-left: 2em;
164}
165ol.la {
166  list-style-type: lower-alpha;
167}
168ol.ua {
169  list-style-type: upper-alpha;
170}
171ol p {
172  margin-left: 0em;
173}
174p {
175  margin-left: 2em;
176}
177pre {
178  margin-left: 3em;
179  background-color: lightyellow;
180  padding: .25em;
181  page-break-inside: avoid;
182}
183pre.text2 {
184  border-style: dotted;
185  border-width: 1px;
186  background-color: #f0f0f0;
187  width: 69em;
188}
189pre.inline {
190  background-color: white;
191  padding: 0em;
192}
193pre.text {
194  border-style: dotted;
195  border-width: 1px;
196  background-color: #f8f8f8;
197  width: 69em;
198}
199pre.drawing {
200  border-style: solid;
201  border-width: 1px;
202  background-color: #f8f8f8;
203  padding: 2em;
204}
205table {
206  margin-left: 2em;
207}
208table.tt {
209  vertical-align: top;
210}
211table.full {
212  border-style: outset;
213  border-width: 1px;
214}
215table.headers {
216  border-style: outset;
217  border-width: 1px;
218}
219table.tt td {
220  vertical-align: top;
221}
222table.full td {
223  border-style: inset;
224  border-width: 1px;
225}
226table.tt th {
227  vertical-align: top;
228}
229table.full th {
230  border-style: inset;
231  border-width: 1px;
232}
233table.headers th {
234  border-style: none none inset none;
235  border-width: 1px;
236}
237table.left {
238  margin-right: auto;
239}
240table.right {
241  margin-left: auto;
242}
243table.center {
244  margin-left: auto;
245  margin-right: auto;
246}
247caption {
248  caption-side: bottom;
249  font-weight: bold;
250  font-size: 9pt;
251  margin-top: .5em;
252}
253
254table.header {
255  border-spacing: 1px;
256  width: 95%;
257  font-size: 10pt;
258  color: white;
259}
260td.top {
261  vertical-align: top;
262}
263td.topnowrap {
264  vertical-align: top;
265  white-space: nowrap; 
266}
267table.header td {
268  background-color: gray;
269  width: 50%;
270}
271table.header a {
272  color: white;
273}
274td.reference {
275  vertical-align: top;
276  white-space: nowrap;
277  padding-right: 1em;
278}
279thead {
280  display:table-header-group;
281}
282ul.toc, ul.toc ul {
283  list-style: none;
284  margin-left: 1.5em;
285  padding-left: 0em;
286}
287ul.toc li {
288  line-height: 150%;
289  font-weight: bold;
290  font-size: 10pt;
291  margin-left: 0em;
292}
293ul.toc li li {
294  line-height: normal;
295  font-weight: normal;
296  font-size: 9pt;
297  margin-left: 0em;
298}
299li.excluded {
300  font-size: 0pt;
301}
302ul p {
303  margin-left: 0em;
304}
305ul.ind, ul.ind ul {
306  list-style: none;
307  margin-left: 1.5em;
308  padding-left: 0em;
309  page-break-before: avoid;
310}
311ul.ind li {
312  font-weight: bold;
313  line-height: 200%;
314  margin-left: 0em;
315}
316ul.ind li li {
317  font-weight: normal;
318  line-height: 150%;
319  margin-left: 0em;
320}
321.avoidbreak {
322  page-break-inside: avoid;
323}
324.bcp14 {
325  font-style: normal;
326  text-transform: lowercase;
327  font-variant: small-caps;
328}
329.comment {
330  background-color: yellow;
331}
332.center {
333  text-align: center;
334}
335.error {
336  color: red;
337  font-style: italic;
338  font-weight: bold;
339}
340.figure {
341  font-weight: bold;
342  text-align: center;
343  font-size: 9pt;
344}
345.filename {
346  color: #333333;
347  font-weight: bold;
348  font-size: 12pt;
349  line-height: 21pt;
350  text-align: center;
351}
352.fn {
353  font-weight: bold;
354}
355.hidden {
356  display: none;
357}
358.left {
359  text-align: left;
360}
361.right {
362  text-align: right;
363}
364.title {
365  color: #990000;
366  font-size: 18pt;
367  line-height: 18pt;
368  font-weight: bold;
369  text-align: center;
370  margin-top: 36pt;
371}
372.vcardline {
373  display: block;
374}
375.warning {
376  font-size: 14pt;
377  background-color: yellow;
378}
379.feedback {
380  position: fixed;
381  bottom: 1%;
382  right: 1%;
383  padding: 3px 5px;
384  color: white;
385  border-radius: 5px;
386  background: #a00000;
387  border: 1px solid silver;
388}
389.fbbutton {
390  margin-left: 1em;
391  color: #303030;
392  font-size: small;
393  font-weight: normal;
394  background: #d0d000;
395  padding: 1px 4px;
396  border: 1px solid silver;
397  border-radius: 5px;
398}
399
400@media print {
401  .noprint {
402    display: none;
403  }
404 
405  a {
406    color: black;
407    text-decoration: none;
408  }
409
410  table.header {
411    width: 90%;
412  }
413
414  td.header {
415    width: 50%;
416    color: black;
417    background-color: white;
418    vertical-align: top;
419    font-size: 12pt;
420  }
421
422  ul.toc a::after {
423    content: leader('.') target-counter(attr(href), page);
424  }
425 
426  ul.ind li li a {
427    content: target-counter(attr(href), page);
428  }
429 
430  .print2col {
431    column-count: 2;
432    -moz-column-count: 2;
433    column-fill: auto;
434  }
435}
436
437@page {
438  @top-left {
439       content: "Internet-Draft"; 
440  } 
441  @top-right {
442       content: "July 2012"; 
443  } 
444  @top-center {
445       content: "HTTP/1.1, Part 7"; 
446  } 
447  @bottom-left {
448       content: "Fielding, et al."; 
449  } 
450  @bottom-center {
451       content: "Expires January 4, 2013"; 
452  } 
453  @bottom-right {
454       content: "[Page " counter(page) "]"; 
455  } 
456}
457
458@page:first { 
459    @top-left {
460      content: normal;
461    }
462    @top-right {
463      content: normal;
464    }
465    @top-center {
466      content: normal;
467    }
468}
469</style><link rel="Contents" href="#rfc.toc">
470      <link rel="Author" href="#rfc.authors">
471      <link rel="Copyright" href="#rfc.copyrightnotice">
472      <link rel="Index" href="#rfc.index">
473      <link rel="Chapter" title="1 Introduction" href="#rfc.section.1">
474      <link rel="Chapter" title="2 Access Authentication Framework" href="#rfc.section.2">
475      <link rel="Chapter" title="3 Status Code Definitions" href="#rfc.section.3">
476      <link rel="Chapter" title="4 Header Field Definitions" href="#rfc.section.4">
477      <link rel="Chapter" title="5 IANA Considerations" href="#rfc.section.5">
478      <link rel="Chapter" title="6 Security Considerations" href="#rfc.section.6">
479      <link rel="Chapter" title="7 Acknowledgments" href="#rfc.section.7">
480      <link rel="Chapter" href="#rfc.section.8" title="8 References">
481      <link rel="Appendix" title="A Changes from RFCs 2616 and 2617" href="#rfc.section.A">
482      <link rel="Appendix" title="B Collected ABNF" href="#rfc.section.B">
483      <link rel="Appendix" title="C Change Log (to be removed by RFC Editor before publication)" href="#rfc.section.C">
484      <link href="p6-cache.html" rel="prev">
485      <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.584, 2012-06-24 15:59:38, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/">
486      <link rel="schema.dct" href="http://purl.org/dc/terms/">
487      <meta name="dct.creator" content="Fielding, R.">
488      <meta name="dct.creator" content="Lafon, Y.">
489      <meta name="dct.creator" content="Reschke, J. F.">
490      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p7-auth-latest">
491      <meta name="dct.issued" scheme="ISO8601" content="2012-07-03">
492      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
493      <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 7 of the seven-part specification that defines the protocol referred to as &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 7 defines the HTTP Authentication framework.">
494      <meta name="description" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 7 of the seven-part specification that defines the protocol referred to as &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 7 defines the HTTP Authentication framework.">
495   </head>
496   <body onload="init();">
497      <table class="header">
498         <tbody>
499            <tr>
500               <td class="left">HTTPbis Working Group</td>
501               <td class="right">R. Fielding, Editor</td>
502            </tr>
503            <tr>
504               <td class="left">Internet-Draft</td>
505               <td class="right">Adobe</td>
506            </tr>
507            <tr>
508               <td class="left">Obsoletes: <a href="http://tools.ietf.org/html/rfc2616">2616</a> (if approved)
509               </td>
510               <td class="right">Y. Lafon, Editor</td>
511            </tr>
512            <tr>
513               <td class="left">Updates: <a href="http://tools.ietf.org/html/rfc2617">2617</a> (if approved)
514               </td>
515               <td class="right">W3C</td>
516            </tr>
517            <tr>
518               <td class="left">Intended status: Standards Track</td>
519               <td class="right">J. Reschke, Editor</td>
520            </tr>
521            <tr>
522               <td class="left">Expires: January 4, 2013</td>
523               <td class="right">greenbytes</td>
524            </tr>
525            <tr>
526               <td class="left"></td>
527               <td class="right">July 3, 2012</td>
528            </tr>
529         </tbody>
530      </table>
531      <p class="title">HTTP/1.1, part 7: Authentication<br><span class="filename">draft-ietf-httpbis-p7-auth-latest</span></p>
532      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> 
533      <p>The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information
534         systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 7 of the
535         seven-part specification that defines the protocol referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616.
536      </p> 
537      <p>Part 7 defines the HTTP Authentication framework.</p> 
538      <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h1> 
539      <p>Discussion of this draft ought to take place on the HTTPBIS working group mailing list (ietf-http-wg@w3.org), which is archived
540         at &lt;<a href="http://lists.w3.org/Archives/Public/ietf-http-wg/">http://lists.w3.org/Archives/Public/ietf-http-wg/</a>&gt;.
541      </p> 
542      <p>The current issues list is at &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/report/3">http://tools.ietf.org/wg/httpbis/trac/report/3</a>&gt; and related documents (including fancy diffs) can be found at &lt;<a href="http://tools.ietf.org/wg/httpbis/">http://tools.ietf.org/wg/httpbis/</a>&gt;.
543      </p> 
544      <p>The changes in this draft are summarized in <a href="#changes.since.19" title="Since draft-ietf-httpbis-p7-auth-19">Appendix&nbsp;C.1</a>.
545      </p> 
546      <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1>
547      <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
548      <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute
549         working documents as Internet-Drafts. The list of current Internet-Drafts is at <a href="http://datatracker.ietf.org/drafts/current/">http://datatracker.ietf.org/drafts/current/</a>.
550      </p>
551      <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
552         documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
553         in progress”.
554      </p>
555      <p>This Internet-Draft will expire on January 4, 2013.</p>
556      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
557      <p>Copyright © 2012 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
558      <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights
559         and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
560         text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
561         BSD License.
562      </p>
563      <p>This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November
564         10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to
565         allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s)
566         controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative
567         works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate
568         it into languages other than English.
569      </p>
570      <hr class="noprint">
571      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
572      <ul class="toc">
573         <li>1.&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a><ul>
574               <li>1.1&nbsp;&nbsp;&nbsp;<a href="#intro.conformance.and.error.handling">Conformance and Error Handling</a></li>
575               <li>1.2&nbsp;&nbsp;&nbsp;<a href="#notation">Syntax Notation</a><ul>
576                     <li>1.2.1&nbsp;&nbsp;&nbsp;<a href="#core.rules">Core Rules</a></li>
577                  </ul>
578               </li>
579            </ul>
580         </li>
581         <li>2.&nbsp;&nbsp;&nbsp;<a href="#access.authentication.framework">Access Authentication Framework</a><ul>
582               <li>2.1&nbsp;&nbsp;&nbsp;<a href="#challenge.and.response">Challenge and Response</a></li>
583               <li>2.2&nbsp;&nbsp;&nbsp;<a href="#protection.space">Protection Space (Realm)</a></li>
584               <li>2.3&nbsp;&nbsp;&nbsp;<a href="#authentication.scheme.registry">Authentication Scheme Registry</a><ul>
585                     <li>2.3.1&nbsp;&nbsp;&nbsp;<a href="#considerations.for.new.authentication.schemes">Considerations for New Authentication Schemes</a></li>
586                  </ul>
587               </li>
588            </ul>
589         </li>
590         <li>3.&nbsp;&nbsp;&nbsp;<a href="#status.code.definitions">Status Code Definitions</a><ul>
591               <li>3.1&nbsp;&nbsp;&nbsp;<a href="#status.401">401 Unauthorized</a></li>
592               <li>3.2&nbsp;&nbsp;&nbsp;<a href="#status.407">407 Proxy Authentication Required</a></li>
593            </ul>
594         </li>
595         <li>4.&nbsp;&nbsp;&nbsp;<a href="#header.field.definitions">Header Field Definitions</a><ul>
596               <li>4.1&nbsp;&nbsp;&nbsp;<a href="#header.authorization">Authorization</a></li>
597               <li>4.2&nbsp;&nbsp;&nbsp;<a href="#header.proxy-authenticate">Proxy-Authenticate</a></li>
598               <li>4.3&nbsp;&nbsp;&nbsp;<a href="#header.proxy-authorization">Proxy-Authorization</a></li>
599               <li>4.4&nbsp;&nbsp;&nbsp;<a href="#header.www-authenticate">WWW-Authenticate</a></li>
600            </ul>
601         </li>
602         <li>5.&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a><ul>
603               <li>5.1&nbsp;&nbsp;&nbsp;<a href="#authentication.scheme.registration">Authenticaton Scheme Registry</a></li>
604               <li>5.2&nbsp;&nbsp;&nbsp;<a href="#status.code.registration">Status Code Registration</a></li>
605               <li>5.3&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li>
606            </ul>
607         </li>
608         <li>6.&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a><ul>
609               <li>6.1&nbsp;&nbsp;&nbsp;<a href="#auth.credentials.and.idle.clients">Authentication Credentials and Idle Clients</a></li>
610               <li>6.2&nbsp;&nbsp;&nbsp;<a href="#protection.spaces">Protection Spaces</a></li>
611            </ul>
612         </li>
613         <li>7.&nbsp;&nbsp;&nbsp;<a href="#acks">Acknowledgments</a></li>
614         <li>8.&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul>
615               <li>8.1&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li>
616               <li>8.2&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li>
617            </ul>
618         </li>
619         <li><a href="#rfc.authors">Authors' Addresses</a></li>
620         <li>A.&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2616">Changes from RFCs 2616 and 2617</a></li>
621         <li>B.&nbsp;&nbsp;&nbsp;<a href="#collected.abnf">Collected ABNF</a></li>
622         <li>C.&nbsp;&nbsp;&nbsp;<a href="#change.log">Change Log (to be removed by RFC Editor before publication)</a><ul>
623               <li>C.1&nbsp;&nbsp;&nbsp;<a href="#changes.since.19">Since draft-ietf-httpbis-p7-auth-19</a></li>
624            </ul>
625         </li>
626         <li><a href="#rfc.index">Index</a></li>
627      </ul>
628      <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="introduction" href="#introduction">Introduction</a></h1>
629      <p id="rfc.section.1.p.1">This document defines HTTP/1.1 access control and authentication. It includes the relevant parts of <cite title="Hypertext Transfer Protocol -- HTTP/1.1" id="rfc.xref.RFC2616.1">RFC 2616</cite> with only minor changes (<a href="#RFC2616" id="rfc.xref.RFC2616.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>), plus the general framework for HTTP authentication, as previously defined in "HTTP Authentication: Basic and Digest Access
630         Authentication" (<a href="#RFC2617" id="rfc.xref.RFC2617.1"><cite title="HTTP Authentication: Basic and Digest Access Authentication">[RFC2617]</cite></a>).
631      </p>
632      <p id="rfc.section.1.p.2">HTTP provides several <em class="bcp14">OPTIONAL</em> challenge-response authentication mechanisms which can be used by a server to challenge a client request and by a client to
633         provide authentication information. The "basic" and "digest" authentication schemes continue to be specified in <cite title="HTTP Authentication: Basic and Digest Access Authentication" id="rfc.xref.RFC2617.2">RFC 2617</cite>.
634      </p>
635      <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a id="intro.conformance.and.error.handling" href="#intro.conformance.and.error.handling">Conformance and Error Handling</a></h2>
636      <p id="rfc.section.1.1.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
637         in this document are to be interpreted as described in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.
638      </p>
639      <p id="rfc.section.1.1.p.2">This document defines conformance criteria for several roles in HTTP communication, including Senders, Recipients, Clients,
640         Servers, User-Agents, Origin Servers, Intermediaries, Proxies and Gateways. See <a href="p1-messaging.html#architecture" title="Architecture">Section 2</a> of <a href="#Part1" id="rfc.xref.Part1.1"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> for definitions of these terms.
641      </p>
642      <p id="rfc.section.1.1.p.3">An implementation is considered conformant if it complies with all of the requirements associated with its role(s). Note that
643         SHOULD-level requirements are relevant here, unless one of the documented exceptions is applicable.
644      </p>
645      <p id="rfc.section.1.1.p.4">This document also uses ABNF to define valid protocol elements (<a href="#notation" title="Syntax Notation">Section&nbsp;1.2</a>). In addition to the prose requirements placed upon them, Senders <em class="bcp14">MUST NOT</em> generate protocol elements that are invalid.
646      </p>
647      <p id="rfc.section.1.1.p.5">Unless noted otherwise, Recipients <em class="bcp14">MUST</em> be able to parse all protocol elements matching the ABNF rules defined for them and <em class="bcp14">MAY</em> take steps to recover a usable protocol element from an invalid construct. However, HTTP does not define specific error handling
648         mechanisms, except in cases where it has direct impact on security. This is because different uses of the protocol require
649         different error handling strategies; for example, a Web browser might wish to transparently recover from a response where
650         the Location header field doesn't parse according to the ABNF, whereby in a systems control protocol using HTTP, this type
651         of error recovery could lead to dangerous consequences.
652      </p>
653      <h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;<a id="notation" href="#notation">Syntax Notation</a></h2>
654      <p id="rfc.section.1.2.p.1">This specification uses the Augmented Backus-Naur Form (ABNF) notation of <a href="#RFC5234" id="rfc.xref.RFC5234.1"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a> with the list rule extension defined in <a href="p1-messaging.html#notation" title="Syntax Notation">Section 1.2</a> of <a href="#Part1" id="rfc.xref.Part1.2"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. <a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;B</a> shows the collected ABNF with the list rule expanded.
655      </p>
656      <p id="rfc.section.1.2.p.2">The following core rules are included by reference, as defined in <a href="#RFC5234" id="rfc.xref.RFC5234.2"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>, <a href="http://tools.ietf.org/html/rfc5234#appendix-B.1">Appendix B.1</a>: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG
657         (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII
658         character).
659      </p>
660      <h3 id="rfc.section.1.2.1"><a href="#rfc.section.1.2.1">1.2.1</a>&nbsp;<a id="core.rules" href="#core.rules">Core Rules</a></h3>
661      <p id="rfc.section.1.2.1.p.1">The core rules below are defined in <a href="#Part1" id="rfc.xref.Part1.3"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>:
662      </p>
663      <div id="rfc.figure.u.1"></div><pre class="inline">  <a href="#core.rules" class="smpl">BWS</a>           = &lt;BWS, defined in <a href="#Part1" id="rfc.xref.Part1.4"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#whitespace" title="Whitespace">Section 3.2.1</a>&gt;
664  <a href="#core.rules" class="smpl">OWS</a>           = &lt;OWS, defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#whitespace" title="Whitespace">Section 3.2.1</a>&gt;
665  <a href="#core.rules" class="smpl">quoted-string</a> = &lt;quoted-string, defined in <a href="#Part1" id="rfc.xref.Part1.6"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#field.components" title="Field value components">Section 3.2.4</a>&gt;
666  <a href="#core.rules" class="smpl">token</a>         = &lt;token, defined in <a href="#Part1" id="rfc.xref.Part1.7"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#field.components" title="Field value components">Section 3.2.4</a>&gt;
667</pre><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="access.authentication.framework" href="#access.authentication.framework">Access Authentication Framework</a></h1>
668      <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a id="challenge.and.response" href="#challenge.and.response">Challenge and Response</a></h2>
669      <p id="rfc.section.2.1.p.1">HTTP provides a simple challenge-response authentication mechanism that can be used by a server to challenge a client request
670         and by a client to provide authentication information. It uses an extensible, case-insensitive token to identify the authentication
671         scheme, followed by additional information necessary for achieving authentication via that scheme. The latter can either be
672         a comma-separated list of parameters or a single sequence of characters capable of holding base64-encoded information.
673      </p>
674      <p id="rfc.section.2.1.p.2">Parameters are name-value pairs where the name is matched case-insensitively, and each parameter name <em class="bcp14">MUST</em> only occur once per challenge.
675      </p>
676      <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.a.1"></span><span id="rfc.iref.a.2"></span><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.b.1"></span><span id="rfc.iref.g.3"></span>  auth-scheme    = <a href="#core.rules" class="smpl">token</a>
677 
678  auth-param     = <a href="#core.rules" class="smpl">token</a> <a href="#core.rules" class="smpl">BWS</a> "=" <a href="#core.rules" class="smpl">BWS</a> ( <a href="#core.rules" class="smpl">token</a> / <a href="#core.rules" class="smpl">quoted-string</a> )
679
680  b64token       = 1*( <a href="#notation" class="smpl">ALPHA</a> / <a href="#notation" class="smpl">DIGIT</a> /
681                       "-" / "." / "_" / "~" / "+" / "/" ) *"="
682</pre><p id="rfc.section.2.1.p.4">The "b64token" syntax allows the 66 unreserved URI characters (<a href="#RFC3986" id="rfc.xref.RFC3986.1"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>), plus a few others, so that it can hold a base64, base64url (URL and filename safe alphabet), base32, or base16 (hex) encoding,
683         with or without padding, but excluding whitespace (<a href="#RFC4648" id="rfc.xref.RFC4648.1"><cite title="The Base16, Base32, and Base64 Data Encodings">[RFC4648]</cite></a>).
684      </p>
685      <p id="rfc.section.2.1.p.5">The <a href="#status.401" class="smpl">401 (Unauthorized)</a> response message is used by an origin server to challenge the authorization of a user agent. This response <em class="bcp14">MUST</em> include a WWW-Authenticate header field containing at least one challenge applicable to the requested resource.
686      </p>
687      <p id="rfc.section.2.1.p.6">The <a href="#status.407" class="smpl">407 (Proxy Authentication Required)</a> response message is used by a proxy to challenge the authorization of a client and <em class="bcp14">MUST</em> include a Proxy-Authenticate header field containing at least one challenge applicable to the proxy for the requested resource.
688      </p>
689      <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.c.1"></span><span id="rfc.iref.g.4"></span>  <a href="#challenge.and.response" class="smpl">challenge</a>   = <a href="#challenge.and.response" class="smpl">auth-scheme</a> [ 1*<a href="#notation" class="smpl">SP</a> ( <a href="#challenge.and.response" class="smpl">b64token</a> / #<a href="#challenge.and.response" class="smpl">auth-param</a> ) ]
690</pre><div class="note" id="rfc.section.2.1.p.8"> 
691         <p> <b>Note:</b> User agents will need to take special care in parsing the WWW-Authenticate and Proxy-Authenticate header field values because
692            they can contain more than one challenge, or if more than one of each is provided, since the contents of a challenge can itself
693            contain a comma-separated list of authentication parameters.
694         </p> 
695      </div>
696      <div class="note" id="rfc.section.2.1.p.9"> 
697         <p> <b>Note:</b> Many clients fail to parse challenges containing unknown schemes. A workaround for this problem is to list well-supported
698            schemes (such as "basic") first.
699         </p> 
700      </div>
701      <p id="rfc.section.2.1.p.10">A user agent that wishes to authenticate itself with an origin server — usually, but not necessarily, after receiving a <a href="#status.401" class="smpl">401 (Unauthorized)</a> — can do so by including an Authorization header field with the request.
702      </p>
703      <p id="rfc.section.2.1.p.11">A client that wishes to authenticate itself with a proxy — usually, but not necessarily, after receiving a <a href="#status.407" class="smpl">407 (Proxy Authentication Required)</a> — can do so by including a Proxy-Authorization header field with the request.
704      </p>
705      <p id="rfc.section.2.1.p.12">Both the Authorization field value and the Proxy-Authorization field value contain the client's credentials for the realm
706         of the resource being requested, based upon a challenge received from the server (possibly at some point in the past). When
707         creating their values, the user agent ought to do so by selecting the challenge with what it considers to be the most secure
708         auth-scheme that it understands, obtaining credentials from the user as appropriate.
709      </p>
710      <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.c.2"></span><span id="rfc.iref.g.5"></span>  <a href="#challenge.and.response" class="smpl">credentials</a> = <a href="#challenge.and.response" class="smpl">auth-scheme</a> [ 1*<a href="#notation" class="smpl">SP</a> ( <a href="#challenge.and.response" class="smpl">b64token</a> / #<a href="#challenge.and.response" class="smpl">auth-param</a> ) ]
711</pre><p id="rfc.section.2.1.p.14">Upon a request for a protected resource that omits credentials, contains invalid credentials (e.g., a bad password) or partial
712         credentials (e.g., when the authentication scheme requires more than one round trip), an origin server <em class="bcp14">SHOULD</em> return a <a href="#status.401" class="smpl">401 (Unauthorized)</a> response. Such responses <em class="bcp14">MUST</em> include a WWW-Authenticate header field containing at least one (possibly new) challenge applicable to the requested resource.
713      </p>
714      <p id="rfc.section.2.1.p.15">Likewise, upon a request that requires authentication by proxies that omit credentials or contain invalid or partial credentials,
715         a proxy <em class="bcp14">SHOULD</em> return a <a href="#status.407" class="smpl">407 (Proxy Authentication Required)</a> response. Such responses <em class="bcp14">MUST</em> include a Proxy-Authenticate header field containing a (possibly new) challenge applicable to the proxy.
716      </p>
717      <p id="rfc.section.2.1.p.16">A server receiving credentials that are valid, but not adequate to gain access, ought to respond with the 403 (Forbidden)
718         status code (<a href="p2-semantics.html#status.403" title="403 Forbidden">Section 4.6.3</a> of <a href="#Part2" id="rfc.xref.Part2.1"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>).
719      </p>
720      <p id="rfc.section.2.1.p.17">The HTTP protocol does not restrict applications to this simple challenge-response mechanism for access authentication. Additional
721         mechanisms <em class="bcp14">MAY</em> be used, such as encryption at the transport level or via message encapsulation, and with additional header fields specifying
722         authentication information. However, such additional mechanisms are not defined by this specification.
723      </p>
724      <p id="rfc.section.2.1.p.18">Proxies <em class="bcp14">MUST</em> forward the WWW-Authenticate and Authorization headers unmodified and follow the rules found in <a href="#header.authorization" id="rfc.xref.header.authorization.1" title="Authorization">Section&nbsp;4.1</a>.
725      </p>
726      <div id="rfc.iref.p.1"></div>
727      <div id="rfc.iref.r.1"></div>
728      <div id="rfc.iref.c.3"></div>
729      <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;<a id="protection.space" href="#protection.space">Protection Space (Realm)</a></h2>
730      <p id="rfc.section.2.2.p.1">The authentication parameter realm is reserved for use by authentication schemes that wish to indicate the scope of protection.</p>
731      <p id="rfc.section.2.2.p.2">A <dfn>protection space</dfn> is defined by the canonical root URI (the scheme and authority components of the effective request URI; see <a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.8"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) of the server being accessed, in combination with the realm value if present. These realms allow the protected resources
732         on a server to be partitioned into a set of protection spaces, each with its own authentication scheme and/or authorization
733         database. The realm value is a string, generally assigned by the origin server, which can have additional semantics specific
734         to the authentication scheme. Note that there can be multiple challenges with the same auth-scheme but different realms.
735      </p>
736      <p id="rfc.section.2.2.p.3">The protection space determines the domain over which credentials can be automatically applied. If a prior request has been
737         authorized, the same credentials <em class="bcp14">MAY</em> be reused for all other requests within that protection space for a period of time determined by the authentication scheme,
738         parameters, and/or user preference. Unless otherwise defined by the authentication scheme, a single protection space cannot
739         extend outside the scope of its server.
740      </p>
741      <p id="rfc.section.2.2.p.4">For historical reasons, senders <em class="bcp14">MUST</em> only use the quoted-string syntax. Recipients might have to support both token and quoted-string syntax for maximum interoperability
742         with existing clients that have been accepting both notations for a long time.
743      </p>
744      <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a>&nbsp;<a id="authentication.scheme.registry" href="#authentication.scheme.registry">Authentication Scheme Registry</a></h2>
745      <p id="rfc.section.2.3.p.1">The HTTP Authentication Scheme Registry defines the name space for the authentication schemes in challenges and credentials.</p>
746      <p id="rfc.section.2.3.p.2">Registrations <em class="bcp14">MUST</em> include the following fields:
747      </p>
748      <ul>
749         <li>Authentication Scheme Name</li>
750         <li>Pointer to specification text</li>
751         <li>Notes (optional)</li>
752      </ul>
753      <p id="rfc.section.2.3.p.3">Values to be added to this name space require IETF Review (see <a href="#RFC5226" id="rfc.xref.RFC5226.1"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>, <a href="http://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a>).
754      </p>
755      <p id="rfc.section.2.3.p.4">The registry itself is maintained at &lt;<a href="http://www.iana.org/assignments/http-authschemes">http://www.iana.org/assignments/http-authschemes</a>&gt;.
756      </p>
757      <h3 id="rfc.section.2.3.1"><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;<a id="considerations.for.new.authentication.schemes" href="#considerations.for.new.authentication.schemes">Considerations for New Authentication Schemes</a></h3>
758      <p id="rfc.section.2.3.1.p.1">There are certain aspects of the HTTP Authentication Framework that put constraints on how new authentication schemes can
759         work:
760      </p>
761      <p id="rfc.section.2.3.1.p.2"> </p>
762      <ul>
763         <li>
764            <p>HTTP authentication is presumed to be stateless: all of the information necessary to authenticate a request <em class="bcp14">MUST</em> be provided in the request, rather than be dependent on the server remembering prior requests. Authentication based on, or
765               bound to, the underlying connection is outside the scope of this specification and inherently flawed unless steps are taken
766               to ensure that the connection cannot be used by any party other than the authenticated user (see <a href="p1-messaging.html#intermediaries" title="Intermediaries">Section 2.3</a> of <a href="#Part1" id="rfc.xref.Part1.9"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>).
767            </p>
768         </li>
769         <li>
770            <p>The authentication parameter "realm" is reserved for defining Protection Spaces as defined in <a href="#protection.space" title="Protection Space (Realm)">Section&nbsp;2.2</a>. New schemes <em class="bcp14">MUST NOT</em> use it in a way incompatible with that definition.
771            </p>
772         </li>
773         <li>
774            <p>The "b64token" notation was introduced for compatibility with existing authentication schemes and can only be used once per
775               challenge/credentials. New schemes thus ought to use the "auth-param" syntax instead, because otherwise future extensions
776               will be impossible.
777            </p>
778         </li>
779         <li>
780            <p>The parsing of challenges and credentials is defined by this specification, and cannot be modified by new authentication schemes.
781               When the auth-param syntax is used, all parameters ought to support both token and quoted-string syntax, and syntactical constraints
782               ought to be defined on the field value after parsing (i.e., quoted-string processing). This is necessary so that recipients
783               can use a generic parser that applies to all authentication schemes.
784            </p>
785            <p> <b>Note:</b> The fact that the value syntax for the "realm" parameter is restricted to quoted-string was a bad design choice not to be
786               repeated for new parameters.
787            </p>
788         </li>
789         <li>
790            <p>Definitions of new schemes ought to define the treatment of unknown extension parameters. In general, a "must-ignore" rule
791               is preferable over "must-understand", because otherwise it will be hard to introduce new parameters in the presence of legacy
792               recipients. Furthermore, it's good to describe the policy for defining new parameters (such as "update the specification",
793               or "use this registry").
794            </p>
795         </li>
796         <li>
797            <p>Authentication schemes need to document whether they are usable in origin-server authentication (i.e., using WWW-Authenticate),
798               and/or proxy authentication (i.e., using Proxy-Authenticate).
799            </p>
800         </li>
801         <li>
802            <p>The credentials carried in an Authorization header field are specific to the User Agent, and therefore have the same effect
803               on HTTP caches as the "private" Cache-Control response directive, within the scope of the request they appear in.
804            </p>
805            <p>Therefore, new authentication schemes which choose not to carry credentials in the Authorization header (e.g., using a newly
806               defined header) will need to explicitly disallow caching, by mandating the use of either Cache-Control request directives
807               (e.g., "no-store") or response directives (e.g., "private").
808            </p>
809         </li>
810      </ul>
811      <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a id="status.code.definitions" href="#status.code.definitions">Status Code Definitions</a></h1>
812      <div id="rfc.iref.13"></div>
813      <div id="rfc.iref.s.1"></div>
814      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a id="status.401" href="#status.401">401 Unauthorized</a></h2>
815      <p id="rfc.section.3.1.p.1">The request requires user authentication. The response <em class="bcp14">MUST</em> include a WWW-Authenticate header field (<a href="#header.www-authenticate" id="rfc.xref.header.www-authenticate.1" title="WWW-Authenticate">Section&nbsp;4.4</a>) containing a challenge applicable to the target resource. The client <em class="bcp14">MAY</em> repeat the request with a suitable Authorization header field (<a href="#header.authorization" id="rfc.xref.header.authorization.2" title="Authorization">Section&nbsp;4.1</a>). If the request already included Authorization credentials, then the 401 response indicates that authorization has been
816         refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has
817         already attempted authentication at least once, then the user <em class="bcp14">SHOULD</em> be presented the representation that was given in the response, since that representation might include relevant diagnostic
818         information.
819      </p>
820      <div id="rfc.iref.14"></div>
821      <div id="rfc.iref.s.2"></div>
822      <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a id="status.407" href="#status.407">407 Proxy Authentication Required</a></h2>
823      <p id="rfc.section.3.2.p.1">This code is similar to <a href="#status.401" class="smpl">401 (Unauthorized)</a>, but indicates that the client ought to first authenticate itself with the proxy. The proxy <em class="bcp14">MUST</em> return a Proxy-Authenticate header field (<a href="#header.proxy-authenticate" id="rfc.xref.header.proxy-authenticate.1" title="Proxy-Authenticate">Section&nbsp;4.2</a>) containing a challenge applicable to the proxy for the target resource. The client <em class="bcp14">MAY</em> repeat the request with a suitable Proxy-Authorization header field (<a href="#header.proxy-authorization" id="rfc.xref.header.proxy-authorization.1" title="Proxy-Authorization">Section&nbsp;4.3</a>).
824      </p>
825      <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a id="header.field.definitions" href="#header.field.definitions">Header Field Definitions</a></h1>
826      <p id="rfc.section.4.p.1">This section defines the syntax and semantics of HTTP/1.1 header fields related to authentication.</p>
827      <div id="rfc.iref.a.3"></div>
828      <div id="rfc.iref.h.1"></div>
829      <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;<a id="header.authorization" href="#header.authorization">Authorization</a></h2>
830      <p id="rfc.section.4.1.p.1">The "Authorization" header field allows a user agent to authenticate itself with a server — usually, but not necessarily,
831         after receiving a <a href="#status.401" class="smpl">401
832            (Unauthorized)</a> response. Its value consists of credentials containing information of the user agent for the realm of the resource being requested.
833      </p>
834      <div id="rfc.figure.u.5"></div><pre class="inline"><span id="rfc.iref.g.6"></span>  <a href="#header.authorization" class="smpl">Authorization</a> = <a href="#challenge.and.response" class="smpl">credentials</a>
835</pre><p id="rfc.section.4.1.p.3">If a request is authenticated and a realm specified, the same credentials <em class="bcp14">SHOULD</em> be valid for all other requests within this realm (assuming that the authentication scheme itself does not require otherwise,
836         such as credentials that vary according to a challenge value or using synchronized clocks).
837      </p>
838      <p id="rfc.section.4.1.p.4">When a shared cache (see <a href="p6-cache.html#shared.and.non-shared.caches">Section 1.2</a> of <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) receives a request containing an Authorization field, it <em class="bcp14">MUST NOT</em> return the corresponding response as a reply to any other request, unless one of the following specific exceptions holds:
839      </p>
840      <p id="rfc.section.4.1.p.5"> </p>
841      <ol>
842         <li>If the response includes the "s-maxage" cache-control directive, the cache <em class="bcp14">MAY</em> use that response in replying to a subsequent request. But (if the specified maximum age has passed) a proxy cache <em class="bcp14">MUST</em> first revalidate it with the origin server, using the header fields from the new request to allow the origin server to authenticate
843            the new request. (This is the defined behavior for s-maxage.) If the response includes "s-maxage=0", the proxy <em class="bcp14">MUST</em> always revalidate it before re-using it.
844         </li>
845         <li>If the response includes the "must-revalidate" cache-control directive, the cache <em class="bcp14">MAY</em> use that response in replying to a subsequent request. But if the response is stale, all caches <em class="bcp14">MUST</em> first revalidate it with the origin server, using the header fields from the new request to allow the origin server to authenticate
846            the new request.
847         </li>
848         <li>If the response includes the "public" cache-control directive, it <em class="bcp14">MAY</em> be returned in reply to any subsequent request.
849         </li>
850      </ol>
851      <div id="rfc.iref.p.2"></div>
852      <div id="rfc.iref.h.2"></div>
853      <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;<a id="header.proxy-authenticate" href="#header.proxy-authenticate">Proxy-Authenticate</a></h2>
854      <p id="rfc.section.4.2.p.1">The "Proxy-Authenticate" header field consists of at least one challenge that indicates the authentication scheme(s) and parameters
855         applicable to the proxy for this effective request URI (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.10"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). It <em class="bcp14">MUST</em> be included as part of a <a href="#status.407" class="smpl">407 (Proxy Authentication Required)</a> response.
856      </p>
857      <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.7"></span>  <a href="#header.proxy-authenticate" class="smpl">Proxy-Authenticate</a> = 1#<a href="#challenge.and.response" class="smpl">challenge</a>
858</pre><p id="rfc.section.4.2.p.3">Unlike WWW-Authenticate, the Proxy-Authenticate header field applies only to the current connection, and intermediaries <em class="bcp14">SHOULD NOT</em> forward it to downstream clients. However, an intermediate proxy might need to obtain its own credentials by requesting them
859         from the downstream client, which in some circumstances will appear as if the proxy is forwarding the Proxy-Authenticate header
860         field.
861      </p>
862      <p id="rfc.section.4.2.p.4">Note that the parsing considerations for WWW-Authenticate apply to this header field as well; see <a href="#header.www-authenticate" id="rfc.xref.header.www-authenticate.2" title="WWW-Authenticate">Section&nbsp;4.4</a> for details.
863      </p>
864      <div id="rfc.iref.p.3"></div>
865      <div id="rfc.iref.h.3"></div>
866      <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;<a id="header.proxy-authorization" href="#header.proxy-authorization">Proxy-Authorization</a></h2>
867      <p id="rfc.section.4.3.p.1">The "Proxy-Authorization" header field allows the client to identify itself (or its user) to a proxy which requires authentication.
868         Its value consists of credentials containing the authentication information of the user agent for the proxy and/or realm of
869         the resource being requested.
870      </p>
871      <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.8"></span>  <a href="#header.proxy-authorization" class="smpl">Proxy-Authorization</a> = <a href="#challenge.and.response" class="smpl">credentials</a>
872</pre><p id="rfc.section.4.3.p.3">Unlike Authorization, the Proxy-Authorization header field applies only to the next outbound proxy that demanded authentication
873         using the Proxy-Authenticate field. When multiple proxies are used in a chain, the Proxy-Authorization header field is consumed
874         by the first outbound proxy that was expecting to receive credentials. A proxy <em class="bcp14">MAY</em> relay the credentials from the client request to the next proxy if that is the mechanism by which the proxies cooperatively
875         authenticate a given request.
876      </p>
877      <div id="rfc.iref.w.1"></div>
878      <div id="rfc.iref.h.4"></div>
879      <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a>&nbsp;<a id="header.www-authenticate" href="#header.www-authenticate">WWW-Authenticate</a></h2>
880      <p id="rfc.section.4.4.p.1">The "WWW-Authenticate" header field consists of at least one challenge that indicates the authentication scheme(s) and parameters
881         applicable to the effective request URI (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.11"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>).
882      </p>
883      <p id="rfc.section.4.4.p.2">It <em class="bcp14">MUST</em> be included in <a href="#status.401" class="smpl">401 (Unauthorized)</a> response messages and <em class="bcp14">MAY</em> be included in other response messages to indicate that supplying credentials (or different credentials) might affect the
884         response.
885      </p>
886      <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.9"></span>  <a href="#header.www-authenticate" class="smpl">WWW-Authenticate</a> = 1#<a href="#challenge.and.response" class="smpl">challenge</a>
887</pre><p id="rfc.section.4.4.p.4">User agents are advised to take special care in parsing the WWW-Authenticate field value as it might contain more than one
888         challenge, or if more than one WWW-Authenticate header field is provided, the contents of a challenge itself can contain a
889         comma-separated list of authentication parameters.
890      </p>
891      <div id="rfc.figure.u.9"></div> 
892      <p>For instance:</p>  <pre class="text">  WWW-Authenticate: Newauth realm="apps", type=1,
893                    title="Login to \"apps\"", Basic realm="simple"
894</pre>  <p>This header field contains two challenges; one for the "Newauth" scheme with a realm value of "apps", and two additional parameters
895         "type" and "title", and another one for the "Basic" scheme with a realm value of "simple".
896      </p>
897      <div class="note" id="rfc.section.4.4.p.6"> 
898         <p> <b>Note:</b> The challenge grammar production uses the list syntax as well. Therefore, a sequence of comma, whitespace, and comma can be
899            considered both as applying to the preceding challenge, or to be an empty entry in the list of challenges. In practice, this
900            ambiguity does not affect the semantics of the header field value and thus is harmless.
901         </p> 
902      </div>
903      <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a id="IANA.considerations" href="#IANA.considerations">IANA Considerations</a></h1>
904      <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;<a id="authentication.scheme.registration" href="#authentication.scheme.registration">Authenticaton Scheme Registry</a></h2>
905      <p id="rfc.section.5.1.p.1">The registration procedure for HTTP Authentication Schemes is defined by <a href="#authentication.scheme.registry" title="Authentication Scheme Registry">Section&nbsp;2.3</a> of this document.
906      </p>
907      <p id="rfc.section.5.1.p.2">The HTTP Method Authentication Scheme shall be created at &lt;<a href="http://www.iana.org/assignments/http-authschemes">http://www.iana.org/assignments/http-authschemes</a>&gt;.
908      </p>
909      <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;<a id="status.code.registration" href="#status.code.registration">Status Code Registration</a></h2>
910      <p id="rfc.section.5.2.p.1">The HTTP Status Code Registry located at &lt;<a href="http://www.iana.org/assignments/http-status-codes">http://www.iana.org/assignments/http-status-codes</a>&gt; shall be updated with the registrations below:
911      </p>
912      <div id="rfc.table.1">
913         <div id="iana.status.code.registration.table"></div>
914         <table class="tt full left" cellpadding="3" cellspacing="0">
915            <thead>
916               <tr>
917                  <th>Value</th>
918                  <th>Description</th>
919                  <th>Reference</th>
920               </tr>
921            </thead>
922            <tbody>
923               <tr>
924                  <td class="left">401</td>
925                  <td class="left">Unauthorized</td>
926                  <td class="left"> <a href="#status.401" id="rfc.xref.status.401.1" title="401 Unauthorized">Section&nbsp;3.1</a> 
927                  </td>
928               </tr>
929               <tr>
930                  <td class="left">407</td>
931                  <td class="left">Proxy Authentication Required</td>
932                  <td class="left"> <a href="#status.407" id="rfc.xref.status.407.1" title="407 Proxy Authentication Required">Section&nbsp;3.2</a> 
933                  </td>
934               </tr>
935            </tbody>
936         </table>
937      </div>
938      <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a>&nbsp;<a id="header.field.registration" href="#header.field.registration">Header Field Registration</a></h2>
939      <p id="rfc.section.5.3.p.1">The Message Header Field Registry located at &lt;<a href="http://www.iana.org/assignments/message-headers/message-header-index.html">http://www.iana.org/assignments/message-headers/message-header-index.html</a>&gt; shall be updated with the permanent registrations below (see <a href="#RFC3864" id="rfc.xref.RFC3864.1"><cite title="Registration Procedures for Message Header Fields">[RFC3864]</cite></a>):
940      </p>
941      <div id="rfc.table.2">
942         <div id="iana.header.registration.table"></div>
943         <table class="tt full left" cellpadding="3" cellspacing="0">
944            <thead>
945               <tr>
946                  <th>Header Field Name</th>
947                  <th>Protocol</th>
948                  <th>Status</th>
949                  <th>Reference</th>
950               </tr>
951            </thead>
952            <tbody>
953               <tr>
954                  <td class="left">Authorization</td>
955                  <td class="left">http</td>
956                  <td class="left">standard</td>
957                  <td class="left"> <a href="#header.authorization" id="rfc.xref.header.authorization.3" title="Authorization">Section&nbsp;4.1</a> 
958                  </td>
959               </tr>
960               <tr>
961                  <td class="left">Proxy-Authenticate</td>
962                  <td class="left">http</td>
963                  <td class="left">standard</td>
964                  <td class="left"> <a href="#header.proxy-authenticate" id="rfc.xref.header.proxy-authenticate.2" title="Proxy-Authenticate">Section&nbsp;4.2</a> 
965                  </td>
966               </tr>
967               <tr>
968                  <td class="left">Proxy-Authorization</td>
969                  <td class="left">http</td>
970                  <td class="left">standard</td>
971                  <td class="left"> <a href="#header.proxy-authorization" id="rfc.xref.header.proxy-authorization.2" title="Proxy-Authorization">Section&nbsp;4.3</a> 
972                  </td>
973               </tr>
974               <tr>
975                  <td class="left">WWW-Authenticate</td>
976                  <td class="left">http</td>
977                  <td class="left">standard</td>
978                  <td class="left"> <a href="#header.www-authenticate" id="rfc.xref.header.www-authenticate.3" title="WWW-Authenticate">Section&nbsp;4.4</a> 
979                  </td>
980               </tr>
981            </tbody>
982         </table>
983      </div>
984      <p id="rfc.section.5.3.p.2">The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".</p>
985      <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="security.considerations" href="#security.considerations">Security Considerations</a></h1>
986      <p id="rfc.section.6.p.1">This section is meant to inform application developers, information providers, and users of the security limitations in HTTP/1.1
987         as described by this document. The discussion does not include definitive solutions to the problems revealed, though it does
988         make some suggestions for reducing security risks.
989      </p>
990      <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;<a id="auth.credentials.and.idle.clients" href="#auth.credentials.and.idle.clients">Authentication Credentials and Idle Clients</a></h2>
991      <p id="rfc.section.6.1.p.1">Existing HTTP clients and user agents typically retain authentication information indefinitely. HTTP/1.1 does not provide
992         a method for a server to direct clients to discard these cached credentials. This is a significant defect that requires further
993         extensions to HTTP. Circumstances under which credential caching can interfere with the application's security model include
994         but are not limited to:
995      </p>
996      <ul>
997         <li>Clients which have been idle for an extended period following which the server might wish to cause the client to reprompt
998            the user for credentials.
999         </li>
1000         <li>Applications which include a session termination indication (such as a "logout" or "commit" button on a page) after which
1001            the server side of the application "knows" that there is no further reason for the client to retain the credentials.
1002         </li>
1003      </ul>
1004      <p id="rfc.section.6.1.p.2">This is currently under separate study. There are a number of work-arounds to parts of this problem, and we encourage the
1005         use of password protection in screen savers, idle time-outs, and other methods which mitigate the security problems inherent
1006         in this problem. In particular, user agents which cache credentials are encouraged to provide a readily accessible mechanism
1007         for discarding cached credentials under user control.
1008      </p>
1009      <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a>&nbsp;<a id="protection.spaces" href="#protection.spaces">Protection Spaces</a></h2>
1010      <p id="rfc.section.6.2.p.1">Authentication schemes that solely rely on the "realm" mechanism for establishing a protection space will expose credentials
1011         to all resources on a server. Clients that have successfully made authenticated requests with a resource can use the same
1012         authentication credentials for other resources on the same server. This makes it possible for a different resource to harvest
1013         authentication credentials for other resources.
1014      </p>
1015      <p id="rfc.section.6.2.p.2">This is of particular concern when a server hosts resources for multiple parties under the same canonical root URI (<a href="#protection.spaces" title="Protection Spaces">Section&nbsp;6.2</a>). Possible mitigation strategies include restricting direct access to authentication credentials (i.e., not making the content
1016         of the Authorization request header field available), and separating protection spaces by using a different host name for
1017         each party.
1018      </p>
1019      <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a id="acks" href="#acks">Acknowledgments</a></h1>
1020      <p id="rfc.section.7.p.1">This specification takes over the definition of the HTTP Authentication Framework, previously defined in <cite title="HTTP Authentication: Basic and Digest Access Authentication" id="rfc.xref.RFC2617.3">RFC 2617</cite>. We thank John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. Lawrence, Paul J. Leach, Ari Luotonen, and
1021         Lawrence C. Stewart for their work on that specification. See <a href="http://tools.ietf.org/html/rfc2617#section-6">Section 6</a> of <a href="#RFC2617" id="rfc.xref.RFC2617.4"><cite title="HTTP Authentication: Basic and Digest Access Authentication">[RFC2617]</cite></a> for further acknowledgements.
1022      </p>
1023      <p id="rfc.section.7.p.2">See <a href="p1-messaging.html#acks" title="Acknowledgments">Section 9</a> of <a href="#Part1" id="rfc.xref.Part1.12"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> for the Acknowledgments related to this document revision.
1024      </p>
1025      <h1 id="rfc.references"><a id="rfc.section.8" href="#rfc.section.8">8.</a> References
1026      </h1>
1027      <h2 id="rfc.references.1"><a href="#rfc.section.8.1" id="rfc.section.8.1">8.1</a> Normative References
1028      </h2>
1029      <table>         
1030         <tr>
1031            <td class="reference"><b id="Part1">[Part1]</b></td>
1032            <td class="top"><a href="mailto:fielding@gbiv.com" title="Adobe Systems Incorporated">Fielding, R., Ed.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-latest">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p1-messaging-latest (work in progress), July&nbsp;2012.
1033            </td>
1034         </tr>
1035         <tr>
1036            <td class="reference"><b id="Part2">[Part2]</b></td>
1037            <td class="top"><a href="mailto:fielding@gbiv.com" title="Adobe Systems Incorporated">Fielding, R., Ed.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-latest">HTTP/1.1, part 2: Message Semantics</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p2-semantics-latest (work in progress), July&nbsp;2012.
1038            </td>
1039         </tr>
1040         <tr>
1041            <td class="reference"><b id="Part6">[Part6]</b></td>
1042            <td class="top"><a href="mailto:fielding@gbiv.com" title="Adobe Systems Incorporated">Fielding, R., Ed.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, <a href="mailto:mnot@mnot.net" title="Rackspace">Nottingham, M., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-latest">HTTP/1.1, part 6: Caching</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p6-cache-latest (work in progress), July&nbsp;2012.
1043            </td>
1044         </tr>
1045         <tr>
1046            <td class="reference"><b id="RFC2119">[RFC2119]</b></td>
1047            <td class="top"><a href="mailto:sob@harvard.edu" title="Harvard University">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.
1048            </td>
1049         </tr>
1050         <tr>
1051            <td class="reference"><b id="RFC5234">[RFC5234]</b></td>
1052            <td class="top"><a href="mailto:dcrocker@bbiw.net" title="Brandenburg InternetWorking">Crocker, D., Ed.</a> and <a href="mailto:paul.overell@thus.net" title="THUS plc.">P. Overell</a>, “<a href="http://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>”, STD&nbsp;68, RFC&nbsp;5234, January&nbsp;2008.
1053            </td>
1054         </tr>
1055      </table>
1056      <h2 id="rfc.references.2"><a href="#rfc.section.8.2" id="rfc.section.8.2">8.2</a> Informative References
1057      </h2>
1058      <table>           
1059         <tr>
1060            <td class="reference"><b id="RFC2616">[RFC2616]</b></td>
1061            <td class="top"><a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine">Fielding, R.</a>, <a href="mailto:jg@w3.org" title="W3C">Gettys, J.</a>, <a href="mailto:mogul@wrl.dec.com" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="mailto:frystyk@w3.org" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="mailto:masinter@parc.xerox.com" title="Xerox Corporation">Masinter, L.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, and <a href="mailto:timbl@w3.org" title="W3C">T. Berners-Lee</a>, “<a href="http://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2616, June&nbsp;1999.
1062            </td>
1063         </tr>
1064         <tr>
1065            <td class="reference"><b id="RFC2617">[RFC2617]</b></td>
1066            <td class="top"><a href="mailto:john@math.nwu.edu" title="Northwestern University, Department of Mathematics">Franks, J.</a>, <a href="mailto:pbaker@verisign.com" title="Verisign Inc.">Hallam-Baker, P.</a>, <a href="mailto:jeff@AbiSource.com" title="AbiSource, Inc.">Hostetler, J.</a>, <a href="mailto:lawrence@agranat.com" title="Agranat Systems, Inc.">Lawrence, S.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, Luotonen, A., and <a href="mailto:stewart@OpenMarket.com" title="Open Market, Inc.">L. Stewart</a>, “<a href="http://tools.ietf.org/html/rfc2617">HTTP Authentication: Basic and Digest Access Authentication</a>”, RFC&nbsp;2617, June&nbsp;1999.
1067            </td>
1068         </tr>
1069         <tr>
1070            <td class="reference"><b id="RFC3864">[RFC3864]</b></td>
1071            <td class="top"><a href="mailto:GK-IETF@ninebynine.org" title="Nine by Nine">Klyne, G.</a>, <a href="mailto:mnot@pobox.com" title="BEA Systems">Nottingham, M.</a>, and <a href="mailto:JeffMogul@acm.org" title="HP Labs">J. Mogul</a>, “<a href="http://tools.ietf.org/html/rfc3864">Registration Procedures for Message Header Fields</a>”, BCP&nbsp;90, RFC&nbsp;3864, September&nbsp;2004.
1072            </td>
1073         </tr>
1074         <tr>
1075            <td class="reference"><b id="RFC3986">[RFC3986]</b></td>
1076            <td class="top"><a href="mailto:timbl@w3.org" title="World Wide Web Consortium">Berners-Lee, T.</a>, <a href="mailto:fielding@gbiv.com" title="Day Software">Fielding, R.</a>, and <a href="mailto:LMM@acm.org" title="Adobe Systems Incorporated">L. Masinter</a>, “<a href="http://tools.ietf.org/html/rfc3986">Uniform Resource Identifier (URI): Generic Syntax</a>”, STD&nbsp;66, RFC&nbsp;3986, January&nbsp;2005.
1077            </td>
1078         </tr>
1079         <tr>
1080            <td class="reference"><b id="RFC4648">[RFC4648]</b></td>
1081            <td class="top">Josefsson, S., “<a href="http://tools.ietf.org/html/rfc4648">The Base16, Base32, and Base64 Data Encodings</a>”, RFC&nbsp;4648, October&nbsp;2006.
1082            </td>
1083         </tr>
1084         <tr>
1085            <td class="reference"><b id="RFC5226">[RFC5226]</b></td>
1086            <td class="top"><a href="mailto:narten@us.ibm.com" title="IBM">Narten, T.</a> and <a href="mailto:Harald@Alvestrand.no" title="Google">H. Alvestrand</a>, “<a href="http://tools.ietf.org/html/rfc5226">Guidelines for Writing an IANA Considerations Section in RFCs</a>”, BCP&nbsp;26, RFC&nbsp;5226, May&nbsp;2008.
1087            </td>
1088         </tr>
1089      </table>
1090      <div class="avoidbreak">
1091         <h1 id="rfc.authors"><a href="#rfc.authors">Authors' Addresses</a></h1>
1092         <address class="vcard"><span class="vcardline"><span class="fn">Roy T. Fielding</span>
1093               (editor)
1094               <span class="n hidden"><span class="family-name">Fielding</span><span class="given-name">Roy T.</span></span></span><span class="org vcardline">Adobe Systems Incorporated</span><span class="adr"><span class="street-address vcardline">345 Park Ave</span><span class="vcardline"><span class="locality">San Jose</span>, <span class="region">CA</span>&nbsp;<span class="postal-code">95110</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">Email: <a href="mailto:fielding@gbiv.com"><span class="email">fielding@gbiv.com</span></a></span><span class="vcardline">URI: <a href="http://roy.gbiv.com/" class="url">http://roy.gbiv.com/</a></span></address>
1095         <address class="vcard"><span class="vcardline"><span class="fn">Yves Lafon</span>
1096               (editor)
1097               <span class="n hidden"><span class="family-name">Lafon</span><span class="given-name">Yves</span></span></span><span class="org vcardline">World Wide Web Consortium</span><span class="adr"><span class="street-address vcardline">W3C / ERCIM</span><span class="street-address vcardline">2004, rte des Lucioles</span><span class="vcardline"><span class="locality">Sophia-Antipolis</span>, <span class="region">AM</span>&nbsp;<span class="postal-code">06902</span></span><span class="country-name vcardline">France</span></span><span class="vcardline">Email: <a href="mailto:ylafon@w3.org"><span class="email">ylafon@w3.org</span></a></span><span class="vcardline">URI: <a href="http://www.raubacapeu.net/people/yves/" class="url">http://www.raubacapeu.net/people/yves/</a></span></address>
1098         <address class="vcard"><span class="vcardline"><span class="fn">Julian F. Reschke</span>
1099               (editor)
1100               <span class="n hidden"><span class="family-name">Reschke</span><span class="given-name">Julian F.</span></span></span><span class="org vcardline">greenbytes GmbH</span><span class="adr"><span class="street-address vcardline">Hafenweg 16</span><span class="vcardline"><span class="locality">Muenster</span>, <span class="region">NW</span>&nbsp;<span class="postal-code">48155</span></span><span class="country-name vcardline">Germany</span></span><span class="vcardline">Email: <a href="mailto:julian.reschke@greenbytes.de"><span class="email">julian.reschke@greenbytes.de</span></a></span><span class="vcardline">URI: <a href="http://greenbytes.de/tech/webdav/" class="url">http://greenbytes.de/tech/webdav/</a></span></address>
1101      </div>
1102      <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFCs 2616 and 2617</a></h1>
1103      <p id="rfc.section.A.p.1">The "realm" parameter isn't required anymore in general; consequently, the ABNF allows challenges without any auth parameters.
1104         (<a href="#access.authentication.framework" title="Access Authentication Framework">Section&nbsp;2</a>)
1105      </p>
1106      <p id="rfc.section.A.p.2">The "b64token" alternative to auth-param lists has been added for consistency with legacy authentication schemes such as "Basic".
1107         (<a href="#access.authentication.framework" title="Access Authentication Framework">Section&nbsp;2</a>)
1108      </p>
1109      <p id="rfc.section.A.p.3">Change ABNF productions for header fields to only define the field value. (<a href="#header.field.definitions" title="Header Field Definitions">Section&nbsp;4</a>)
1110      </p>
1111      <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1>
1112      <div id="rfc.figure.u.10"></div> <pre class="inline"><a href="#header.authorization" class="smpl">Authorization</a> = credentials
1113
1114<a href="#core.rules" class="smpl">BWS</a> = &lt;BWS, defined in [Part1], Section 3.2.1&gt;
1115
1116<a href="#core.rules" class="smpl">OWS</a> = &lt;OWS, defined in [Part1], Section 3.2.1&gt;
1117
1118<a href="#header.proxy-authenticate" class="smpl">Proxy-Authenticate</a> = *( "," OWS ) challenge *( OWS "," [ OWS
1119 challenge ] )
1120<a href="#header.proxy-authorization" class="smpl">Proxy-Authorization</a> = credentials
1121
1122<a href="#header.www-authenticate" class="smpl">WWW-Authenticate</a> = *( "," OWS ) challenge *( OWS "," [ OWS challenge
1123 ] )
1124
1125<a href="#challenge.and.response" class="smpl">auth-param</a> = token BWS "=" BWS ( token / quoted-string )
1126<a href="#challenge.and.response" class="smpl">auth-scheme</a> = token
1127
1128<a href="#challenge.and.response" class="smpl">b64token</a> = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" )
1129 *"="
1130
1131<a href="#challenge.and.response" class="smpl">challenge</a> = auth-scheme [ 1*SP ( b64token / [ ( "," / auth-param ) *(
1132 OWS "," [ OWS auth-param ] ) ] ) ]
1133<a href="#challenge.and.response" class="smpl">credentials</a> = auth-scheme [ 1*SP ( b64token / [ ( "," / auth-param )
1134 *( OWS "," [ OWS auth-param ] ) ] ) ]
1135
1136<a href="#core.rules" class="smpl">quoted-string</a> = &lt;quoted-string, defined in [Part1], Section 3.2.4&gt;
1137
1138<a href="#core.rules" class="smpl">token</a> = &lt;token, defined in [Part1], Section 3.2.4&gt;
1139</pre> <div id="rfc.figure.u.11"></div>
1140      <p>ABNF diagnostics:</p><pre class="inline">; Authorization defined but not used
1141; Proxy-Authenticate defined but not used
1142; Proxy-Authorization defined but not used
1143; WWW-Authenticate defined but not used
1144</pre><h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a id="change.log" href="#change.log">Change Log (to be removed by RFC Editor before publication)</a></h1>
1145      <p id="rfc.section.C.p.1">Changes up to the first Working Group Last Call draft are summarized in &lt;<a href="http://trac.tools.ietf.org/html/draft-ietf-httpbis-p7-auth-19#appendix-C">http://trac.tools.ietf.org/html/draft-ietf-httpbis-p7-auth-19#appendix-C</a>&gt;.
1146      </p>
1147      <h2 id="rfc.section.C.1"><a href="#rfc.section.C.1">C.1</a>&nbsp;<a id="changes.since.19" href="#changes.since.19">Since draft-ietf-httpbis-p7-auth-19</a></h2>
1148      <p id="rfc.section.C.1.p.1">Closed issues: </p>
1149      <ul>
1150         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/348">http://tools.ietf.org/wg/httpbis/trac/ticket/348</a>&gt;: "Realms and scope"
1151         </li>
1152         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/349">http://tools.ietf.org/wg/httpbis/trac/ticket/349</a>&gt;: "Strength"
1153         </li>
1154         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/357">http://tools.ietf.org/wg/httpbis/trac/ticket/357</a>&gt;: "Authentication exchanges"
1155         </li>
1156         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/361">http://tools.ietf.org/wg/httpbis/trac/ticket/361</a>&gt;: "ABNF requirements for recipients"
1157         </li>
1158      </ul>
1159      <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1>
1160      <p class="noprint"><a href="#rfc.index.4">4</a> <a href="#rfc.index.A">A</a> <a href="#rfc.index.B">B</a> <a href="#rfc.index.C">C</a> <a href="#rfc.index.G">G</a> <a href="#rfc.index.H">H</a> <a href="#rfc.index.P">P</a> <a href="#rfc.index.R">R</a> <a href="#rfc.index.S">S</a> <a href="#rfc.index.W">W</a> 
1161      </p>
1162      <div class="print2col">
1163         <ul class="ind">
1164            <li><a id="rfc.index.4" href="#rfc.index.4"><b>4</b></a><ul>
1165                  <li>401 Unauthorized (status code)&nbsp;&nbsp;<a href="#rfc.iref.13"><b>3.1</b></a>, <a href="#rfc.xref.status.401.1">5.2</a></li>
1166                  <li>407 Proxy Authentication Required (status code)&nbsp;&nbsp;<a href="#rfc.iref.14"><b>3.2</b></a>, <a href="#rfc.xref.status.407.1">5.2</a></li>
1167               </ul>
1168            </li>
1169            <li><a id="rfc.index.A" href="#rfc.index.A"><b>A</b></a><ul>
1170                  <li><tt>auth-param</tt>&nbsp;&nbsp;<a href="#rfc.iref.a.2"><b>2.1</b></a></li>
1171                  <li><tt>auth-scheme</tt>&nbsp;&nbsp;<a href="#rfc.iref.a.1"><b>2.1</b></a></li>
1172                  <li>Authorization header field&nbsp;&nbsp;<a href="#rfc.xref.header.authorization.1">2.1</a>, <a href="#rfc.xref.header.authorization.2">3.1</a>, <a href="#rfc.iref.a.3"><b>4.1</b></a>, <a href="#rfc.xref.header.authorization.3">5.3</a></li>
1173               </ul>
1174            </li>
1175            <li><a id="rfc.index.B" href="#rfc.index.B"><b>B</b></a><ul>
1176                  <li><tt>b64token</tt>&nbsp;&nbsp;<a href="#rfc.iref.b.1"><b>2.1</b></a></li>
1177               </ul>
1178            </li>
1179            <li><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul>
1180                  <li>Canonical Root URI&nbsp;&nbsp;<a href="#rfc.iref.c.3">2.2</a></li>
1181                  <li><tt>challenge</tt>&nbsp;&nbsp;<a href="#rfc.iref.c.1"><b>2.1</b></a></li>
1182                  <li><tt>credentials</tt>&nbsp;&nbsp;<a href="#rfc.iref.c.2"><b>2.1</b></a></li>
1183               </ul>
1184            </li>
1185            <li><a id="rfc.index.G" href="#rfc.index.G"><b>G</b></a><ul>
1186                  <li><tt>Grammar</tt>&nbsp;&nbsp;
1187                     <ul>
1188                        <li><tt>auth-param</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.2"><b>2.1</b></a></li>
1189                        <li><tt>auth-scheme</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.1"><b>2.1</b></a></li>
1190                        <li><tt>Authorization</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.6"><b>4.1</b></a></li>
1191                        <li><tt>b64token</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.3"><b>2.1</b></a></li>
1192                        <li><tt>challenge</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.4"><b>2.1</b></a></li>
1193                        <li><tt>credentials</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.5"><b>2.1</b></a></li>
1194                        <li><tt>Proxy-Authenticate</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.7"><b>4.2</b></a></li>
1195                        <li><tt>Proxy-Authorization</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.8"><b>4.3</b></a></li>
1196                        <li><tt>WWW-Authenticate</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.9"><b>4.4</b></a></li>
1197                     </ul>
1198                  </li>
1199               </ul>
1200            </li>
1201            <li><a id="rfc.index.H" href="#rfc.index.H"><b>H</b></a><ul>
1202                  <li>Header Fields&nbsp;&nbsp;
1203                     <ul>
1204                        <li>Authorization&nbsp;&nbsp;<a href="#rfc.xref.header.authorization.1">2.1</a>, <a href="#rfc.xref.header.authorization.2">3.1</a>, <a href="#rfc.iref.h.1"><b>4.1</b></a>, <a href="#rfc.xref.header.authorization.3">5.3</a></li>
1205                        <li>Proxy-Authenticate&nbsp;&nbsp;<a href="#rfc.xref.header.proxy-authenticate.1">3.2</a>, <a href="#rfc.iref.h.2"><b>4.2</b></a>, <a href="#rfc.xref.header.proxy-authenticate.2">5.3</a></li>
1206                        <li>Proxy-Authorization&nbsp;&nbsp;<a href="#rfc.xref.header.proxy-authorization.1">3.2</a>, <a href="#rfc.iref.h.3"><b>4.3</b></a>, <a href="#rfc.xref.header.proxy-authorization.2">5.3</a></li>
1207                        <li>WWW-Authenticate&nbsp;&nbsp;<a href="#rfc.xref.header.www-authenticate.1">3.1</a>, <a href="#rfc.xref.header.www-authenticate.2">4.2</a>, <a href="#rfc.iref.h.4"><b>4.4</b></a>, <a href="#rfc.xref.header.www-authenticate.3">5.3</a></li>
1208                     </ul>
1209                  </li>
1210               </ul>
1211            </li>
1212            <li><a id="rfc.index.P" href="#rfc.index.P"><b>P</b></a><ul>
1213                  <li><em>Part1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.1">1.1</a>, <a href="#rfc.xref.Part1.2">1.2</a>, <a href="#rfc.xref.Part1.3">1.2.1</a>, <a href="#rfc.xref.Part1.4">1.2.1</a>, <a href="#rfc.xref.Part1.5">1.2.1</a>, <a href="#rfc.xref.Part1.6">1.2.1</a>, <a href="#rfc.xref.Part1.7">1.2.1</a>, <a href="#rfc.xref.Part1.8">2.2</a>, <a href="#rfc.xref.Part1.9">2.3.1</a>, <a href="#rfc.xref.Part1.10">4.2</a>, <a href="#rfc.xref.Part1.11">4.4</a>, <a href="#rfc.xref.Part1.12">7</a>, <a href="#Part1"><b>8.1</b></a><ul>
1214                        <li><em>Section 1.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.2">1.2</a></li>
1215                        <li><em>Section 2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.1">1.1</a></li>
1216                        <li><em>Section 2.3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.9">2.3.1</a></li>
1217                        <li><em>Section 3.2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.4">1.2.1</a>, <a href="#rfc.xref.Part1.5">1.2.1</a></li>
1218                        <li><em>Section 3.2.4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.6">1.2.1</a>, <a href="#rfc.xref.Part1.7">1.2.1</a></li>
1219                        <li><em>Section 5.5</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.8">2.2</a>, <a href="#rfc.xref.Part1.10">4.2</a>, <a href="#rfc.xref.Part1.11">4.4</a></li>
1220                        <li><em>Section 9</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.12">7</a></li>
1221                     </ul>
1222                  </li>
1223                  <li><em>Part2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part2.1">2.1</a>, <a href="#Part2"><b>8.1</b></a><ul>
1224                        <li><em>Section 4.6.3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part2.1">2.1</a></li>
1225                     </ul>
1226                  </li>
1227                  <li><em>Part6</em>&nbsp;&nbsp;<a href="#rfc.xref.Part6.1">4.1</a>, <a href="#Part6"><b>8.1</b></a><ul>
1228                        <li><em>Section 1.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part6.1">4.1</a></li>
1229                     </ul>
1230                  </li>
1231                  <li>Protection Space&nbsp;&nbsp;<a href="#rfc.iref.p.1">2.2</a></li>
1232                  <li>Proxy-Authenticate header field&nbsp;&nbsp;<a href="#rfc.xref.header.proxy-authenticate.1">3.2</a>, <a href="#rfc.iref.p.2"><b>4.2</b></a>, <a href="#rfc.xref.header.proxy-authenticate.2">5.3</a></li>
1233                  <li>Proxy-Authorization header field&nbsp;&nbsp;<a href="#rfc.xref.header.proxy-authorization.1">3.2</a>, <a href="#rfc.iref.p.3"><b>4.3</b></a>, <a href="#rfc.xref.header.proxy-authorization.2">5.3</a></li>
1234               </ul>
1235            </li>
1236            <li><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul>
1237                  <li>Realm&nbsp;&nbsp;<a href="#rfc.iref.r.1">2.2</a></li>
1238                  <li><em>RFC2119</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2119.1">1.1</a>, <a href="#RFC2119"><b>8.1</b></a></li>
1239                  <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">1</a>, <a href="#rfc.xref.RFC2616.2">1</a>, <a href="#RFC2616"><b>8.2</b></a></li>
1240                  <li><em>RFC2617</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2617.1">1</a>, <a href="#rfc.xref.RFC2617.2">1</a>, <a href="#rfc.xref.RFC2617.3">7</a>, <a href="#rfc.xref.RFC2617.4">7</a>, <a href="#RFC2617"><b>8.2</b></a><ul>
1241                        <li><em>Section 6</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2617.4">7</a></li>
1242                     </ul>
1243                  </li>
1244                  <li><em>RFC3864</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC3864.1">5.3</a>, <a href="#RFC3864"><b>8.2</b></a></li>
1245                  <li><em>RFC3986</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC3986.1">2.1</a>, <a href="#RFC3986"><b>8.2</b></a></li>
1246                  <li><em>RFC4648</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC4648.1">2.1</a>, <a href="#RFC4648"><b>8.2</b></a></li>
1247                  <li><em>RFC5226</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5226.1">2.3</a>, <a href="#RFC5226"><b>8.2</b></a><ul>
1248                        <li><em>Section 4.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5226.1">2.3</a></li>
1249                     </ul>
1250                  </li>
1251                  <li><em>RFC5234</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5234.1">1.2</a>, <a href="#rfc.xref.RFC5234.2">1.2</a>, <a href="#RFC5234"><b>8.1</b></a><ul>
1252                        <li><em>Appendix B.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5234.2">1.2</a></li>
1253                     </ul>
1254                  </li>
1255               </ul>
1256            </li>
1257            <li><a id="rfc.index.S" href="#rfc.index.S"><b>S</b></a><ul>
1258                  <li>Status Codes&nbsp;&nbsp;
1259                     <ul>
1260                        <li>401 Unauthorized&nbsp;&nbsp;<a href="#rfc.iref.s.1"><b>3.1</b></a>, <a href="#rfc.xref.status.401.1">5.2</a></li>
1261                        <li>407 Proxy Authentication Required&nbsp;&nbsp;<a href="#rfc.iref.s.2"><b>3.2</b></a>, <a href="#rfc.xref.status.407.1">5.2</a></li>
1262                     </ul>
1263                  </li>
1264               </ul>
1265            </li>
1266            <li><a id="rfc.index.W" href="#rfc.index.W"><b>W</b></a><ul>
1267                  <li>WWW-Authenticate header field&nbsp;&nbsp;<a href="#rfc.xref.header.www-authenticate.1">3.1</a>, <a href="#rfc.xref.header.www-authenticate.2">4.2</a>, <a href="#rfc.iref.w.1"><b>4.4</b></a>, <a href="#rfc.xref.header.www-authenticate.3">5.3</a></li>
1268               </ul>
1269            </li>
1270         </ul>
1271      </div>
1272   </body>
1273</html>
Note: See TracBrowser for help on using the repository browser.