idnits 2.17.00 (12 Aug 2021) /tmp/idnits56340/draft-nottingham-http-portal-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 5, 2010) is 4306 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft August 5, 2010 4 Intended status: Informational 5 Expires: February 6, 2011 7 Considerations for Captive Portals in HTTP 8 draft-nottingham-http-portal-00 10 Abstract 12 "Captive portals" are a commonly-deployed means of obtaining access 13 credentials and/or payment for a network. This memo discusses issues 14 of their use for HTTP applications, and proposes one possible 15 mitigation strategy. 17 This memo should be discussed on the ietf-http-wg@w3.org mailing 18 list, although it is not a work item of the HTTPbis WG. 20 Status of this Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on February 6, 2011. 37 Copyright Notice 39 Copyright (c) 2010 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 2. HTTP Issues Encountered . . . . . . . . . . . . . . . . . . . . 3 56 3. Proposal . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 4. What about Non-HTTP Applications and Techniques? . . . . . . . 5 58 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 59 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6 60 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . . 6 61 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 6 63 1. Introduction 65 It has become common for networks to require authentication, payment 66 and/or acceptance of terms of service before granting access. 67 Typically, this occurs when accessing "public" networks such as those 68 in hotels, trains, conference centres and similar networks. 70 While there are several potential means of providing credentials to a 71 network, these are not yet universally supported, and in some 72 instances the network administrator requires that information (e.g., 73 terms of service, login information) be displayed to end users. 75 In such cases, it has become widespread practice to use a "captive 76 portal" that diverts HTTP requests to the administrator's web page. 77 Once the user has satisfied requirements (e.g., for payment, 78 acceptance of terms), the diversion is ended and "normal" access to 79 the network is allowed. 81 Typically, this diversion is accomplished by one of several possible 82 techniques; 83 o IP interception - all requests on port 80 are intercepted and send 84 to the portal. 85 o HTTP redirects - all requests on port 80 are intercepted and an 86 HTTP redirect to the portal's URL is returned. 87 o DNS interception - all DNS lookups return the portal's IP address. 89 In each case, the intent is that users connecting to the network will 90 open a Web browser and see the portal. 92 This memo examines the HTTP-related issues that these techniques 93 raise, and proposes a potential mitigation strategy. 95 2. HTTP Issues Encountered 97 Since clients cannot differentiate between a portal's response and 98 that of the HTTP server that they intended to communicate with, a 99 number of issues arise. 101 One example is the "favicon.ico" 102 commonly used by browsers to 103 identify the site being accessed. If the favicon for a given site is 104 fetched from a captive portal instead of the intended site (e.g., 105 because the user is unauthenticated), it will often "stick" in the 106 browser's cache (most implementations cache favicons aggressively) 107 beyond the portal session, so that it seems as if the portal's 108 favicon has "taken over" the legitimate site. 110 Another browser-based issue comes about when P3P 111 is supported. Depending on how it is 112 implemented, it's possible a browser might interpret a portal's 113 response for the p3p.xml file as the server's, resulting in the 114 privacy policy (or lack thereof) advertised by the portal being 115 interpreted as applying to the intended site. Other Web-based 116 protocols such as WebFinger 117 , CORS 118 and OAuth 119 may also be 120 vulnerable to such issues. 122 Although HTTP is most widely used with Web browsers, a growing number 123 of non-browsing applications use it as a substrate protocol. For 124 example, WebDAV and CalDAV 125 both use HTTP as the basis (for 126 network filesystem access and calendaring, respectively). Using 127 these applications from behind a captive portal can result in 128 spurious errors being presented to the user, and might result in 129 content corruption, in extreme cases. 131 Similarly, other non-browser applications using HTTP can be affected 132 as well; e.g., widgets , software 133 updates, and other specialised software such as Twitter clients and 134 the iTunes Music Store. 136 It should be noted that it's sometimes believed that using HTTP 137 redirection to direct traffic to the portal addresses these issues. 138 However, since many of these uses "follow" redirects, this is not a 139 good solution. 141 3. Proposal 143 The heart of the issues seen is that the client doesn't understand 144 that a response from the portal does not represent the requested 145 resource. 147 As such, the response needs to indicate that it is non-authoritative. 149 In HTTP, response status codes indicate the type of response, and 150 therefore defining a new one is the most appropriate way to do this. 151 Status codes are divided into general classes; 152 1xx - Informational 153 2xx - Successful 154 3xx - Redirection 155 4xx - Client errors 156 5xx - Server errors 158 Although it's common for captive portals to use redirection status 159 codes, defining a new 3xx code for them isn't practical; current 160 implementations won't recognise the new status code, and therefore 161 won't follow it. 163 Error status codes, on the other hand, have a nice property in that 164 browsers will generally display the response content if they don't 165 understand the status code. The one exception to this is Internet 166 Explorer, which will display a "friendly" message if the response 167 body is too small; however, this is easy enough to work around, by 168 padding the response message as necessary. 170 HTTP defines 4xx status codes as those where the error lies in the 171 client; i.e., the client shouldn't retry the same request without 172 changing something. This is arguably more appropriate than using a 173 5xx error, where the error is said to lie in the server's area of 174 responsibility, because clients might automatically retry a request 175 upon seeing a 5xx error. 177 In fact, there's already an existing status code with similar (but 178 not quite suitable) semantics; 407 Proxy Authentication Required. 179 What's needed is a new status code with the semantics of "Network 180 Authentication Required." 182 As such, this memo proposes (but does not yet define) using a new 183 HTTP response status code in the 4xx range with the semantics 184 "Network Authentication Required" to mitigate the risks of captive 185 portals. 187 Captive portals that deploy this status code will return it for all 188 requests other than those to the actual portal resources (e.g., 189 images). Clients that are unaware of the specific semantics of the 190 new status code will fall back to treating it as a generic 400 error, 191 and browsers will display the portal page to users. 193 Note that this would make the HTTP redirection technique described 194 above obsolete; the portal page would be served directly with the new 195 status code. 197 4. What about Non-HTTP Applications and Techniques? 199 This memo does not address non-HTTP applications, such as IMAP, POP, 200 or even TLS-encapsulated HTTP. Since captive portals almost always 201 target Web browsers (has anyone ever seen one that inserts an e-mail 202 into your inbox asking you to authenticate?), this is appropriate. 204 Instead, it is anticipated that well-behaved portals will block all 205 non-HTTP ports (especially port 443) until the user has successfully 206 authenticated. 208 Overall, there may also be an interesting discussion to be had about 209 improving network access methods to the point where a user interface 210 can be presented for the same purposes, without resorting to 211 intercepting HTTP traffic. However, since such a mechanism would by 212 necessity require modifying the network stack and operating system of 213 the client, this memo takes a more modest approach. 215 5. Security Considerations 217 This memo does not (yet) define any protocol elements, and therefore 218 does not (yet) have any security considerations. 220 6. IANA Considerations 222 This document has no actions for IANA. 224 Appendix A. Acknowledgements 226 The author takes all responsibility for errors and omissions. 228 Author's Address 230 Mark Nottingham 232 Email: mnot@mnot.net 233 URI: http://www.mnot.net/