idnits 2.17.00 (12 Aug 2021) /tmp/idnits49856/draft-wkumari-dhc-capport-04.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 (July 4, 2014) is 2878 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 == Unused Reference: 'I-D.ietf-sidr-iana-objects' is defined on line 380, but no explicit reference was found in the text == Outdated reference: draft-ietf-sidr-iana-objects has been published as RFC 6491 Summary: 0 errors (**), 0 flaws (~~), 5 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: January 5, 2015 Shinkuro Inc. 6 P. Ebersman 7 Comcast 8 S. Sheng 9 ICANN 10 July 4, 2014 12 Captive-Portal identification in DHCP / RA 13 draft-wkumari-dhc-capport-04 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 January 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. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 75 9.1. Normative References . . . . . . . . . . . . . . . . . . 9 76 9.2. Informative References . . . . . . . . . . . . . . . . . 9 77 Appendix A. Changes / Author Notes. . . . . . . . . . . . . . . 9 78 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 80 1. Introduction 82 In many environments, users need to connect to a captive portal 83 device and agree to an acceptable use policy and / or provide billing 84 information before they can access the Internet. 86 In order to present the user with the captive portal web page, many 87 devices perform DNS and / or HTTP and / or IP hijacks. As well as 88 being kludgy hacks, these techniques looks very similar to attacks 89 that DNSSEC and TLS protect against, which makes the user experience 90 sub-optimal. 92 This document describes a DHCP option (Captive-Portal) and an IPv6 93 Router Advertisement (RA) extension that informs clients that they 94 are behind a captive portal device, and how to contact it. 96 This document neither condones nor condemns captive portals; instead, 97 it recognises that they are here to stay, and attempts to improve the 98 user experience. 100 The technique described in this document mainly improve the user 101 experience when first connecting to a network behind a captive 102 portal. It may also help if the captive portal access times out 103 after connecting, but this is less reliable. 105 1.1. Requirements notation 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 109 document are to be interpreted as described in [RFC2119]. 111 2. Background 113 Many Internet Service Providers (ISPs) that offer public Internet 114 access require the user to accept an Acceptable Use Policy (AUP) and 115 / or provides billing information (such as their last name and room 116 number in a hotel, credit card information, etc.) through a web 117 interface before the user can access the Internet. 119 In order to meet this requirement, some ISPs implement a captive 120 portal (CP) - a system that intercepts user requests and redirects 121 them to an interstitial login page. 123 Captive portals intercept and redirects user requests in a number of 124 ways, including: 126 o DNS Redirection 128 o IP Redirection 130 o HTTP Redirection 132 o Restricted scope addresses 134 o Traffic blocking (until the user is authenticated) 136 In order to ensure that the user is unable to access the Internet 137 until they have satisfied the requirements, captive portals usually 138 implement IP based filters, or place the user into a restricted VLAN 139 (or restricted IP range) until after they have been authorized / 140 satisfied. 142 These techniques are very similar to attacks that protocols (such as 143 VPNs, DNSSEC, TLS) are designed to protect against. The interaction 144 of the these protections and the interception leads to poor user 145 experiences, such as long timeouts, inability to reach the captive 146 portal web page, etc. The interception may also leak user 147 information (for example, if the captive portal intercepts and logs 148 an HTTP Cookie, or URL of the form http://fred:password@example.com). 149 The user is often unaware of what is causing the issue (their browser 150 appears to hang, saying something like "Downloading Proxy Script", or 151 simply "The Internet doesn't work"), and they become frustrated. 152 This often results in them not purchasing the Internet access 153 provided by the captive portal. 155 2.1. DNS Redirection 157 The CP either intercepts all DNS traffic or advertises itself (for 158 example using DHCP) as the recursive server for the network. Until 159 the user has authenticated to the captive portal, the CP responds to 160 all DNS requests listing the address of its web portal. Once the 161 user has authenticated the CP returns the "correct" addresses. 163 This technique has many shortcomings. It fails if the client is 164 performing DNSSEC validation, is running their own resolver, is using 165 a VPN, or already has the DNS information cached. 167 2.2. HTTP Redirection 169 In this implementation, the CP acts like a transparent HTTP proxy; 170 but when it sees an HTTP request from an unauthenticated client, it 171 intercepts the request and responds with an HTTP status code 302 to 172 redirect the client to the Captive Portal Login. 174 This technique has a number of issues, including: 176 o It fails if the user is only using HTTPS. 178 o It exposes various private user information, such as HTTP Cookies, 179 etc. 181 o It doesn't work if the client has a VPN and / or proxies their web 182 traffic to an external web proxy. 184 2.3. IP Hijacking 186 In this scenario, the captive portal intercepts connections to any IP 187 address. It spoofs the destination IP address and "pretends" to be 188 whatever the user tried to access. 190 This technique has similar issues as the HTTP solution, but may also 191 break other protocols, and may expose more of the user's private 192 information. 194 3. The Captive-Portal DHCP Option 196 The Captive Portal DHCP Option (TBA1) informs the DHCP client that it 197 is behind a captive portal and provides the URI to access the 198 authentication page. This is primarily intended to improve the user 199 experience; for the foreseeable future captive portals will still 200 need to implement the interception techniques to serve legacy 201 clients. 203 The format of the DHCP Captive-Portal DHCP option is shown below. 205 Code Len Data 206 +------+------+------+------+------+-- --+-----+ 207 | code | len | URI ... | 208 +------+------+------+------+------+-- --+-----+ 210 o Code: The Captive-Portal DHCP Option (TBA1 for DHCPv4, TBA2 for 211 DHCPv6) 213 o Len: The length, in octets of the URI. 215 o URI: The URI of the authentication page that the user should 216 connect to. 218 The URI MUST be a URL with an IP-literal for the host portion (to 219 remove the need to allow DNS from unauthenticated clients). The 220 DHCPv4 URI MUST contain an IPv4 address. 222 [ED NOTE: Using an address literal is less than ideal, but better 223 than the alternatives. Recommending a DNS name means that the CP 224 would need to allow DNS from unauthenticated clients (as we don't 225 want to force users to use the CP's provided DNS) and some users 226 would use this to DNS Tunnel out. This would make the CP admin block 227 external recursives).] 229 4. The Captive-Portal RA Option 231 [Ed: I'm far from an RA expert. I think there are only 8 bits for 232 Type, is it worth burning an option code on this? I have also 233 specified that the option length should padded to multiples of 8 byte 234 to better align with the examples I've seen. Is this required / 235 preferred, or is smaller RAs better? ] 237 This section describes the Captive-Portal Router Advertisement 238 option. 240 0 1 2 3 241 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 242 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 243 | Type | Length | URI . 244 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . 245 . . 246 . . 247 . . 248 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 249 Figure 2: Captive-Portal RA Option Format 251 Type TBA3 253 Length 8-bit unsigned integer. The length of the option (including 254 the Type and Length fields) in units of 8 bytes. 256 URI The URI of the authentication page that the user should connect 257 to. This should be padded with NULL (0x0) to make the total 258 option length (including the Type and Length fields) a multiple of 259 8 bytes. 261 5. Use of the Captive-Portal Option 263 [ED NOTE: This section is, and probably will remain, fairly hand 264 wavy. This option provides notice to the OS / User applications that 265 there is a CP, but I think that the UI / etc is best designed / 266 handled by the Operating System vendors / Application developers. ] 268 The purpose of the Captive-Portal Option is to inform the operating 269 system and applications that they are behind a captive portal type 270 device and will need to authenticate before getting network access 271 (and how to reach the authentication page). What is done with this 272 information is left up to the operating system and application 273 vendors. This document provides a very high level example of what 274 could be done with this information. 276 Many operating systems / applications already include a "connectivity 277 test" to determine if they are behind a captive portal (for example, 278 attempting to fetch a specific URL and looking for a specific string 279 (such as "Success")). These tests sometimes fail or take a long time 280 to determine when they are behind a CP, but are usually effective for 281 determining that the captive portal has been satisfied. These tests 282 will continue to be needed, because there is currently no definitive 283 signal from the captive portal that it has been satisfied. The 284 connectivity test may also need to be used if the captive portal 285 times out the user session and needs the user to re-authenticate / 286 pay again. The operating system may still find the information about 287 the captive portal URI useful in this case. 289 When the device is informed that it is behind a captive portal it 290 SHOULD: 292 1. Not initiate new IP connections until the CP has been satisfied 293 (other than those to the captive portal page and connectivity 294 checks). Existing connections should be quiesced (this will 295 happen more often than some expect -- for example, the user 296 purchases 1 hour of Internet at a cafe and stays there for 3 297 hours -- this will "interrupt" the user a few times). 299 2. Present a dialog box to the user informing them that they are 300 behind a captive portal and ask if they wish to proceed. 302 3. If the user elects to proceed, the device should initiate a 303 connection to the captive portal login page using a web browser 304 configured with a separate cookie store, and without a proxy 305 server. If there is a VPN in place, this connection should be 306 made outside of the VPN. Some captive portals send the user a 307 cookie when they authenticate (so that the user can re- 308 authenticate more easily in the future - the browser should keep 309 these CP cookies separate from other cookies. 311 4. Once the user has authenticated normal IP connectivity should 312 resume. This document does not define how to know that the user 313 has authenticated [Ed: Should it? And option would be for the 314 "Thank you for paying" page to contain a unique string (e.g: 315 "CP_SATISFIED"]. Operating system vendors may wish to provide a 316 public service that their devices can use as a connectivity 317 check. 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 9. References 373 9.1. Normative References 375 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 376 Requirement Levels", BCP 14, RFC 2119, March 1997. 378 9.2. Informative References 380 [I-D.ietf-sidr-iana-objects] 381 Manderson, T., Vegoda, L., and S. Kent, "RPKI Objects 382 issued by IANA", draft-ietf-sidr-iana-objects-03 (work in 383 progress), May 2011. 385 Appendix A. Changes / Author Notes. 387 [RFC Editor: Please remove this section before publication ] 389 From 03 to 04: 391 o Some text cleanup for readability. 393 o Some disclaimers about it working better on initial connection 394 versus CP timeout. 396 o Some more text explaining that CP interception is 397 indistinguishable from an attack. 399 o Connectivity Check test. 401 o Posting just before the draft cutoff - "I love deadlines. I love 402 the whooshing noise they make as they go by." -- Douglas Adams, 403 The Salmon of Doubt 405 From -02 to 03: 407 o Removed the DHCPv6 stuff (as suggested / requested by Erik Kline) 409 o Simplified / cleaned up text (I'm inclined to waffle on, then trim 410 the fluff) 412 o This was written on a United flight with in-flight WiFi - 413 unfortunately I couldn't use it because their CP was borked. :-P 415 From -01 to 02: 417 o Added the IPv6 RA stuff. 419 From -00 to -01: 421 o Many nits and editorial changes. 423 o Whole bunch of extra text and review from Wes George on v6. 425 From initial to -00. 427 o Nothing changed in the template! 429 Authors' Addresses 431 Warren Kumari 432 Google 433 1600 Amphitheatre Parkway 434 Mountain View, CA 94043 435 US 437 Email: warren@kumari.net 439 Olafur Gudmundsson 440 Shinkuro Inc. 441 4922 Fairmont Av, Suite 250 442 Bethesda, MD 20814 443 USA 445 Email: ogud@ogud.com 447 Paul Ebersman 448 Comcast 450 Email: ebersman-ietf@dragon.net 452 Steve Sheng 453 Internet Corporation for Assigned Names and Numbers 454 12025 Waterfront Drive, Suite 300 455 Los Angeles 90094 456 United States of America 458 Phone: +1.310.301.5800 459 Email: steve.sheng@icann.org