idnits 2.17.1 draft-wkumari-dhc-capport-08.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 (January 27, 2015) is 3377 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'RFC2939' is mentioned on line 322, but not defined Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group W. Kumari 3 Internet-Draft Google 4 Intended status: Informational O. Gudmundsson 5 Expires: July 31, 2015 Shinkuro Inc. 6 P. Ebersman 7 Comcast 8 S. Sheng 9 ICANN 10 January 27, 2015 12 Captive-Portal identification in DHCPv4 / RA 13 draft-wkumari-dhc-capport-08 15 Abstract 17 In many environments offering short-term or temporary Internet access 18 (such as coffee shops), it is common to start new connections in a 19 captive portal mode. This highly restricts what the customer can do 20 until the customer has authenticated. 22 This document describes a DHCPv4 option (and an IPv6 RA extension) to 23 inform clients that they are behind some sort of captive portal 24 device, and that they will need to authenticate to get Internet 25 Access. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on July 31, 2015. 44 Copyright Notice 46 Copyright (c) 2015 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 62 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3 63 2. Background . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 2.1. DNS Redirection . . . . . . . . . . . . . . . . . . . . . 4 65 2.2. HTTP Redirection . . . . . . . . . . . . . . . . . . . . 4 66 2.3. IP Hijacking . . . . . . . . . . . . . . . . . . . . . . 4 67 3. The Captive-Portal IPv4 DHCP Option . . . . . . . . . . . . . 4 68 4. The Captive-Portal IPv6 RA Option . . . . . . . . . . . . . . 5 69 5. Use of the Captive-Portal Option . . . . . . . . . . . . . . 6 70 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 71 7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 72 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 73 9. Normative References . . . . . . . . . . . . . . . . . . . . 8 74 Appendix A. Changes / Author Notes. . . . . . . . . . . . . . . 8 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 77 1. Introduction 79 In many environments, users need to connect to a captive portal 80 device and agree to an acceptable use policy and / or provide billing 81 information before they can access the Internet. 83 Many devices perform DNS, HHTP, and / or IP hijacks in order to 84 present the user with the captive portal web page. These kludgy 85 workarounds and techniques resemble attacks that DNSSEC and TLS are 86 intended to protect against. This document describes a DHCPv4 option 87 (Captive Portal) and an IPv6 Router Advertisement (RA) extension that 88 informs clients that they are behind a captive portal device and how 89 to contact it. 91 This document neither condones nor condemns the use of captive 92 portals; instead, it recognises that their apparent necessity, and 93 attempts to improve the user experience. 95 [ Ed note: This solution complements 802.11U / WiFi Passpoint. It 96 can be quickly and easily deployed, and works on wired as well ] 98 1.1. Requirements notation 100 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 101 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 102 document are to be interpreted as described in [RFC2119]. 104 2. Background 106 Some ISPs implement a captive portal (CP) - a system that intercepts 107 user requests and redirects them to an interstitial login page - in 108 order to require the user accept an Acceptable Use Policy (AUP), 109 provide billing information, or otherwise authenticate a user prior 110 to allowing them to access the Internet. 112 Captive portals intercept and redirect user requests in a number of 113 ways, including: 115 o DNS Redirection 117 o IP Redirection 119 o HTTP Redirection 121 o Restricted scope addresses 123 o Traffic blocking (until the user is authenticated) 125 In order to ensure that the user is unable to access the Internet 126 until they have satisfied the requirements, captive portals usually 127 implement IP based filters, or place the user into a restricted VLAN 128 (or restricted IP range) until after they have been authorized / 129 satisfied. 131 These techniques are very similar to attacks that protocols (such as 132 VPNs, DNSSEC, TLS) are designed to protect against. The interaction 133 of these protections and the interception leads to poor user 134 experiences, such as long timeouts, inability to reach the captive 135 portal web page, etc. The interception may also leak user 136 information (for example, if the captive portal intercepts and logs 137 an HTTP Cookie, or URL of the form http://fred:password@example.com). 138 The user is often unaware of what is causing the issue (their browser 139 appears to hang, saying something like "Downloading Proxy Script", or 140 simply "The Internet doesn't work"), and they become frustrated. 141 This may result in them not purchasing the Internet access provided 142 by the captive portal. The connectivity attempts may also facilitate 143 OS fingerprinting even before a client attempts to connect to the 144 portal itself. 146 2.1. DNS Redirection 148 The CP either intercepts all DNS traffic or advertises itself (for 149 example using DHCP) as the recursive server for the network. Until 150 the user has authenticated to the captive portal, the CP responds to 151 all DNS requests listing the address of its web portal. Once the 152 user has authenticated, the CP returns the "correct" addresses. 154 This technique has many shortcomings. It fails if the client is 155 performing DNSSEC validation, is running their own resolver, is using 156 a VPN, or already has the DNS information cached. 158 2.2. HTTP Redirection 160 In this implementation, the CP acts like a transparent HTTP proxy; 161 but when it sees an HTTP request from an unauthenticated client using 162 HTTP/1.0, it intercepts the request and responds with an HTTP status 163 code 302 to redirect the client to the Captive Portal Login. If the 164 client is using HTTP/1.1, we respond with a status code 303 See 165 Other. 167 This technique has a number of issues, including: 169 o It fails if the user is only using HTTPS. 171 o It exposes various private user information, such as HTTP Cookies, 172 etc. 174 o It doesn't work if the client has a VPN and / or proxies their web 175 traffic to an external web proxy. 177 2.3. IP Hijacking 179 In this scenario, the captive portal intercepts connections to any IP 180 address. It spoofs the destination IP address and "pretends" to be 181 whatever the user tried to access. 183 This technique has issues similar to the HTTP solution, but may also 184 break other protocols, and may expose more of the user's private 185 information. 187 3. The Captive-Portal IPv4 DHCP Option 189 The Captive Portal DHCP Option (TBA1) informs an IPv4 client that it 190 is behind a captive portal and provides the URI to access an 191 authentication page. This is primarily intended to improve the user 192 experience; for the foreseeable future (until such time that most 193 systems implement this technique) captive portals will still need to 194 implement the interception techniques to serve legacy clients. 196 The format of the DHCP Captive-Portal DHCP option is shown below. 198 Code Len Data 199 +------+------+------+------+------+-- --+-----+ 200 | code | len | URI ... | 201 +------+------+------+------+------+-- --+-----+ 203 o Code: The Captive-Portal DHCP Option (TBA1) 205 o Len: The length, in octets of the URI. 207 o URI: The URI of the authentication page that the user should 208 connect to. 210 In order to avoid having to perform DNS interception, the URI SHOULD 211 contain an IPv4 address literal. 213 For cases requiring SSL/TLS (collection of billing information for 214 example), the IP literal can redirect to a URI containing a DNS name. 216 [ED NOTE: Using an address literal is less than ideal, but better 217 than the alternatives. Recommending a DNS name means that the CP 218 would need to allow DNS from unauthenticated clients (as we don't 219 want to force users to use the CP's provided DNS) and some users 220 would use this to DNS Tunnel out. This would make the CP admin block 221 external recursives).] 223 4. The Captive-Portal IPv6 RA Option 225 This section describes the Captive-Portal Router Advertisement 226 option. 228 0 1 2 3 229 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 230 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 231 | Type | Length | URI . 232 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . 233 . . 234 . . 235 . . 236 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 237 Figure 2: Captive-Portal RA Option Format 239 Type TBA2 240 Length 8-bit unsigned integer. The length of the option (including 241 the Type and Length fields) in units of 8 bytes. 243 URI The URI of the authentication page that the user should connect 244 to. For the reasons described above, the implementer might want 245 to use an IP address literal instead of a DNS name. This should 246 be padded with NULL (0x0) to make the total option length 247 (including the Type and Length fields) a multiple of 8 bytes. 249 5. Use of the Captive-Portal Option 251 [ED NOTE: This option provides notice to the OS / User applications 252 that there is a CP. Because of differences in UI design between 253 Operating Systems, the exact behaviour by OS and Applications is left 254 to the OS vendor/Application Developer.] 256 The purpose of the Captive-Portal Option is to inform the operating 257 system and applications that they are behind a captive portal type 258 device and will need to authenticate before getting network access 259 (and how to reach the authentication page). What is done with this 260 information is left up to the operating system and application 261 vendors. This document provides a very high level example of what 262 could be done with this information. 264 Many operating systems / applications already include a "connectivity 265 test" to determine if they are behind a captive portal (for example, 266 attempting to fetch a specific URL and looking for a specific string 267 (such as "Success"). These tests sometimes fail or take a long time 268 to determine when they are behind a CP, but are usually effective for 269 determining that the captive portal has been satisfied. These tests 270 will continue to be needed, because there is currently no definitive 271 signal from the captive portal that it has been satisfied. [ Editor 272 note: It may be useful to write another document that specifies how a 273 client can determine that it has passed the CP. This document could 274 also contain advice to implmentors on only intercepting actually 275 needed ports, how to advertise that the CP needs to be statisfied 276 *again*, etc. This should not be done in this document though. ] The 277 connectivity test may also need to be used if the captive portal 278 times out the user session and needs the user to re-authenticate. 279 The operating system may still find the information about the captive 280 portal URI useful in this case. 282 When the device is informed that it is behind a captive portal it 283 should: 285 1. Not initiate new IP connections until the CP has been satisfied 286 (other than those to the captive portal browser session and 287 connectivity checks). Existing connections should be quiesced 288 (this will happen more often than some expect -- for example, the 289 user purchases 1 hour of Internet at a cafe and stays there for 3 290 hours -- this will "interrupt" the user a few times). 292 2. Present a dialog box to the user informing them that they are 293 behind a captive portal and ask if they wish to proceed. 295 3. If the user elects to proceed, the device should initiate a 296 connection to the captive portal login page using a web browser 297 configured with a separate cookie store, and without a proxy 298 server. If there is a VPN in place, this connection should be 299 made outside of the VPN and the user should be informed that 300 connection is outside the VPN. Some captive portals send the 301 user a cookie when they authenticate (so that the user can re- 302 authenticate more easily in the future) - the browser should keep 303 these CP cookies separate from other cookies. 305 4. Once the user has authenticated, normal IP connectivity should 306 resume. The CP success page should contain a string, e.g 307 "CP_SATISFIED." The OS can then use this string to provide 308 further information to the user. 310 5. The device should (using an OS dependent method) expose to the 311 user / user applications that they have connected though a 312 captive portal (for example by creating a file in /proc/net/ 313 containing the interface and captive portal URI). This should 314 continue until the network changes, or a new DHCP message without 315 the CP is received. 317 6. IANA Considerations 319 This document defines the DHCP Captive-Portal option and requires 320 assignment of an option code (TBA1) to be assigned from "Bootp and 321 DHCP options" registry (http://www.iana.org/assignments/ bootp-dhcp- 322 parameters/bootp-dhcp-parameters.xml), as specified in [RFC2939]. 324 IANA is also requested to assign an IPv6 RA Option Type code (TBA2) 325 from the "IPv6 Neighbor Discovery Option Formats" registry. Thanks 326 IANA! 328 7. Security Considerations 330 An attacker with the ability to inject DHCP messages could include 331 this option and so force users to contact an address of his choosing. 332 As an attacker with this capability could simply list himself as the 333 default gateway (and so intercept all the victim's traffic), this 334 does not provide them with significantly more capabilities. Fake 335 DHCP servers / fake RAs are currently a security concern - this 336 doesn't make them any better or worse. 338 Devices and systems that automatically connect to an open network 339 could potentially be tracked using the techniques described in this 340 document (forcing the user to continually authenticate, or exposing 341 their browser fingerprint.) However, similar tracking can already be 342 performed with the standard captive portal mechanisms, so this 343 technique does not give the attackers more capabilities. 345 By simplifying the interaction with the captive portal systems, and 346 doing away with the need for interception, we think that users will 347 be less likely to disable useful security safeguards like DNSSEC 348 validation, VPNs, etc. In addition, because the system knows that it 349 is behind a captive portal, it can know not to send cookies, 350 credentials, etc. Redirection to a portal where TLS can be used 351 without hijacking can ameliorate some of the implications of 352 connecting to a potentially malicious captive portal. 354 8. Acknowledgements 356 Thanks to Vint Cerf for the initial idea / asking me to write this. 357 Thanks to Wes George for supplying the IPv6 text. Thanks to Lorenzo 358 and Erik for the V6 RA kick in the pants. 360 Thanks to Fred Baker, Ted Lemon, Ole Troan and Asbjorn Tonnesen for 361 detailed review and comments. Also great thanks to Joel Jaeggli for 362 providing feedback and text. 364 9. Normative References 366 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 367 Requirement Levels", BCP 14, RFC 2119, March 1997. 369 Appendix A. Changes / Author Notes. 371 [RFC Editor: Please remove this section before publication ] 373 From 07 to 08: 375 o Incorporated comments from Ted Lemon. Made the document much 376 shorter. 378 o Some cleanup. 380 From 06 to 07: 382 o Incoroprated a bunch of comments from Asbjorn Tonnesen 383 o Clarified that this document is only for the DHCP bits, not 384 everything. 386 o CP's *can* do HTTP redirects to DNS banes, as long as they allow 387 access to all needed services. 389 From 05 to 06: 391 o Integrated comments from Joel, as below 393 o Better introduction text, around the "kludgy hacks" section. 395 o Better "neither condones nor condems" text 397 o Fingerprint text. 399 o Some discussions on the v4 literal stuff. 401 o More Security Consideration text. 403 From 04 to 05: 405 o Integrated comments, primarily from Fred Baker. 407 From 03 to 04: 409 o Some text cleanup for readability. 411 o Some disclaimers about it working better on initial connection 412 versus CP timeout. 414 o Some more text explaining that CP interception is 415 indistinguishable from an attack. 417 o Connectivity Check test. 419 o Posting just before the draft cutoff - "I love deadlines. I love 420 the whooshing noise they make as they go by." -- Douglas Adams, 421 The Salmon of Doubt 423 From -02 to 03: 425 o Removed the DHCPv6 stuff (as suggested / requested by Erik Kline) 427 o Simplified / cleaned up text (I'm inclined to waffle on, then trim 428 the fluff) 430 o This was written on a United flight with in-flight WiFi - 431 unfortunately I couldn't use it because their CP was borked. :-P 433 From -01 to 02: 435 o Added the IPv6 RA stuff. 437 From -00 to -01: 439 o Many nits and editorial changes. 441 o Whole bunch of extra text and review from Wes George on v6. 443 From initial to -00. 445 o Nothing changed in the template! 447 Authors' Addresses 449 Warren Kumari 450 Google 451 1600 Amphitheatre Parkway 452 Mountain View, CA 94043 453 US 455 Email: warren@kumari.net 457 Olafur Gudmundsson 458 Shinkuro Inc. 459 4922 Fairmont Av, Suite 250 460 Bethesda, MD 20814 461 USA 463 Email: ogud@ogud.com 465 Paul Ebersman 466 Comcast 468 Email: ebersman-ietf@dragon.net 469 Steve Sheng 470 Internet Corporation for Assigned Names and Numbers 471 12025 Waterfront Drive, Suite 300 472 Los Angeles 90094 473 United States of America 475 Phone: +1.310.301.5800 476 Email: steve.sheng@icann.org