idnits 2.17.1 draft-ietf-capport-architecture-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 (June 29, 2019) is 1763 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 7710 (Obsoleted by RFC 8910) == Outdated reference: A later version (-11) exists of draft-ietf-intarea-provisioning-domains-05 Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force K. Larose 3 Internet-Draft Agilicus 4 Intended status: Informational D. Dolson 5 Expires: December 31, 2019 June 29, 2019 7 CAPPORT Architecture 8 draft-ietf-capport-architecture-04 10 Abstract 12 This document aims to document consensus on the CAPPORT architecture. 13 DHCP or Router Advertisements, an optional signaling protocol, and an 14 HTTP API are used to provide the solution. The role of Provisioning 15 Domains (PvDs) is described. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on December 31, 2019. 34 Copyright Notice 36 Copyright (c) 2019 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (https://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 53 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 54 2. Components . . . . . . . . . . . . . . . . . . . . . . . . . 5 55 2.1. User Equipment . . . . . . . . . . . . . . . . . . . . . 5 56 2.2. Provisioning Service . . . . . . . . . . . . . . . . . . 6 57 2.2.1. DHCP or Router Advertisements . . . . . . . . . . . . 6 58 2.2.2. Provisioning Domains . . . . . . . . . . . . . . . . 6 59 2.3. Captive Portal API Server . . . . . . . . . . . . . . . . 7 60 2.4. Captive Portal Enforcement . . . . . . . . . . . . . . . 7 61 2.5. Captive Portal Signal . . . . . . . . . . . . . . . . . . 8 62 2.6. Component Diagram . . . . . . . . . . . . . . . . . . . . 9 63 3. User Equipment Identity . . . . . . . . . . . . . . . . . . . 10 64 3.1. Identifiers . . . . . . . . . . . . . . . . . . . . . . . 10 65 3.2. Recommended Properties . . . . . . . . . . . . . . . . . 11 66 3.2.1. Uniquely Identify User Equipment . . . . . . . . . . 11 67 3.2.2. Hard to Spoof . . . . . . . . . . . . . . . . . . . . 11 68 3.2.3. Visible to the API . . . . . . . . . . . . . . . . . 12 69 3.2.4. Visible to the Enforcement Device . . . . . . . . . . 12 70 3.3. Evaluating an Identifier . . . . . . . . . . . . . . . . 12 71 3.4. Examples of an Identifier . . . . . . . . . . . . . . . . 12 72 3.4.1. Physical Interface . . . . . . . . . . . . . . . . . 12 73 3.4.2. IP Address . . . . . . . . . . . . . . . . . . . . . 13 74 4. Solution Workflow . . . . . . . . . . . . . . . . . . . . . . 14 75 4.1. Initial Connection . . . . . . . . . . . . . . . . . . . 14 76 4.2. Conditions About to Expire . . . . . . . . . . . . . . . 14 77 5. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 15 78 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 79 7. Security Considerations . . . . . . . . . . . . . . . . . . . 15 80 7.1. Trusting the Network . . . . . . . . . . . . . . . . . . 15 81 7.2. Authenticated APIs . . . . . . . . . . . . . . . . . . . 16 82 7.3. Secure APIs . . . . . . . . . . . . . . . . . . . . . . . 16 83 7.4. Risk of Nuisance Captive Portal . . . . . . . . . . . . . 16 84 7.5. User Options . . . . . . . . . . . . . . . . . . . . . . 16 85 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 86 8.1. Normative References . . . . . . . . . . . . . . . . . . 17 87 8.2. Informative References . . . . . . . . . . . . . . . . . 17 88 Appendix A. Existing captive portal detection implementations . 17 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 91 1. Introduction 93 In this document, "Captive Portal" is used to describe a network to 94 which a device may be voluntarily attached, such that network access 95 is limited until some requirements have been fulfilled. Typically a 96 user is required to use a web browser to fulfill requirements imposed 97 by the network operator, such as reading advertisements, accepting an 98 acceptable-use policy, or providing some form of credentials. 100 Implementations generally require a web server, some method to allow/ 101 block traffic, and some method to alert the user. Common methods of 102 alerting the user involve modifying HTTP or DNS traffic. 104 Problems with captive portal implementations have been described in 105 [I-D.nottingham-capport-problem]. [If that document cannot be 106 published, consider putting its best parts into an appendix of this 107 document.] 109 This document standardizes an architecture for implementing captive 110 portals that provides tools for addressing most of those problems. 111 We are guided by these principles: 113 o Solutions SHOULD NOT require the forging of responses from DNS or 114 HTTP servers, or any other protocol. In particular, solutions 115 SHOULD NOT require man-in-the-middle proxy of TLS traffic. 117 o Solutions MUST operate at the layer of Internet Protocol (IP) or 118 above, not being specific to any particular access technology such 119 as Cable, WiFi or 3GPP. 121 o Solutions MAY allow a device to be alerted that it is in a captive 122 network when attempting to use any application on the network. 124 o Solutions SHOULD allow a device to learn that it is in a captive 125 network before any application attempts to use the network. 127 o The state of captivity SHOULD be explicitly available to devices 128 (in contrast to modification of DNS or HTTP, which is only 129 indirectly machine-detectable by the client--by comparing 130 responses to well-known queries with expected responses). 132 o The architecture MUST provide a path of incremental migration, 133 acknowledging a huge variety of portals and end-user device 134 implementations and software versions. 136 A side-benefit of the architecture described in this document is that 137 devices without user interfaces are able to identify parameters of 138 captivity. However, this document does not yet describe a mechanism 139 for such devices to escape captivity. 141 The architecture uses the following mechanisms: 143 o Network provisioning protocols provide end-user devices with a URI 144 for the API that end-user devices query for information about what 145 is required to escape captivity. DHCP, DHCPv6, and Router- 146 Advertisement options for this purpose are available in [RFC7710]. 147 Other protocols (such as RADIUS), Provisioning Domains 148 [I-D.ietf-intarea-provisioning-domains], or static configuration 149 may also be used. A device MAY query this API at any time to 150 determine whether the network is holding the device in a captive 151 state. 153 o End-user devices can be notified of captivity with Captive Portal 154 Signals in response to traffic. This notification should work 155 with any Internet protocol, not just clear-text HTTP. This 156 notification does not carry the portal URI; rather it provides a 157 notification to the User Equipment that it is in a captive state. 158 This document will specify requirements for a signaling protocol 159 which could generate Captive Portal Signals. 161 o Receipt of a Captive Portal Signal informs an end-user device that 162 it could be captive. In response, the device MAY query the 163 provisioned API to obtain information about the network state. 164 The device MAY take immediate action to satisfy the portal 165 (according to its configuration/policy). 167 The architecture attempts to provide privacy, authentication, and 168 safety mechanisms to the extent possible. 170 1.1. Requirements Language 172 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 173 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 174 document are to be interpreted as described in RFC 2119 [RFC2119]. 176 1.2. Terminology 178 Captive Network: A network which limits communication of attached 179 devices to restricted hosts until the user has satisfied Captive 180 Portal Conditions, after which access is permitted to a wider set of 181 hosts (typically the internet). 183 Captive Portal Conditions: site-specific requirements that a user or 184 device must satisfy in order to gain access to the wider network. 186 Captive Portal Enforcement: The network equipment which enforces the 187 traffic restriction. 189 Captive Portal User Equipment: Also known as User Equipment. A 190 device which has voluntarily joined a network for purposes of 191 communicating beyond the constraints of the captive network. 193 Captive Portal Server: The web server providing a user interface for 194 assisting the user in satisfying the conditions to escape captivity. 196 Captive Portal Signal: A notification from the network used to inform 197 the User Equipment that the state of its captivity could have 198 changed. 200 Captive Portal Signaling Protocol: Also known as Signaling Protocol. 201 The protocol for communicating Captive Portal Signals. 203 2. Components 205 2.1. User Equipment 207 The User Equipment is the device that a user desires to be attached 208 to a network with full access to all hosts on the network (e.g., to 209 have Internet access). The User Equipment communication is typically 210 restricted by the Captive Portal Enforcement, described in 211 Section 2.4, until site-specific requirements have been met. 213 At this time we consider only devices with web browsers, with web 214 applications being the means of satisfying Captive Portal Conditions. 216 o An example interactive User Equipment is a smart phone. 218 o SHOULD support provisioning of the URI for the Captive Portal API 219 (e.g., by DHCP) 221 o SHOULD distinguish Captive Portal API access per network 222 interface, in the manner of Provisioning Domain Architecture 223 [RFC7556]. 225 o SHOULD have a mechanism for notifying the user of the Captive 226 Portal 228 o SHOULD have a web browser so that the user may navigate the 229 Captive Portal user interface. 231 o MAY restrict application access to networks not granting full 232 network access. E.g., a device connected to a mobile network may 233 be connecting to a WiFi network; the operating system MAY avoid 234 updating the default route until network access restrictions have 235 been lifted (excepting access to the Captive Portal server). This 236 has been termed "make before break". 238 None of the above requirements are mandatory because (a) we do not 239 wish to say users or devices must seek access beyond the captive 240 network, (b) the requirements may be fulfilled by manually visiting 241 the captive portal web application, and (c) legacy devices must 242 continue to be supported. 244 2.2. Provisioning Service 246 Here we discuss candidate mechanisms for provisioning the User 247 Equipment with the URI of the API to query captive portal state and 248 navigate the portal. 250 2.2.1. DHCP or Router Advertisements 252 A standard for providing a portal URI using DHCP or Router 253 Advertisements is described in [RFC7710]. The CAPPORT architecture 254 expects this URI to indicate the API described in Section 2.3. 256 Although it is not clear from RFC7710 what protocol should be 257 executed at the specified URI, some readers might have assumed it to 258 be an HTML page, and hence there might be User Equipment assuming a 259 browser should open this URI. For backwards compatibility, it is 260 RECOMMENDED that the server check the "Accept" field when serving the 261 URI, and serve HTML pages for "text/html" and serve the API for 262 "application/json". [REVISIT: are these details appropriate?] 264 2.2.2. Provisioning Domains 266 Although still a work in progress, 267 [I-D.ietf-intarea-provisioning-domains] proposes a mechanism for User 268 Equipment to be provided with PvD Bootstrap Information containing 269 the URI for a JSON file containing key-value pairs to be downloaded 270 over HTTPS. This JSON file would fill the role of the Captive Portal 271 API described in Section 2.3. 273 The PvD security model provides secure binding between the 274 information provided by the trusted Router Advertisement and the 275 HTTPS server. 277 One key-value pair can be used to indicate the network has restricted 278 access, requiring captive portal navigation by a user. E.g., 279 key="captivePortal" and value=. The key-value pair 280 should provide a different result when access is not restricted. 281 E.g., key="captivePortal" and value="". 283 This JSON file is extensible, allowing new key-value pairs to 284 indicate such things as network access expiry time, URI for API 285 access by IOT devices, etc. 287 The PvD server MUST support multiple (repeated) queries from each 288 User Equipment, always returning the current captive portal 289 information. The User Equipment is expected to make this query upon 290 receiving (and validating) a Captive Portal Signal (see Section 2.5). 292 2.3. Captive Portal API Server 294 The purpose of a Captive Portal API is to permit a query of Captive 295 Portal state without interrupting the user. This API thereby removes 296 the need for a device to perform clear-text "canary" HTTP queries to 297 check for response tampering. 299 The URI of this API will have been provisioned to the User Equipment. 300 (Refer to Section 2.2). 302 This architecture expects the User Equipment to query the API when 303 the User Equipment attaches to the network and multiple times 304 thereafter. Therefore the API MUST support multiple repeated queries 305 from the same User Equipment, returning the current state of 306 captivity for the equipment. 308 At minimum the API MUST provide: (1) the state of captivity and (2) a 309 URI for a browser to present the portal application to the user. The 310 API SHOULD provide evidence to the caller that it supports the 311 present architecture. 313 When user equipment receives Captive Portal Signals, the user 314 equipment MAY query the API to check the state. The User Equipment 315 SHOULD rate-limit these API queries in the event of the signal being 316 flooded. (See Section 7.) 318 The API MUST be extensible to support future use-cases by allowing 319 extensible information elements. 321 The API MUST use TLS for privacy and server authentication. The 322 implementation of the API MUST ensure both privacy and integrity of 323 any information provided by or required by it. 325 This document does not specify the details of the API. 327 2.4. Captive Portal Enforcement 329 The Captive Portal Enforcement component restricts network access to 330 User Equipment according to site-specific policy. Typically User 331 Equipment is permitted access to a small number of services and is 332 denied general network access until it has performed some action. 334 The Captive Portal Enforcement component: 336 o Allows traffic through for allowed User Equipment. 338 o Blocks (discards) traffic for disallowed User Equipment. 340 o May signal User Equipment using the Captive Portal Signaling 341 protocol if traffic is blocked. 343 o Permits disallowed User Equipment to access necessary APIs and web 344 pages to fulfill requirements of exiting captivity. 346 o Updates allow/block rules per User Equipment in response to 347 operations from the Captive Portal back-end. 349 2.5. Captive Portal Signal 351 User Equipment may send traffic outside the captive network prior to 352 the Enforcement device granting it access. The Enforcement Device 353 rightly blocks or resets these requests. However, lacking a signal 354 from the Enforcement Device or interaction with the API server, the 355 User Equipment can only guess at whether it is captive. 356 Consequently, allowing the Enforcement Device to signal to the User 357 Equipment that there is a problem with its connectivity may improve 358 the user's experience. 360 An Enforcement Device may also want to inform the User Equipment of a 361 pending expiry of its access to the external network, so providing 362 the Enforcement Device the ability to preemptively signal may be 363 desirable. 365 A specific Captive Portal Signaling Protocol is out of scope for this 366 document. However, in order to ensure that future protocols fit into 367 the architecture, requirements for a Captive Portal Signaling 368 Protocol follow: 370 1. The notification SHOULD NOT be easy to spoof. If an attacker can 371 send spoofed notifications to the User Equipment, they can cause 372 the User Equipment to unnecessarily access the API. Rather than 373 relying solely on rate limits to prevent problems, a good 374 protocol will strive to limit the feasibility of such attacks. 376 2. It SHOULD be possible to send the notification before the captive 377 portal closes. This will help ensure seamless connectivity for 378 the user, as the User Equipment will not need to wait for a 379 network failure to refresh its login. On receipt of preemptive 380 notification, the User Equipment can prompt the user to refresh. 382 3. The signal SHOULD NOT include any information other than an 383 indication that traffic is restricted, which can be used as a 384 prompt to contact the API. 386 The Captive Portal Signaling Protocol does not provide any means of 387 indicating that the network prevents access to some destinations. 388 The intent is to rely on the Captive Portal API and the web portal to 389 which it points to communicate local network policies. 391 The Captive Portal Enforcement function MAY send Captive Portal 392 Signals when disallowed User Equipment attempts to send to the 393 network. These signals MUST be rate-limited to a configurable rate. 395 The signals MUST NOT be sent to the Internet devices. The 396 indications are only sent to the User Equipment. 398 2.6. Component Diagram 400 The following diagram shows the communication between each component. 402 o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o 403 . CAPTIVE NETWORK . 404 . +--------------+ . 405 . +------------+ Provision API URI | Provisioning | . 406 . | |<---------------------------+| Service | . 407 . | User | +--------------+ . 408 . | Equipment | Query CAPPORT status +-------------+ . 409 . | |+--------------------------->| CAPPORT API | . 410 . | | | Server | . 411 . | | +------+------+ . 412 . | | | Status . 413 . | | Portal user interface +------+------+ . 414 . | |+--------------------------->| CAPPORT | . 415 . +------------+ | web portal | . 416 . ^ ^ | +-------------+ . 417 . | | | Data | . 418 . | | +-----------------> +---------------+ Allow/Deny . 419 . | +--------------------+| | Rules . 420 . | | Captive Portal| | . 421 . | CAPPORT Signal | Enforcement | <---+ . 422 . +-------------------------+---------------+ . 423 . ^ | . 424 . | | . 425 . Data to/from external network . 426 . | | . 427 o . . . . . . . . . . . . . . . . . . .| |. . . . . . . . . . . o 428 | v 429 EXTERNAL NETWORK 431 Figure 1: Captive Portal Architecture Component Diagram 433 In the diagram: 435 o During provisioning (e.g., DHCP), the User Equipment acquires the 436 URI for the CAPPORT API. 438 o The User Equipment queries the API to learn of its state of 439 captivity. If captive, the User Equipment presents the portal 440 user interface to the user. 442 o The User Equipment attempts to communicate to the external network 443 through the Captive Portal enforcement device. 445 o The Captive Portal Enforcement device either allows the User 446 Equipment's packets to the external network, or if a signal has 447 been implemented, responds with a Captive Portal Signal. 449 o The CAPPORT web portal server directs the Captive Portal 450 Enforcement device to either allow or deny external network access 451 for the User Equipment. 453 Although the provisioning, API, and web portal functions are shown as 454 discrete blocks, they could of course be combined into a single 455 element. 457 3. User Equipment Identity 459 Multiple components in the architecture interact with both the User 460 Equipment and each other. Since the User Equipment is the focus of 461 these interactions, the components must be able to both identify the 462 user equipment from their interactions with it, and be able to agree 463 on the identity of the user equipment when interacting with each 464 other. 466 The methods by which the components interact restrict the type of 467 information that may be used as an identifying characteristics. This 468 section discusses the identifying characteristics. 470 3.1. Identifiers 472 An Identifier is a characteristic of the User Equipment used by the 473 components of a Captive Portal to uniquely determine which specific 474 User Equipment is interacting with them. An Identifier MAY be a 475 field contained in packets sent by the User Equipment to the External 476 Network. Or, an Identifier MAY be an ephemeral property not 477 contained in packets destined for the External Network, but instead 478 correlated with such information through knowledge available to the 479 different components. 481 3.2. Recommended Properties 483 The set of possible identifiers is quite large. However, in order to 484 be considered a good identifier, an identifier SHOULD meet the 485 following criteria. Note that the optimal identifier will likely 486 change depending on the position of the components in the network as 487 well as the information available to them. An identifier SHOULD: 489 o Uniquely Identify the User Equipment 491 o Be Hard to Spoof 493 o Be Visible to the API 495 o Be Visible to the Enforcement Device 497 An identifier might only apply to the current point of network 498 attachment. If the device moves to a different network location its 499 identity could change. 501 3.2.1. Uniquely Identify User Equipment 503 In order to uniquely identify the User Equipment, at most one user 504 equipment interacting with the other components of the Captive Portal 505 MUST have a given value of the identifier. 507 Over time, the user equipment identified by the value MAY change. 508 Allowing the identified device to change over time ensures that the 509 space of possible identifying values need not be overly large. 511 Independent Captive Portals MAY use the same identifying value to 512 identify different User Equipment. Allowing independent captive 513 portals to reuse identifying values allows the identifier to be a 514 property of the local network, expanding the space of possible 515 identifiers. 517 3.2.2. Hard to Spoof 519 A good identifier does not lend itself to being easily spoofed. At 520 no time should it be simple or straightforward for one User Equipment 521 to pretend to be another User Equipment, regardless of whether both 522 are active at the same time. This property is particularly important 523 when the user equipment is extended externally to devices such as 524 billing systems, or where the identity of the User Equipment could 525 imply liability. 527 3.2.3. Visible to the API 529 Since the API will need to perform operations which rely on the 530 identity of the user equipment, such as query whether it is captive, 531 the API needs to be able to relate requests to the User Equipment 532 making the request. 534 3.2.4. Visible to the Enforcement Device 536 The Enforcement Device will decide on a per packet basis whether it 537 should be permitted to communicate with the external network. Since 538 this decision depends on which User Equipment sent the packet, the 539 Enforcement Device requires that it be able to map the packet to its 540 concept of the User Equipment. 542 3.3. Evaluating an Identifier 544 To evaluate whether an identifier is appropriate, one should consider 545 every recommended property from the perspective of interactions among 546 the components in the architecture. When comparing identifiers, 547 choose the one which best satisfies all of the recommended 548 properties. The architecture does not provide an exact measure of 549 how well an identifier satisfies a given property; care should be 550 taken in performing the evaluation. 552 3.4. Examples of an Identifier 554 This section provides some examples of identifiers, along with some 555 evaluation of whether they are good identifiers. The list of 556 identifiers is not exhaustive. Other identifiers may be used. An 557 important point to note is that whether the identifiers are good 558 depends heavily on the capabilities of the components and where in 559 the network the components exist. 561 3.4.1. Physical Interface 563 The physical interface by which the User Equipment is attached to the 564 network can be used to identify the User Equipment. This identifier 565 has the property of being extremely difficult to spoof: the User 566 Equipment is unaware of the property; one User Equipment cannot 567 manipulate its interactions to appear as though it is another. 569 Further, if only a single User Equipment is attached to a given 570 physical interface, then the identifier will be unique. If multiple 571 User Equipment is attached to the network on the same physical 572 interface, then this property is not appropriate. 574 Another consideration related to uniqueness of the User Equipment is 575 that if the attached User Equipment changes, both the API server and 576 the Enforcement Device must invalidate their state related to the 577 User Equipment. 579 The Enforcement Device needs to be aware of the physical interface, 580 which constrains the environment: it must either be part of the 581 device providing physical access (e.g., implemented in firmware), or 582 packets traversing the network must be extended to include 583 information about the source physical interface (e.g. a tunnel). 585 The API server faces a similar problem, implying that it should co- 586 exist with the Enforcement Device, or that the enforcement device 587 should extend requests to it with the identifying information. 589 3.4.2. IP Address 591 A natural identifier to consider is the IP address of the User 592 Equipment. At any given time, no device on the network can have the 593 same IP address without causing the network to malfunction, so it is 594 appropriate from the perspective of uniqueness. 596 However, it may be possible to spoof the IP address, particularly for 597 malicious reasons where proper functioning of the network is not 598 necessary for the malicious actor. Consequently, any solution using 599 the IP address should proactively try to prevent spoofing of the IP 600 address. Similarly, if the mapping of IP address to User Equipment 601 is changed, the components of the architecture must remove or update 602 their mapping to prevent spoofing. Demonstrations of return 603 routeability, such as that required for TCP connection establishment, 604 might be sufficient defense against spoofing, though this might not 605 be sufficient in networks that use broadcast media (such as some 606 wireless networks). 608 Since the IP address may traverse multiple segments of the network, 609 more flexibility is afforded to the Enforcement Device and the API 610 server: they simply must exist on a segment of the network where the 611 IP address is still unique. However, consider that a NAT may be 612 deployed between the User Equipment and the Enforcement Device. In 613 such cases, it is possible for the components to still uniquely 614 identify the device if they are aware of the port mapping. 616 In some situations, the User Equipment may have multiple IP 617 addresses, while still satisfying all of the recommended properties. 618 This raises some challenges to the components of the network. For 619 example, if the user equipment tries to access the network with 620 multiple IP addresses, should the enforcement device and API server 621 treat each IP address as a unique User Equipment, or should it tie 622 the multiple addresses together into one view of the subscriber? An 623 implementation MAY do either. Attention should be paid to IPv6 and 624 the fact that it is expected for a device to have multiple IPv6 625 addresses on a single link. In such cases, identification could be 626 performed by subnet, such as the /64 to which the IP belongs. 628 4. Solution Workflow 630 This section aims to improve understanding by describing a possible 631 workflow of solutions adhering to the architecture. 633 4.1. Initial Connection 635 This section describes a possible work-flow when User Equipment 636 initially joins a Captive Network. 638 1. The User Equipment joins the Captive Network by acquiring a DHCP 639 lease, RA, or similar, acquiring provisioning information. 641 2. The User Equipment learns the URI for the Captive Portal API from 642 the provisioning information (e.g., [RFC7710]). 644 3. The User Equipment accesses the CAPPORT API to receive parameters 645 of the Captive Network, including web-portal URI. (This step 646 replaces the clear-text query to a canary URL.) 648 4. If necessary, the User navigates the web portal to gain access to 649 the external network. 651 5. The Captive Portal API server indicates to the Captive Portal 652 Enforcement device that the User Equipment is allowed to access 653 the external network. 655 6. The User Equipment attempts a connection outside the captive 656 network 658 7. If the requirements have been satisfied, the access is permitted; 659 otherwise the "Expired" behavior occurs. 661 8. The User Equipment accesses the network until conditions Expire. 663 4.2. Conditions About to Expire 665 This section describes a possible work-flow when access is about to 666 expire. 668 1. Precondition: the API server has provided the User Equipment with 669 a duration over which its access is valid 671 2. The User Equipment is communicating with the outside network 673 3. The User Equipment's UI indicates that the length of time left 674 for its access has fallen below a threshold 676 4. The User Equipment visits the API again to validate the expiry 677 time 679 5. If expiry is still imminent, the User Equipment prompts the user 680 to access the web-portal URI again 682 6. The User extends their access through the web-portal 684 7. The User Equipment's access to the outside network continues 685 uninterrupted 687 5. Acknowledgments 689 The authors thank Lorenzo Colitti for providing the majority of the 690 content for the Captive Portal Signal requirements. 692 The authors thank various individuals for their feedback on the 693 mailing list and during the IETF98 hackathon: David Bird, Erik Kline, 694 Alexis La Goulette, Alex Roscoe, Darshak Thakore, and Vincent van 695 Dam. 697 6. IANA Considerations 699 This memo includes no request to IANA. 701 7. Security Considerations 703 7.1. Trusting the Network 705 When joining a network, some trust is placed in the network operator. 706 This is usually considered to be a decision by a user on the basis of 707 the reputation of an organization. However, once a user makes such a 708 decision, protocols can support authenticating a network is operated 709 by who claims to be operating it. The Provisioning Domain 710 Architecture [RFC7556] provides some discussion on authenticating an 711 operator. 713 Given that a user chooses to visit a Captive Portal URI, the URI 714 location SHOULD be securely provided to the user's device. E.g., the 715 DHCPv6 AUTH option can sign this information. 717 If a user decides to incorrectly trust an attacking network, they 718 might be convinced to visit an attacking web page and unwittingly 719 provide credentials to an attacker. Browsers can authenticate 720 servers but cannot detect cleverly misspelled domains, for example. 722 7.2. Authenticated APIs 724 The solution described here assumes that when the User Equipment 725 needs to trust the API server, server authentication will be 726 performed using TLS mechanisms. 728 7.3. Secure APIs 730 The solution described here requires that the API be secured using 731 TLS. This is required to allow the user equipment and API server to 732 exchange secrets which can be used to validate future interactions. 733 The API must ensure the integrity of this information, as well as its 734 confidentiality. 736 7.4. Risk of Nuisance Captive Portal 738 If a Signaling Protocol is implemented, it may be possible for any 739 user on the Internet to send signals in attempt to cause the 740 receiving equipment to communicate with the Captive Portal API. This 741 has been considered, and implementations may address it in the 742 following ways: 744 o The signal only informs the User Equipment to query the API. It 745 does not carry any information which may mislead or misdirect the 746 User Equipment. 748 o Even when responding to the signal, the User Equipment securely 749 authenticates with API servers. 751 o Accesses to the API server are rate limited, limiting the impact 752 of a repeated attack. 754 7.5. User Options 756 The Signal could inform the User Equipment that it is being held 757 captive. There is no requirement that the User Equipment do 758 something about this. Devices MAY permit users to disable automatic 759 reaction to captive-portal indications for privacy reasons. However, 760 there is the trade-off that the user doesn't get notified when 761 network access is restricted. Hence, end-user devices MAY allow 762 users to manually control captive portal interactions, possibly on 763 the granularity of Provisioning Domains. 765 8. References 767 8.1. Normative References 769 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 770 Requirement Levels", BCP 14, RFC 2119, 771 DOI 10.17487/RFC2119, March 1997, 772 . 774 [RFC7556] Anipko, D., Ed., "Multiple Provisioning Domain 775 Architecture", RFC 7556, DOI 10.17487/RFC7556, June 2015, 776 . 778 [RFC7710] Kumari, W., Gudmundsson, O., Ebersman, P., and S. Sheng, 779 "Captive-Portal Identification Using DHCP or Router 780 Advertisements (RAs)", RFC 7710, DOI 10.17487/RFC7710, 781 December 2015, . 783 8.2. Informative References 785 [I-D.ietf-intarea-provisioning-domains] 786 Pfister, P., Vyncke, E., Pauly, T., Schinazi, D., and W. 787 Shao, "Discovering Provisioning Domain Names and Data", 788 draft-ietf-intarea-provisioning-domains-05 (work in 789 progress), June 2019. 791 [I-D.nottingham-capport-problem] 792 Nottingham, M., "Captive Portals Problem Statement", 793 draft-nottingham-capport-problem-01 (work in progress), 794 April 2016. 796 Appendix A. Existing captive portal detection implementations 798 Operating systems and user applications may perform various tests 799 when network connectivity is established to determine if the device 800 is attached to a network with a captive portal present. A common 801 method is to attempt to make a HTTP request to a known, vendor hosted 802 endpoint with a fixed response. Any other response is interpreted as 803 a signal that a captive portal is present. This check is typically 804 not secured with TLS, as a network with a captive portal may 805 intercept the connection, leading to a host name mismatch. Another 806 test that can be performed is a DNS lookup to a known address with an 807 expected answer. Such tests may be less reliable as the captive 808 portal may only be intercepting TCP traffic and deliberately 809 excluding the interception of DNS queries. DNS queries not using UDP 810 may potentially fail this test if operating over TCP or DNS over 811 HTTP. Malicious or misconfigured networks with a captive portal 812 present may not intercept these requests and choose to pass them 813 through or decide to impersonate, leading to the device having a 814 false negative. 816 Authors' Addresses 818 Kyle Larose 819 Agilicus 821 Email: kyle@agilicus.com 823 David Dolson 825 Email: ddolson@acm.org