idnits 2.17.00 (12 Aug 2021) /tmp/idnits52490/draft-wkumari-dhc-capport-07.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 22, 2014) is 2707 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'RFC2939' is mentioned on line 353, 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: June 25, 2015 Shinkuro Inc. 6 P. Ebersman 7 Comcast 8 S. Sheng 9 ICANN 10 December 22, 2014 12 Captive-Portal identification in DHCP / RA 13 draft-wkumari-dhc-capport-07 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 25, 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 . . . . . . . . . . . . . . 7 71 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 72 7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 73 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 74 9. Normative References . . . . . . . . . . . . . . . . . . . . 9 75 Appendix A. Changes / Author Notes. . . . . . . . . . . . . . . 9 76 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 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 This document neither condones nor condemns the use of captive 94 portals; instead, it recognises that their apparent necessity, and 95 attempts to improve the user experience. 97 The technique described in this document mainly improve the user 98 experience when first connecting to a network behind a captive 99 portal. It may also help if the captive portal access times out 100 after connecting, but this is less reliable. 102 1.1. Requirements notation 104 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 105 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 106 document are to be interpreted as described in [RFC2119]. 108 2. Background 110 Many Internet Service Providers (ISPs) that offer public Internet 111 access require the user to accept an Acceptable Use Policy (AUP) and 112 / or provides billing information (such as their last name and room 113 number in a hotel, credit card information, etc.) through a web 114 interface before the user can access the Internet. 116 In order to meet this requirement, some ISPs implement a captive 117 portal (CP) - a system that intercepts user requests and redirects 118 them to an interstitial login page. 120 Captive portals intercept and redirects user requests in a number of 121 ways, including: 123 o DNS Redirection 125 o IP Redirection 127 o HTTP Redirection 129 o Restricted scope addresses 131 o Traffic blocking (until the user is authenticated) 133 In order to ensure that the user is unable to access the Internet 134 until they have satisfied the requirements, captive portals usually 135 implement IP based filters, or place the user into a restricted VLAN 136 (or restricted IP range) until after they have been authorized / 137 satisfied. 139 These techniques are very similar to attacks that protocols (such as 140 VPNs, DNSSEC, TLS) are designed to protect against. The interaction 141 of the these protections and the interception leads to poor user 142 experiences, such as long timeouts, inability to reach the captive 143 portal web page, etc. The interception may also leak user 144 information (for example, if the captive portal intercepts and logs 145 an HTTP Cookie, or URL of the form http://fred:password@example.com). 146 The user is often unaware of what is causing the issue (their browser 147 appears to hang, saying something like "Downloading Proxy Script", or 148 simply "The Internet doesn't work"), and they become frustrated. 149 This may results in them not purchasing the Internet access provided 150 by the captive portal. The connectivity attempts may also facilitate 151 OS fingerprinting even before a client attempts to connect to the 152 portal itself. 154 2.1. DNS Redirection 156 The CP either intercepts all DNS traffic or advertises itself (for 157 example using DHCP) as the recursive server for the network. Until 158 the user has authenticated to the captive portal, the CP responds to 159 all DNS requests listing the address of its web portal. Once the 160 user has authenticated the CP returns the "correct" addresses. 162 This technique has many shortcomings. It fails if the client is 163 performing DNSSEC validation, is running their own resolver, is using 164 a VPN, or already has the DNS information cached. 166 2.2. HTTP Redirection 168 In this implementation, the CP acts like a transparent HTTP proxy; 169 but when it sees an HTTP request from an unauthenticated client using 170 HTTP/1.0, it intercepts the request and responds with an HTTP status 171 code 302 to redirect the client to the Captive Portal Login. If the 172 client is using HTTP/1.1, we respond with a status code 303 See 173 Other. 175 This technique has a number of issues, including: 177 o It fails if the user is only using HTTPS. 179 o It exposes various private user information, such as HTTP Cookies, 180 etc. 182 o It doesn't work if the client has a VPN and / or proxies their web 183 traffic to an external web proxy. 185 2.3. IP Hijacking 187 In this scenario, the captive portal intercepts connections to any IP 188 address. It spoofs the destination IP address and "pretends" to be 189 whatever the user tried to access. 191 This technique has issues similar to the HTTP solution, but may also 192 break other protocols, and may expose more of the user's private 193 information. 195 3. The Captive-Portal DHCP Option 197 The Captive Portal DHCP Option (TBA1) informs the DHCP client that it 198 is behind a captive portal and provides the URI to access an 199 authentication page. This is primarily intended to improve the user 200 experience; for the foreseeable future (until such time that most 201 systems implement this technique) captive portals will still need to 202 implement the interception techniques to serve legacy clients. 204 The format of the DHCP Captive-Portal DHCP option is shown below. 206 Code Len Data 207 +------+------+------+------+------+-- --+-----+ 208 | code | len | URI ... | 209 +------+------+------+------+------+-- --+-----+ 211 o Code: The Captive-Portal DHCP Option (TBA1 for DHCPv4, TBA2 for 212 DHCPv6) 214 o Len: The length, in octets of the URI. 216 o URI: The URI of the authentication page that the user should 217 connect to. 219 The URI MUST NOT contain a DNS name, in order to not require the CP 220 to access DNS queries from an unauthenticated user. Rather, if IPv4 221 is supported in the network, one option's URI MUST contain an IPv4 222 address literal, and if IPv6 is supported in the network, one 223 option's URI MUST contain an IPv6 address literal. Note that this 224 implies that a dual stack network would include two such options in 225 its DHCP reply or RA. 227 In many cases, a CP would like to collect billing infomation (for 228 example, credit card information), and will want to do this over SSL/ 229 TLS. In order to make this work, the web server on the IP literal 230 can redirect to a URI containing a DNS name. The CP implementor/ 231 operator will need to ensure that the client machine can access this 232 URI and all service needed to make that work (for example, DNS, 233 etc.). In this case, the operator/implementor will potentially need 234 to deal with issues such as DNS tunnelling. 236 Captive Portals are free to serve a HTTP redirect on this address to 237 a DNS name (for example, so they can provide a TLS protected web page 238 for credit card information). This will require that the client be 239 able to perform DNS requests. 241 [ED NOTE: Using an address literal is less than ideal, but better 242 than the alternatives. Recommending a DNS name means that the CP 243 would need to allow DNS from unauthenticated clients (as we don't 244 want to force users to use the CP's provided DNS) and some users 245 would use this to DNS Tunnel out. This would make the CP admin block 246 external recursives).] 248 4. The Captive-Portal RA Option 250 [Ed: I'm far from an RA expert. I think there are only 8 bits for 251 Type, is it worth burning an option code on this? I have also 252 specified that the option length should padded to multiples of 8 byte 253 to better align with the examples I've seen. Is this required / 254 preferred, or is smaller RAs better? ] 256 This section describes the Captive-Portal Router Advertisement 257 option. 259 0 1 2 3 260 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 261 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 262 | Type | Length | URI . 263 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . 264 . . 265 . . 266 . . 267 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 268 Figure 2: Captive-Portal RA Option Format 270 Type TBA3 272 Length 8-bit unsigned integer. The length of the option (including 273 the Type and Length fields) in units of 8 bytes. 275 URI The URI (containing an IPv6 literal) of the authentication page 276 that the user should connect to. This should be padded with NULL 277 (0x0) to make the total option length (including the Type and 278 Length fields) a multiple of 8 bytes. 280 5. Use of the Captive-Portal Option 282 [ED NOTE: This option provides notice to the OS / User applications 283 that there is a CP. Because of differences in UI design between 284 Operating Systems, the exact behaviour by OS and Applications is left 285 to the OS vendor/Application Developer.] 287 The purpose of the Captive-Portal Option is to inform the operating 288 system and applications that they are behind a captive portal type 289 device and will need to authenticate before getting network access 290 (and how to reach the authentication page). What is done with this 291 information is left up to the operating system and application 292 vendors. This document provides a very high level example of what 293 could be done with this information. 295 Many operating systems / applications already include a "connectivity 296 test" to determine if they are behind a captive portal (for example, 297 attempting to fetch a specific URL and looking for a specific string 298 (such as "Success")). These tests sometimes fail or take a long time 299 to determine when they are behind a CP, but are usually effective for 300 determining that the captive portal has been satisfied. These tests 301 will continue to be needed, because there is currently no definitive 302 signal from the captive portal that it has been satisfied. [ Editor 303 note: It may be useful to write another document that specifies how a 304 client can determine that it has passed the CP. This document could 305 also contain advice to implmentors on only intercepting actually 306 needed ports, how to advertise that the CP needs to be statisfied 307 *again*, etc. This should not be done in this document though. ] The 308 connectivity test may also need to be used if the captive portal 309 times out the user session and needs the user to re-authenticate / 310 pay again. The operating system may still find the information about 311 the captive portal URI useful in this case. 313 When the device is informed that it is behind a captive portal it 314 SHOULD: 316 1. Not initiate new IP connections until the CP has been satisfied 317 (other than those to the captive portal browser session and 318 connectivity checks). Existing connections should be quiesced 319 (this will happen more often than some expect -- for example, the 320 user purchases 1 hour of Internet at a cafe and stays there for 3 321 hours -- this will "interrupt" the user a few times). 323 2. Present a dialog box to the user informing them that they are 324 behind a captive portal and ask if they wish to proceed. 326 3. If the user elects to proceed, the device should initiate a 327 connection to the captive portal login page using a web browser 328 configured with a separate cookie store, and without a proxy 329 server. If there is a VPN in place, this connection should be 330 made outside of the VPN and the user should be informed that 331 connection is outside the VPN. Some captive portals send the 332 user a cookie when they authenticate (so that the user can re- 333 authenticate more easily in the future) - the browser should keep 334 these CP cookies separate from other cookies. 336 4. Once the user has authenticated, normal IP connectivity should 337 resume. The CP success page should contain a string, e.g 338 "CP_SATISFIED." The OS can then use this string to provide 339 further information to the user. 341 5. The device should (using an OS dependent method) expose to the 342 user / user applications that they have connected though a 343 captive portal (for example by creating a file in /proc/net/ 344 containing the interface and captive portal URI). This should 345 continue until the network changes, or a new DHCP message without 346 the CP is received. 348 6. IANA Considerations 350 This document defines DHCPv4 Captive-Portal option which requires 351 assignment of DHCPv4 option code TBA1 assigned from "Bootp and DHCP 352 options" registry (http://www.iana.org/assignments/ bootp-dhcp- 353 parameters/bootp-dhcp-parameters.xml), as specified in [RFC2939]. 355 IANA is also requested to assign an IPv6 RA Option Type code (TBA3) 356 from the "IPv6 Neighbor Discovery Option Formats" registry. Thanks 357 IANA! 359 7. Security Considerations 361 An attacker with the ability to inject DHCP messages could include 362 this option and so force users to contact an address of his choosing. 363 As an attacker with this capability could simply list himself as the 364 default gateway (and so intercept all the victim's traffic), this 365 does not provide them with significantly more capabilities. Fake 366 DHCP servers / fake RAs are currently a security concern - this 367 doesn't make them any better or worse. 369 Devices and systems that automatically connect to an open network 370 could potentially be tracked using the techniques described in this 371 document (forcing the user to continually authenticate, or exposing 372 their browser fingerprint.) However, similar tracking can already be 373 performed with the standard captive portal mechanisms, so this 374 technique does not give the attackers more capabilities. 376 By simplifying the interaction with the captive portal systems, and 377 doing away with the need for interception, we think that users will 378 be less likely to disable useful security safeguards like DNSSEC 379 validation, VPNs, etc. In addition, because the system knows that it 380 is behind a captive portal, it can know not to send cookies, 381 credentials, etc. Redirection to a portal where TLS can be used 382 without hijacking can ameliorate some of the implications of 383 connecting to a potentially malicious captive portal. 385 8. Acknowledgements 387 The primary author has discussed this idea with a number of folk, and 388 asked them to assist by becoming co-authors. Unfortunately he has 389 forgotten who many of them were; if you were one of them, I 390 apologize. 392 Thanks to Vint Cerf for the initial idea / asking me to write this. 393 Thanks to Wes George for supplying the IPv6 text. Thanks to Lorenzo 394 and Erik for the V6 RA kick in the pants. 396 Thanks to Fred Baker and Asbjorn Tonnesen for detailed review and 397 comments. Also great thanks to Joel Jaeggli for providing feedback 398 and text. 400 9. Normative References 402 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 403 Requirement Levels", BCP 14, RFC 2119, March 1997. 405 Appendix A. Changes / Author Notes. 407 [RFC Editor: Please remove this section before publication ] 409 From 06 to 07: 411 o Incoroprated a bunch of comments from Asbjorn Tonnesen 413 o Clarified that this document is only for the DHCP bits, not 414 everything. 416 o CP's *can* do HTTP redirects to DNS banes, as long as they allow 417 access to all needed services. 419 From 05 to 06: 421 o Integrated comments from Joel, as below 423 o Better introduction text, around the "kludgy hacks" section. 425 o Better "neither condones nor condems" text 427 o Fingerprint text. 429 o Some discussions on the v4 literal stuff. 431 o More Security Consideration text. 433 From 04 to 05: 435 o Integrated comments, primarily from Fred Baker. 437 From 03 to 04: 439 o Some text cleanup for readability. 441 o Some disclaimers about it working better on initial connection 442 versus CP timeout. 444 o Some more text explaining that CP interception is 445 indistinguishable from an attack. 447 o Connectivity Check test. 449 o Posting just before the draft cutoff - "I love deadlines. I love 450 the whooshing noise they make as they go by." -- Douglas Adams, 451 The Salmon of Doubt 453 From -02 to 03: 455 o Removed the DHCPv6 stuff (as suggested / requested by Erik Kline) 457 o Simplified / cleaned up text (I'm inclined to waffle on, then trim 458 the fluff) 460 o This was written on a United flight with in-flight WiFi - 461 unfortunately I couldn't use it because their CP was borked. :-P 463 From -01 to 02: 465 o Added the IPv6 RA stuff. 467 From -00 to -01: 469 o Many nits and editorial changes. 471 o Whole bunch of extra text and review from Wes George on v6. 473 From initial to -00. 475 o Nothing changed in the template! 477 Authors' Addresses 479 Warren Kumari 480 Google 481 1600 Amphitheatre Parkway 482 Mountain View, CA 94043 483 US 485 Email: warren@kumari.net 487 Olafur Gudmundsson 488 Shinkuro Inc. 489 4922 Fairmont Av, Suite 250 490 Bethesda, MD 20814 491 USA 493 Email: ogud@ogud.com 495 Paul Ebersman 496 Comcast 498 Email: ebersman-ietf@dragon.net 500 Steve Sheng 501 Internet Corporation for Assigned Names and Numbers 502 12025 Waterfront Drive, Suite 300 503 Los Angeles 90094 504 United States of America 506 Phone: +1.310.301.5800 507 Email: steve.sheng@icann.org