idnits 2.17.00 (12 Aug 2021) /tmp/idnits54840/draft-wkumari-dhc-capport-06.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 (December 2, 2014) is 2727 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'RFC2939' is mentioned on line 336, but not defined == Missing Reference: 'TODO' is mentioned on line 339, but not defined Summary: 0 errors (**), 0 flaws (~~), 3 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: June 5, 2015 Shinkuro Inc. 6 P. Ebersman 7 Comcast 8 S. Sheng 9 ICANN 10 December 2, 2014 12 Captive-Portal identification in DHCP / RA 13 draft-wkumari-dhc-capport-06 15 Abstract 17 In many environments (such as hotels, coffee shops and other 18 establishments that offer Internet service to customers), it is 19 common to start new connections in a captive portal mode, i.e. highly 20 restrict what the customer can do until the customer has accepted 21 terms of service, provided payment information and / or 22 authenticated. 24 This document describes a DHCP option (and an RA extension) to inform 25 clients that they are behind some sort of captive portal device, and 26 that they will need to authenticate to get Internet Access. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at http://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on June 5, 2015. 45 Copyright Notice 47 Copyright (c) 2014 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (http://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 63 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3 64 2. Background . . . . . . . . . . . . . . . . . . . . . . . . . 3 65 2.1. DNS Redirection . . . . . . . . . . . . . . . . . . . . . 4 66 2.2. HTTP Redirection . . . . . . . . . . . . . . . . . . . . 4 67 2.3. IP Hijacking . . . . . . . . . . . . . . . . . . . . . . 5 68 3. The Captive-Portal DHCP Option . . . . . . . . . . . . . . . 5 69 4. The Captive-Portal RA Option . . . . . . . . . . . . . . . . 6 70 5. Use of the Captive-Portal Option . . . . . . . . . . . . . . 6 71 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 72 7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 73 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 74 9. Normative References . . . . . . . . . . . . . . . . . . . . 9 75 Appendix A. Changes / Author Notes. . . . . . . . . . . . . . . 9 76 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 78 1. Introduction 80 In many environments, users need to connect to a captive portal 81 device and agree to an acceptable use policy and / or provide billing 82 information before they can access the Internet. 84 In order to present the user with the captive portal web page, many 85 devices perform DNS and / or HTTP and / or IP hijacks. In addition 86 to being kludgy hacks, these techniques resemble attacks that DNSSEC 87 and TLS are intended to protect against. In an attempt to discourage 88 the deliberate subversion of basic security tools, this document 89 describes a DHCP option (Captive-Portal) and an IPv6 Router 90 Advertisement (RA) extension that informs clients that they are 91 behind a captive portal device, and how to contact it. 93 document describes a DHCP option (Captive-Portal) and an IPv6 Router 94 Advertisement (RA) extension that informs clients that they are 95 behind a captive portal device, and how to contact it. 97 This document neither condones nor condemns the use captive portals; 98 instead, it recognises that their apparent necessity, and attempts to 99 improve the user experience. 101 The technique described in this document mainly improve the user 102 experience when first connecting to a network behind a captive 103 portal. It may also help if the captive portal access times out 104 after connecting, but this is less reliable. 106 1.1. Requirements notation 108 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 109 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 110 document are to be interpreted as described in [RFC2119]. 112 2. Background 114 Many Internet Service Providers (ISPs) that offer public Internet 115 access require the user to accept an Acceptable Use Policy (AUP) and 116 / or provides billing information (such as their last name and room 117 number in a hotel, credit card information, etc.) through a web 118 interface before the user can access the Internet. 120 In order to meet this requirement, some ISPs implement a captive 121 portal (CP) - a system that intercepts user requests and redirects 122 them to an interstitial login page. 124 Captive portals intercept and redirects user requests in a number of 125 ways, including: 127 o DNS Redirection 129 o IP Redirection 131 o HTTP Redirection 133 o Restricted scope addresses 135 o Traffic blocking (until the user is authenticated) 137 In order to ensure that the user is unable to access the Internet 138 until they have satisfied the requirements, captive portals usually 139 implement IP based filters, or place the user into a restricted VLAN 140 (or restricted IP range) until after they have been authorized / 141 satisfied. 143 These techniques are very similar to attacks that protocols (such as 144 VPNs, DNSSEC, TLS) are designed to protect against. The interaction 145 of the these protections and the interception leads to poor user 146 experiences, such as long timeouts, inability to reach the captive 147 portal web page, etc. The interception may also leak user 148 information (for example, if the captive portal intercepts and logs 149 an HTTP Cookie, or URL of the form http://fred:password@example.com). 150 The user is often unaware of what is causing the issue (their browser 151 appears to hang, saying something like "Downloading Proxy Script", or 152 simply "The Internet doesn't work"), and they become frustrated. 153 This may results in them not purchasing the Internet access provided 154 by the captive portal. The connectivity attempts may also facilitate 155 OS fingerprinting even before a client attempts to connect to the 156 portal itself. 158 2.1. DNS Redirection 160 The CP either intercepts all DNS traffic or advertises itself (for 161 example using DHCP) as the recursive server for the network. Until 162 the user has authenticated to the captive portal, the CP responds to 163 all DNS requests listing the address of its web portal. Once the 164 user has authenticated the CP returns the "correct" addresses. 166 This technique has many shortcomings. It fails if the client is 167 performing DNSSEC validation, is running their own resolver, is using 168 a VPN, or already has the DNS information cached. 170 2.2. HTTP Redirection 172 In this implementation, the CP acts like a transparent HTTP proxy; 173 but when it sees an HTTP request from an unauthenticated client, it 174 intercepts the request and responds with an HTTP status code 302 to 175 redirect the client to the Captive Portal Login. 177 This technique has a number of issues, including: 179 o It fails if the user is only using HTTPS. 181 o It exposes various private user information, such as HTTP Cookies, 182 etc. 184 o It doesn't work if the client has a VPN and / or proxies their web 185 traffic to an external web proxy. 187 2.3. IP Hijacking 189 In this scenario, the captive portal intercepts connections to any IP 190 address. It spoofs the destination IP address and "pretends" to be 191 whatever the user tried to access. 193 This technique has issues similar to the HTTP solution, but may also 194 break other protocols, and may expose more of the user's private 195 information. 197 3. The Captive-Portal DHCP Option 199 The Captive Portal DHCP Option (TBA1) informs the DHCP client that it 200 is behind a captive portal and provides the URI to access an 201 authentication page. This is primarily intended to improve the user 202 experience; for the foreseeable future (until such time that most 203 systems implement this technique) captive portals will still need to 204 implement the interception techniques to serve legacy clients. 206 The format of the DHCP Captive-Portal DHCP option is shown below. 208 Code Len Data 209 +------+------+------+------+------+-- --+-----+ 210 | code | len | URI ... | 211 +------+------+------+------+------+-- --+-----+ 213 o Code: The Captive-Portal DHCP Option (TBA1 for DHCPv4, TBA2 for 214 DHCPv6) 216 o Len: The length, in octets of the URI. 218 o URI: The URI of the authentication page that the user should 219 connect to. 221 The URI MUST NOT contain a DNS name, in order to not require the CP 222 to access DNS queries from an unauthenticated user. Rather, if IPv4 223 is supported in the network, one option's URI MUST contain an IPv4 224 address literal, and if IPv6 is supported in the network, one 225 option's URI MUST contain an IPv6 address literal. Note that this 226 implies that a dual stack network would include two such options in 227 its DHCP reply or RA. 229 [ED NOTE: Using an address literal is less than ideal, but better 230 than the alternatives. Recommending a DNS name means that the CP 231 would need to allow DNS from unauthenticated clients (as we don't 232 want to force users to use the CP's provided DNS) and some users 233 would use this to DNS Tunnel out. This would make the CP admin block 234 external recursives).] 236 4. The Captive-Portal RA Option 238 [Ed: I'm far from an RA expert. I think there are only 8 bits for 239 Type, is it worth burning an option code on this? I have also 240 specified that the option length should padded to multiples of 8 byte 241 to better align with the examples I've seen. Is this required / 242 preferred, or is smaller RAs better? ] 244 This section describes the Captive-Portal Router Advertisement 245 option. 247 0 1 2 3 248 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 249 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 250 | Type | Length | URI . 251 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . 252 . . 253 . . 254 . . 255 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 256 Figure 2: Captive-Portal RA Option Format 258 Type TBA3 260 Length 8-bit unsigned integer. The length of the option (including 261 the Type and Length fields) in units of 8 bytes. 263 URI The URI (containing an IPv6 literal) of the authentication page 264 that the user should connect to. This should be padded with NULL 265 (0x0) to make the total option length (including the Type and 266 Length fields) a multiple of 8 bytes. 268 5. Use of the Captive-Portal Option 270 [ED NOTE: This option provides notice to the OS / User applications 271 that there is a CP. Because of differences in UI design between 272 Operating Systems, the exact behaviour by OS and Applications is left 273 to the OS vendor/Application Developer.] 275 The purpose of the Captive-Portal Option is to inform the operating 276 system and applications that they are behind a captive portal type 277 device and will need to authenticate before getting network access 278 (and how to reach the authentication page). What is done with this 279 information is left up to the operating system and application 280 vendors. This document provides a very high level example of what 281 could be done with this information. 283 Many operating systems / applications already include a "connectivity 284 test" to determine if they are behind a captive portal (for example, 285 attempting to fetch a specific URL and looking for a specific string 286 (such as "Success")). These tests sometimes fail or take a long time 287 to determine when they are behind a CP, but are usually effective for 288 determining that the captive portal has been satisfied. These tests 289 will continue to be needed, because there is currently no definitive 290 signal from the captive portal that it has been satisfied. The 291 connectivity test may also need to be used if the captive portal 292 times out the user session and needs the user to re-authenticate / 293 pay again. The operating system may still find the information about 294 the captive portal URI useful in this case. 296 When the device is informed that it is behind a captive portal it 297 SHOULD: 299 1. Not initiate new IP connections until the CP has been satisfied 300 (other than those to the captive portal page and connectivity 301 checks). Existing connections should be quiesced (this will 302 happen more often than some expect -- for example, the user 303 purchases 1 hour of Internet at a cafe and stays there for 3 304 hours -- this will "interrupt" the user a few times). 306 2. Present a dialog box to the user informing them that they are 307 behind a captive portal and ask if they wish to proceed. 309 3. If the user elects to proceed, the device should initiate a 310 connection to the captive portal login page using a web browser 311 configured with a separate cookie store, and without a proxy 312 server. If there is a VPN in place, this connection should be 313 made outside of the VPN and the user should be informed that 314 connection is outside the VPN. Some captive portals send the 315 user a cookie when they authenticate (so that the user can re- 316 authenticate more easily in the future) - the browser should keep 317 these CP cookies separate from other cookies. 319 4. Once the user has authenticated, normal IP connectivity should 320 resume. The CP success page should contain a string, e.g 321 "CP_SATISFIED." The OS can then use this string to provide 322 further information to the user. 324 5. The device should (using an OS dependent method) expose to the 325 user / user applications that they have connected though a 326 captive portal (for example by creating a file in /proc/net/ 327 containing the interface and captive portal URI). This should 328 continue until the network changes, or a new DHCP message without 329 the CP is received. 331 6. IANA Considerations 333 This document defines DHCPv4 Captive-Portal option which requires 334 assignment of DHCPv4 option code TBA1 assigned from "Bootp and DHCP 335 options" registry (http://www.iana.org/assignments/ bootp-dhcp- 336 parameters/bootp-dhcp-parameters.xml), as specified in [RFC2939]. 338 The IANA is also requested at assign an IPv6 RA Type code (TBA3) from 339 the [TODO] registry. Thanks IANA! 341 7. Security Considerations 343 An attacker with the ability to inject DHCP messages could include 344 this option and so force users to contact an address of his choosing. 345 As an attacker with this capability could simply list himself as the 346 default gateway (and so intercept all the victim's traffic), this 347 does not provide them with significantly more capabilities. Fake 348 DHCP servers / fake RAs are currently a security concern - this 349 doesn't make them any better or worse. 351 Devices and systems that automatically connect to an open network 352 could potentially be tracked using the techniques described in this 353 document (forcing the user to continually authenticate, or exposing 354 their browser fingerprint.) However, similar tracking can already be 355 performed with the standard captive portal mechanisms, so this 356 technique does not give the attackers more capabilities. 358 By simplifying the interaction with the captive portal systems, and 359 doing away with the need for interception, we think that users will 360 be less likely to disable useful security safeguards like DNSSEC 361 validation, VPNs, etc. In addition, because the system knows that it 362 is behind a captive portal, it can know not to send cookies, 363 credentials, etc. Redirection to a portal where TLS can be used 364 without hijacking can ameliorate some of the implications of 365 connecting to a potentially malicious captive portal. 367 8. Acknowledgements 369 The primary author has discussed this idea with a number of folk, and 370 asked them to assist by becoming co-authors. Unfortunately he has 371 forgotten who many of them were; if you were one of them, I 372 apologize. 374 Thanks to Vint Cerf for the initial idea / asking me to write this. 375 Thanks to Wes George for supplying the IPv6 text. Thanks to Lorenzo 376 and Erik for the V6 RA kick in the pants. 378 Thanks for Fred Baker for detailed review and comments. Also great 379 thanks to Joel Jaeggli for providing feedback and text. 381 9. Normative References 383 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 384 Requirement Levels", BCP 14, RFC 2119, March 1997. 386 Appendix A. Changes / Author Notes. 388 [RFC Editor: Please remove this section before publication ] 390 From 05 to 06: 392 o Integrated comments from Joel, as below 394 o Better introduction text, around the "kludgy hacks" section. 396 o Better "neither condones nor condems" text 398 o Fingerprint text. 400 o Some discussions on the v4 literal stuff. 402 o More Security Consideration text. 404 From 04 to 05: 406 o Integrated comments, primarily from Fred Baker. 408 From 03 to 04: 410 o Some text cleanup for readability. 412 o Some disclaimers about it working better on initial connection 413 versus CP timeout. 415 o Some more text explaining that CP interception is 416 indistinguishable from an attack. 418 o Connectivity Check test. 420 o Posting just before the draft cutoff - "I love deadlines. I love 421 the whooshing noise they make as they go by." -- Douglas Adams, 422 The Salmon of Doubt 424 From -02 to 03: 426 o Removed the DHCPv6 stuff (as suggested / requested by Erik Kline) 428 o Simplified / cleaned up text (I'm inclined to waffle on, then trim 429 the fluff) 431 o This was written on a United flight with in-flight WiFi - 432 unfortunately I couldn't use it because their CP was borked. :-P 434 From -01 to 02: 436 o Added the IPv6 RA stuff. 438 From -00 to -01: 440 o Many nits and editorial changes. 442 o Whole bunch of extra text and review from Wes George on v6. 444 From initial to -00. 446 o Nothing changed in the template! 448 Authors' Addresses 450 Warren Kumari 451 Google 452 1600 Amphitheatre Parkway 453 Mountain View, CA 94043 454 US 456 Email: warren@kumari.net 458 Olafur Gudmundsson 459 Shinkuro Inc. 460 4922 Fairmont Av, Suite 250 461 Bethesda, MD 20814 462 USA 464 Email: ogud@ogud.com 466 Paul Ebersman 467 Comcast 469 Email: ebersman-ietf@dragon.net 470 Steve Sheng 471 Internet Corporation for Assigned Names and Numbers 472 12025 Waterfront Drive, Suite 300 473 Los Angeles 90094 474 United States of America 476 Phone: +1.310.301.5800 477 Email: steve.sheng@icann.org