idnits 2.17.00 (12 Aug 2021) /tmp/idnits53435/draft-wkumari-dhc-capport-05.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 (September 8, 2014) is 2812 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'RFC2939' is mentioned on line 331, but not defined == Missing Reference: 'TODO' is mentioned on line 334, 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: March 12, 2015 Shinkuro Inc. 6 P. Ebersman 7 Comcast 8 S. Sheng 9 ICANN 10 September 8, 2014 12 Captive-Portal identification in DHCP / RA 13 draft-wkumari-dhc-capport-05 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 March 12, 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 . . . . . . . . . . . . . . . . . . . . . . 4 68 3. The Captive-Portal DHCP Option . . . . . . . . . . . . . . . 5 69 4. The Captive-Portal RA Option . . . . . . . . . . . . . . . . 5 70 5. Use of the Captive-Portal Option . . . . . . . . . . . . . . 6 71 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 72 7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 73 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 74 9. Normative References . . . . . . . . . . . . . . . . . . . . 8 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. As well as 86 being kludgy hacks, these techniques looks very similar to attacks 87 that DNSSEC and TLS protect against, which makes the user experience 88 sub-optimal. 90 This document describes a DHCP option (Captive-Portal) and an IPv6 91 Router Advertisement (RA) extension that informs clients that they 92 are behind a captive portal device, and how to contact it. 94 This document neither condones nor condemns captive portals; instead, 95 it recognises that they are here to stay, and attempts to improve the 96 user experience. 98 The technique described in this document mainly improve the user 99 experience when first connecting to a network behind a captive 100 portal. It may also help if the captive portal access times out 101 after connecting, but this is less reliable. 103 1.1. Requirements notation 105 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 106 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 107 document are to be interpreted as described in [RFC2119]. 109 2. Background 111 Many Internet Service Providers (ISPs) that offer public Internet 112 access require the user to accept an Acceptable Use Policy (AUP) and 113 / or provides billing information (such as their last name and room 114 number in a hotel, credit card information, etc.) through a web 115 interface before the user can access the Internet. 117 In order to meet this requirement, some ISPs implement a captive 118 portal (CP) - a system that intercepts user requests and redirects 119 them to an interstitial login page. 121 Captive portals intercept and redirects user requests in a number of 122 ways, including: 124 o DNS Redirection 126 o IP Redirection 128 o HTTP Redirection 130 o Restricted scope addresses 132 o Traffic blocking (until the user is authenticated) 134 In order to ensure that the user is unable to access the Internet 135 until they have satisfied the requirements, captive portals usually 136 implement IP based filters, or place the user into a restricted VLAN 137 (or restricted IP range) until after they have been authorized / 138 satisfied. 140 These techniques are very similar to attacks that protocols (such as 141 VPNs, DNSSEC, TLS) are designed to protect against. The interaction 142 of the these protections and the interception leads to poor user 143 experiences, such as long timeouts, inability to reach the captive 144 portal web page, etc. The interception may also leak user 145 information (for example, if the captive portal intercepts and logs 146 an HTTP Cookie, or URL of the form http://fred:password@example.com). 147 The user is often unaware of what is causing the issue (their browser 148 appears to hang, saying something like "Downloading Proxy Script", or 149 simply "The Internet doesn't work"), and they become frustrated. 150 This may results in them not purchasing the Internet access provided 151 by the captive portal. 153 2.1. DNS Redirection 155 The CP either intercepts all DNS traffic or advertises itself (for 156 example using DHCP) as the recursive server for the network. Until 157 the user has authenticated to the captive portal, the CP responds to 158 all DNS requests listing the address of its web portal. Once the 159 user has authenticated the CP returns the "correct" addresses. 161 This technique has many shortcomings. It fails if the client is 162 performing DNSSEC validation, is running their own resolver, is using 163 a VPN, or already has the DNS information cached. 165 2.2. HTTP Redirection 167 In this implementation, the CP acts like a transparent HTTP proxy; 168 but when it sees an HTTP request from an unauthenticated client, it 169 intercepts the request and responds with an HTTP status code 302 to 170 redirect the client to the Captive Portal Login. 172 This technique has a number of issues, including: 174 o It fails if the user is only using HTTPS. 176 o It exposes various private user information, such as HTTP Cookies, 177 etc. 179 o It doesn't work if the client has a VPN and / or proxies their web 180 traffic to an external web proxy. 182 2.3. IP Hijacking 184 In this scenario, the captive portal intercepts connections to any IP 185 address. It spoofs the destination IP address and "pretends" to be 186 whatever the user tried to access. 188 This technique has issues similar to the HTTP solution, but may also 189 break other protocols, and may expose more of the user's private 190 information. 192 3. The Captive-Portal DHCP Option 194 The Captive Portal DHCP Option (TBA1) informs the DHCP client that it 195 is behind a captive portal and provides the URI to access an 196 authentication page. This is primarily intended to improve the user 197 experience; for the foreseeable future (until such time that most 198 systems implement this technique) captive portals will still need to 199 implement the interception techniques to serve legacy clients. 201 The format of the DHCP Captive-Portal DHCP option is shown below. 203 Code Len Data 204 +------+------+------+------+------+-- --+-----+ 205 | code | len | URI ... | 206 +------+------+------+------+------+-- --+-----+ 208 o Code: The Captive-Portal DHCP Option (TBA1 for DHCPv4, TBA2 for 209 DHCPv6) 211 o Len: The length, in octets of the URI. 213 o URI: The URI of the authentication page that the user should 214 connect to. 216 The URI MUST NOT contain a DNS name, in order to not require the CP 217 to access DNS queries from an unauthenticated user. Rather, if IPv4 218 is supported in the network, one option's URI MUST contain an IPv4 219 address literal, and if IPv6 is supported in the network, one 220 option's URI MUST contain an IPv6 address literal. Note that this 221 implies that a dual stack network would include two such options in 222 its DHCP reply or RA. 224 [ED NOTE: Using an address literal is less than ideal, but better 225 than the alternatives. Recommending a DNS name means that the CP 226 would need to allow DNS from unauthenticated clients (as we don't 227 want to force users to use the CP's provided DNS) and some users 228 would use this to DNS Tunnel out. This would make the CP admin block 229 external recursives).] 231 4. The Captive-Portal RA Option 233 [Ed: I'm far from an RA expert. I think there are only 8 bits for 234 Type, is it worth burning an option code on this? I have also 235 specified that the option length should padded to multiples of 8 byte 236 to better align with the examples I've seen. Is this required / 237 preferred, or is smaller RAs better? ] 239 This section describes the Captive-Portal Router Advertisement 240 option. 242 0 1 2 3 243 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 244 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 245 | Type | Length | URI . 246 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . 247 . . 248 . . 249 . . 250 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 251 Figure 2: Captive-Portal RA Option Format 253 Type TBA3 255 Length 8-bit unsigned integer. The length of the option (including 256 the Type and Length fields) in units of 8 bytes. 258 URI The URI (containing an IPv6 literal) of the authentication page 259 that the user should connect to. This should be padded with NULL 260 (0x0) to make the total option length (including the Type and 261 Length fields) a multiple of 8 bytes. 263 5. Use of the Captive-Portal Option 265 [ED NOTE: This option provides notice to the OS / User applications 266 that there is a CP. Because of differences in UI design between 267 Operating Systems, the exact behaviour by OS and Applications is left 268 to the OS vendor/Application Developer.] 270 The purpose of the Captive-Portal Option is to inform the operating 271 system and applications that they are behind a captive portal type 272 device and will need to authenticate before getting network access 273 (and how to reach the authentication page). What is done with this 274 information is left up to the operating system and application 275 vendors. This document provides a very high level example of what 276 could be done with this information. 278 Many operating systems / applications already include a "connectivity 279 test" to determine if they are behind a captive portal (for example, 280 attempting to fetch a specific URL and looking for a specific string 281 (such as "Success")). These tests sometimes fail or take a long time 282 to determine when they are behind a CP, but are usually effective for 283 determining that the captive portal has been satisfied. These tests 284 will continue to be needed, because there is currently no definitive 285 signal from the captive portal that it has been satisfied. The 286 connectivity test may also need to be used if the captive portal 287 times out the user session and needs the user to re-authenticate / 288 pay again. The operating system may still find the information about 289 the captive portal URI useful in this case. 291 When the device is informed that it is behind a captive portal it 292 SHOULD: 294 1. Not initiate new IP connections until the CP has been satisfied 295 (other than those to the captive portal page and connectivity 296 checks). Existing connections should be quiesced (this will 297 happen more often than some expect -- for example, the user 298 purchases 1 hour of Internet at a cafe and stays there for 3 299 hours -- this will "interrupt" the user a few times). 301 2. Present a dialog box to the user informing them that they are 302 behind a captive portal and ask if they wish to proceed. 304 3. If the user elects to proceed, the device should initiate a 305 connection to the captive portal login page using a web browser 306 configured with a separate cookie store, and without a proxy 307 server. If there is a VPN in place, this connection should be 308 made outside of the VPN and the user should be informed that 309 connection is outside the VPN. Some captive portals send the 310 user a cookie when they authenticate (so that the user can re- 311 authenticate more easily in the future) - the browser should keep 312 these CP cookies separate from other cookies. 314 4. Once the user has authenticated, normal IP connectivity should 315 resume. The CP success page should contain a string, e.g 316 "CP_SATISFIED." The OS can then use this string to provide 317 further information to the user. 319 5. The device should (using an OS dependent method) expose to the 320 user / user applications that they have connected though a 321 captive portal (for example by creating a file in /proc/net/ 322 containing the interface and captive portal URI). This should 323 continue until the network changes, or a new DHCP message without 324 the CP is received. 326 6. IANA Considerations 328 This document defines DHCPv4 Captive-Portal option which requires 329 assignment of DHCPv4 option code TBA1 assigned from "Bootp and DHCP 330 options" registry (http://www.iana.org/assignments/ bootp-dhcp- 331 parameters/bootp-dhcp-parameters.xml), as specified in [RFC2939]. 333 The IANA is also requested at assign an IPv6 RA Type code (TBA3) from 334 the [TODO] registry. Thanks IANA! 336 7. Security Considerations 338 An attacker with the ability to inject DHCP messages could include 339 this option and so force users to contact an address of his choosing. 340 As an attacker with this capability could simply list himself as the 341 default gateway (and so intercept all the victim's traffic), this 342 does not provide them with significantly more capabilities. Fake 343 DHCP servers / fake RAs are currently a security concern - this 344 doesn't make them any better or worse. 346 Devices and systems that automatically connect to an open network 347 could potentially be tracked using the techniques described in this 348 document (forcing the user to continually authenticate, or exposing 349 their browser fingerprint.) However, similar tracking can already be 350 performed with the standard captive portal mechanisms, so this 351 technique does not give the attackers more capabilities. 353 By simplifying the interaction with the captive portal systems, and 354 doing away with the need for interception, we think that users will 355 be less likely to disable useful security safeguards like DNSSEC 356 validation, VPNs, etc. In addition, because the system knows that it 357 is behind a captive portal, it can know not to send cookies, 358 credentials, etc. 360 8. Acknowledgements 362 The primary author has discussed this idea with a number of folk, and 363 asked them to assist by becoming co-authors. Unfortunately he has 364 forgotten who many of them were; if you were one of them, I 365 apologize. 367 Thanks to Vint Cerf for the initial idea / asking me to write this. 368 Thanks to Wes George for supplying the IPv6 text. Thanks to Lorenzo 369 and Erik for the V6 RA kick in the pants. 371 Thanks for Fred Baker for detailed review and comments. 373 9. Normative References 375 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 376 Requirement Levels", BCP 14, RFC 2119, March 1997. 378 Appendix A. Changes / Author Notes. 380 [RFC Editor: Please remove this section before publication ] 382 From 04 to 05: 384 o Integrated comments, primarily from Fred Baker. 386 From 03 to 04: 388 o Some text cleanup for readability. 390 o Some disclaimers about it working better on initial connection 391 versus CP timeout. 393 o Some more text explaining that CP interception is 394 indistinguishable from an attack. 396 o Connectivity Check test. 398 o Posting just before the draft cutoff - "I love deadlines. I love 399 the whooshing noise they make as they go by." -- Douglas Adams, 400 The Salmon of Doubt 402 From -02 to 03: 404 o Removed the DHCPv6 stuff (as suggested / requested by Erik Kline) 406 o Simplified / cleaned up text (I'm inclined to waffle on, then trim 407 the fluff) 409 o This was written on a United flight with in-flight WiFi - 410 unfortunately I couldn't use it because their CP was borked. :-P 412 From -01 to 02: 414 o Added the IPv6 RA stuff. 416 From -00 to -01: 418 o Many nits and editorial changes. 420 o Whole bunch of extra text and review from Wes George on v6. 422 From initial to -00. 424 o Nothing changed in the template! 426 Authors' Addresses 428 Warren Kumari 429 Google 430 1600 Amphitheatre Parkway 431 Mountain View, CA 94043 432 US 434 Email: warren@kumari.net 436 Olafur Gudmundsson 437 Shinkuro Inc. 438 4922 Fairmont Av, Suite 250 439 Bethesda, MD 20814 440 USA 442 Email: ogud@ogud.com 444 Paul Ebersman 445 Comcast 447 Email: ebersman-ietf@dragon.net 449 Steve Sheng 450 Internet Corporation for Assigned Names and Numbers 451 12025 Waterfront Drive, Suite 300 452 Los Angeles 90094 453 United States of America 455 Phone: +1.310.301.5800 456 Email: steve.sheng@icann.org