-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdraft-ietf-capport-rfc7710bis.xml
526 lines (424 loc) · 23.5 KB
/
draft-ietf-capport-rfc7710bis.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" ".//reference.RFC.2119.xml">
<!ENTITY rfc8174 PUBLIC "" ".//reference.RFC.8174.xml">
]>
<!-- WK: Set category, IPR, docName -->
<rfc category="std" docName="draft-ietf-capport-rfc7710bis-11"
ipr="trust200902" obsoletes="7710" updates="3679">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes"?>
<?rfc compact="yes" ?>
<front>
<!--c WK: Set long title. -->
<title abbrev="DHCP Captive-Portal">Captive-Portal Identification in DHCP
/ RA</title>
<author fullname="Warren Kumari" initials="W." surname="Kumari">
<organization>Google</organization>
<address>
<postal>
<street>1600 Amphitheatre Parkway</street>
<city>Mountain View, CA</city>
<code>94043</code>
<country>US</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author fullname="Erik Kline" initials="E." surname="Kline">
<organization>Loon</organization>
<address>
<postal>
<street>1600 Amphitheatre Parkway</street>
<city>Mountain View, CA</city>
<code>94043</code>
<country>US</country>
</postal>
<phone/>
<email>[email protected]</email>
</address>
</author>
<date month="July" year="2020"/>
<abstract>
<t>In many environments offering short-term or temporary Internet access
(such as coffee shops), it is common to start new connections in a
captive portal mode. This highly restricts what the user can do
until the user has satisfied the captive portal conditions.</t>
<t>This document describes a DHCPv4 and DHCPv6 option and a Router Advertisement
(RA) option to inform clients that they are behind some sort of
captive portal enforcement device, and that they will need to satify the
Captive Portal conditions to get
Internet access. It is not a full solution to address all of the issues
that clients may have with captive portals; it is designed to be one
component of a standardized approach for hosts to interact with such
portals. While this document defines how the network operator may convey
the captive portal API endpoint to hosts, the specific methods of
satisfying and interacting with the captive portal are out of
scope of this document.</t>
<t>This document replaces <xref target="RFC7710"/>. <xref target="RFC7710"/>
used DHCP code point 160. Due to a conflict, this document specifies 114.
Consequently, this document also updates <xref target="RFC3679"/>.</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>In many environments, users need to connect to a captive portal
device and agree to an Acceptable Use Policy (AUP) and / or provide
billing information before they can access the Internet. Regardless of
how that mechanism operates, this document provides functionality
to allow the client to know when it is
behind a captive portal and how to contact it.</t>
<t>In order to present users with the payment or AUP pages, presently a
captive portal enforcement device has to intercept the user's connections and
redirect the user to a captive portal server, using methods that are very
similar to man-in-the-middle (MITM) attacks. As increasing focus is
placed on security, and end nodes adopt a more secure stance, these
interception techniques will become less effective and/or more
intrusive.</t>
<t>This document describes a DHCPv4 <xref target="RFC2131"/> and DHCPv6
<xref target="RFC8415"/> option (Captive-Portal) and an IPv6
Router Advertisement (RA) <xref target="RFC4861"/> option that informs
clients that they are behind a captive portal enforcement device and
the API endpoint that the host can contact for more information.</t>
<t>This document replaces RFC 7710 <xref target="RFC7710"/>.</t>
<section title="Requirements Notation">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when,
and only when, they appear in all capitals, as shown here.</t>
</section>
</section>
<section anchor="option" title="The Captive-Portal Option">
<t>The Captive-Portal DHCP / RA Option informs the client that it may be
behind a captive portal and provides the URI to access an API as defined
by [draft-ietf-capport-api]. This is primarily intended to improve the
user experience by showing the user the captive portal information faster and more
reliably. Note that, for the foreseeable future, captive portals will
still need to implement interception techniques to serve legacy
clients, and clients will need to perform probing to detect captive
portals"; nonetheless, the mechanism provided by this document provides
a more reliable and performant way to do so, and is therefore the preferred
mechanism for captive portal detection.</t>
<t>Clients that support the Captive Portal DHCP option SHOULD include the
option in the Parameter Request List in DHCPREQUEST messages. DHCP servers
MAY send the Captive Portal option without any explicit request.</t>
<t>In order to support multiple "classes" of clients (e.g. IPv4 only,
IPv6 only with DHCPv6 (<xref target="RFC8415"/>), and IPv6 only with RA) the
captive network can provision the client with the URI via multiple methods (IPv4 DHCP, IPv6
DHCP, and IPv6 RA). The captive portal operator SHOULD ensure that the URIs
provisioned by each method are identical to reduce the chance of operational problems.
As the maximum length of the URI that can be carried in IPv4 DHCP is 255
bytes, URIs longer than this SHOULD NOT be provisioned by any of the IPv6
options described in this document. In IPv6-only environments
this restriction can be relaxed.</t>
<t>In all variants of this option, the URI MUST be that of the captive
portal API endpoint [draft-ietf-capport-api].
</t>
<t>A captive portal MAY do content negotiation (<xref target="RFC7231"/>
section 3.4) and attempt to redirect clients querying without an
explicit indication of support for the captive portal API content type
(i.e. without application/capport+json listed explicitly anywhere within
an Accept header vis. <xref target="RFC7231"/> section 5.3). In so
doing, the captive portal SHOULD redirect the client to the value
associated with the "user-portal-url" API key. When performing such
content negotiation (<xref target="RFC7231"/> Section 3.4), implementors
of captive portals need to keep in mind that such responses might be
cached, and therefore SHOULD include an appropriate Vary header field
(<xref target="RFC7231"/> Section 7.1.4) or set the Cache-Control header
field in any responses to "private", or a more restrictive value such as
"no-store" <xref target="RFC7234"/> Section 5.2.2.3).
</t>
<t>The URI SHOULD NOT contain an IP address literal. Exceptions to this
might include networks with only one operational IP address family where
DNS is either not available or not fully functional until the captive
portal has been satisfied. Use of iPAddress certificates (<xref target="RFC3779"/>)
adds considerations that are out of scope for this document.</t>
<t>Networks with no captive portals may explicitly indicate this
condition by using this option with the IANA-assigned URI for this
purpose. Clients observing the URI value
"urn:ietf:params:capport:unrestricted" may forego time-consuming forms of
captive portal detection.</t>
<section anchor="dhcpv4opt" title="IPv4 DHCP Option">
<t>The format of the IPv4 Captive-Portal DHCP option is shown
below.<figure>
<artwork><![CDATA[
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Code | Len | URI (variable length) ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. ...URI continued... .
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure></t>
<t><list style="symbols">
<t>Code: The Captive-Portal DHCPv4 Option (114) (one octet)</t>
<t>Len: The length (one octet), in octets, of the URI.</t>
<t>URI: The URI for the captive portal API endpoint to which the
user should connect (encoded following the rules in <xref
target="RFC3986"/>).</t>
</list>See <xref target="RFC2132"/>, Section 2 for more on the format
of IPv4 DHCP options.</t>
<t>Note that the URI parameter is not null terminated.</t>
</section>
<section anchor="dhcpv6opt" title="IPv6 DHCP Option">
<t>The format of the IPv6 Captive-Portal DHCP option is shown below.
<figure>
<artwork><![CDATA[
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| option-code | option-len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. URI (variable length) .
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure></t>
<t><list style="symbols">
<t>option-code: The Captive-Portal DHCPv6Option (103) (two
octets)</t>
<t>option-len: The unsigned 16-bit length, in octets, of the URI.
</t>
<t>URI: The URI for the captive portal API endpoint to which the
user should connect (encoded following the rules in <xref
target="RFC3986"/>).</t>
</list>See <xref target="RFC7227"/>, Section 5.7 for more examples
of DHCP Options with URIs. See <xref target="RFC8415"/>, Section 21.1
for more on the format of IPv6 DHCP options.</t>
<t>Note that the URI parameter is not null terminated.</t>
<t>As the maximum length of the URI that can be carried in IPv4 DHCP is
255 bytes, URIs longer than this SHOULD NOT be provisioned via
IPv6 DHCP options.</t>
</section>
<section anchor="v6ndopt" title="The Captive-Portal IPv6 RA Option">
<t>This section describes the Captive-Portal Router Advertisement
option.</t>
<t><figure>
<artwork><![CDATA[
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | URI .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .
. .
. .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: Captive-Portal RA Option Format]]></artwork>
</figure></t>
<t><list style="hanging">
<t hangText="Type">37</t>
<t hangText="Length">8-bit unsigned integer. The length of the
option (including the Type and Length fields) in units of 8
bytes.</t>
<t hangText="URI">The URI for the captive portal API endpoint to
which the user should connect. This MUST be padded with NUL
(0x00) to make the total option length (including the Type and
Length fields) a multiple of 8 bytes.</t>
</list></t>
<t>Note that the URI parameter is not guaranteed to be null terminated.</t>
<t>As the maximum length of the URI that can be carried in IPv4 DHCP is
255 bytes, URIs longer than this SHOULD NOT be provisioned via
IPv6 RA options.</t>
</section>
</section>
<section anchor="precedence" title="Precedence of API URIs">
<t>A device may learn about Captive Portal API URIs through more than
one of (or indeed all of) the above options. Implementations can select
their own precedence order (e.g., prefer one of the IPv6 options before
the DHCPv4 option, or vice versa, et cetera).</t>
<t>If the URIs learned via more than one option described in <xref
target="option"/> are not all identical, this condition should be logged
for the device owner or administrator; it is a network configuration error
if the learned URIs are not all identical.</t>
</section>
<section anchor="iana" title="IANA Considerations">
<t>This document requests one new IETF URN protocol parameter (<xref
target="RFC3553"/>) entry. This document also requests a reallocation
of DHCPv4 option codes (see <xref target="exp106"/> for background).</t>
<t>Thanks IANA!</t>
<section anchor="iana-urn"
title="Captive Portal Unrestricted Identifier">
<t>This document registers a new entry under the IETF URN
Sub-namespace for Registered Protocol Parameter Identifiers
defined in <xref target="RFC3553"/>:
<list style="hanging">
<t hangText="Registered Parameter Identifier:">capport:unrestricted</t>
<t hangText="Reference:">RFC TBD (this document)</t>
<t hangText="IANA Registry Reference:">RFC TBD (this document)</t>
</list></t>
<t>Only one value is defined (see URN above). No hierarchy is defined and
therefore no sub-namespace registrations are possible.</t>
</section>
<section anchor="ietf_dhcpv4_option_code_change"
title="BOOTP Vendor Extensions and DHCP Options Code Change">
<t>
[ RFC Ed: Please remove before publication:
RFC7710 uses DHCP Code 160 -- unfortunately, it was discovered that this option code is already widely used by Polycom (see appendix).
Option 114 (URL) is currently assigned to Apple (RFC3679, Section 3.2.3 - Contact: Dieter Siegmund, [email protected] - Reason to recover: Never published in an RFC)
Tommy Pauly (Apple) and Dieter Siegmund confirm that this codepoint hasn't been used, and Apple is willing to relinquish it for use in CAPPORT.
Please see thread: https://mailarchive.ietf.org/arch/msg/captive-portals/TmqQz6Ma_fznD3XbhwkH9m2dB28 for more background. ]
</t>
<t>The IANA is requested to update the
"BOOTP Vendor Extensions and DHCP Options" registry
(https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml)
as follows.</t>
<t><figure><artwork><![CDATA[ Tag: 114
Name: DHCP Captive-Portal
Data Length: N
Meaning: DHCP Captive-Portal
Reference: [THIS-RFC]]]></artwork></figure></t>
<t><figure><artwork><![CDATA[ Tag: 160
Name: Unassigned
Data Length:
Meaning: Previously assigned by RFC7710; known to also be used by Polycom.
Reference: [THIS-RFC][RFC7710]]]></artwork></figure></t>
</section>
<section anchor="iana_update_dhcv6_and_icmpv6"
title="Update DHCPv6 and IPv6 ND Options Registries">
<t>This document requests that the DHCPv6 and IPv6 ND options previously
registered in <xref target="RFC7710"/> be updated to reference this
document.</t>
</section>
</section>
<section anchor="security" title="Security Considerations">
<t>By removing or reducing the need for captive portals to perform MITM
hijacking, this mechanism improves security by making the portal and its
actions visible, rather than hidden, and reduces the likelihood that users
will disable useful security safeguards like DNSSEC validation, VPNs, etc
in order to interact with the captive portal.
In addition, because the system knows that it is behind a captive portal,
it can know not to send cookies, credentials, etc. By handing out a URI
which is protected with TLS, the captive portal operator can attempt to
reassure the user that the captive portal is not malicious.</t>
<t>Clients processing these options SHOULD validate that the option's
contents conform to the validation requirements for URIs, including
<xref target="RFC3986"/>.</t>
<t>Each of the options described in this document is presented to a node
using the same protocols used to provision other information critical
to the node's successful configuration on a network. The security
considerations applicable to each of these provisioning mechanisms also
apply when the node is attempting to learn the information conveyed in
these options. In the absence of security measures like RA Guard
(<xref target="RFC6105"/>, <xref target="RFC7113"/>) or DHCP Shield
<xref target="RFC7610"/>, an attacker could inject, modify, or block DHCP
messages or RAs.</t>
<t>An attacker with the ability to inject DHCP messages or RAs
could include an option from this document to force users to contact
an address of his choosing. As an attacker with this capability could
simply list themselves as the default gateway (and so intercept all the
victim's traffic); this does not provide them with significantly more
capabilities, but because this document removes the need for
interception, the attacker may have an easier time performing the
attack.</t>
<t>However, as the operating systems and application(s) that make use of
this information know that they are connecting to a captive portal device
(as opposed to intercepted connections where the OS/application may not
know that they are connecting to a captive portal or hostile device)
they can render the page in a
sandboxed environment and take other precautions, such as clearly
labeling the page as untrusted. The means of sandboxing and user
interface presenting this information is not covered in this document -
by its nature it is implementation specific and best left to the
application and user interface designers.</t>
<t>Devices and systems that automatically connect to an open network
could potentially be tracked using the techniques described in this
document (forcing the user to continually re-satisfy the Captive Portal
conditions, or exposing their browser fingerprint). However,
similar tracking can already be performed with the presently common
captive portal mechanisms, so this technique does not give the attackers
more capabilities.</t>
<t>Captive portals are increasingly hijacking TLS connections to force
browsers to talk to the portal. Providing the portal's URI via a DHCP or
RA option is a cleaner technique, and reduces user expectations of being
hijacked - this may improve security by making users more reluctant to
accept TLS hijacking, which can be performed from beyond the network
associated with the captive portal.</t>
</section>
<section title="Acknowledgements">
<t>This document is a -bis of RFC7710. Thanks to all of the original
authors (Warren Kumari, Olafur Gudmundsson, Paul Ebersman, Steve Sheng),
and original contributors.</t>
<t>Also thanks to the CAPPORT WG for all of the discussion and
improvements including contributions and review from Joe Clarke,
Lorenzo Colitti, Dave Dolson, Hans Kuhn, Kyle Larose, Clemens Schimpe,
Martin Thomson, Michael Richardson,
Remi Nguyen Van, Subash Tirupachur Comerica, Bernie Volz,
and Tommy Pauly.</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include='reference.RFC.2131'?>
<?rfc include='reference.RFC.2132'?>
<?rfc include='reference.RFC.2119'?>
<?rfc include='reference.RFC.3553'?>
<?rfc include='reference.RFC.3986'?>
<?rfc include='reference.RFC.4861'?>
<?rfc include='reference.RFC.7227'?>
<?rfc include='reference.RFC.7231'?>
<?rfc include='reference.RFC.7234'?>
<?rfc include='reference.RFC.8174'?>
<?rfc include='reference.RFC.8415'?>
</references>
<references title="Informative References">
<?rfc include='reference.RFC.3679'?>
<?rfc include='reference.RFC.3779'?>
<?rfc include='reference.RFC.6105'?>
<?rfc include='reference.RFC.7113'?>
<?rfc include='reference.RFC.7610'?>
<?rfc include='reference.RFC.7710'?>
</references>
<section title="Changes / Author Notes.">
<t>[RFC Editor: Please remove this section before publication ]</t>
<t>From initial to -00.</t>
<t><list style="symbols">
<t>Import of RFC7710.</t>
</list></t>
<t>From -00 to -01.</t>
<t><list style="symbols">
<t>Remove link-relation text.</t>
<t>Clarify option should be in DHCPREQUEST parameter list.</t>
<t>Uppercase some SHOULDs.</t>
</list></t>
</section>
<section anchor="diff7710" title="Changes from RFC 7710">
<t>This document incorporates the following changes from <xref
target="RFC7710"/>.</t>
<t><list style="numbers">
<t>Clarify that IP string literals are NOT RECOMMENDED.</t>
<t>Clarify that the option URI MUST be that of the captive portal
API endpoint.</t>
<t>Clarify that captive portals MAY do content negotiation.</t>
<t>Added text about Captive Portal API URI precedence in the event
of a network configuration error.</t>
<t>Added urn:ietf:params:capport:unrestricted URN.</t>
<t>Notes that the DHCPv4 Option Code changed from 160 to 114.</t>
</list></t>
</section>
<section anchor="exp106"
title="Observations From IETF 106 Network Experiment">
<t>During IETF 106 in Singapore an <eref
target="https://tickets.meeting.ietf.org/wiki/IETF106network#Experiments"
>experiment</eref> enabling Captive Portal API compatible clients to
discover a venue-info-url (see <eref
target="https://tickets.meeting.ietf.org/wiki/CAPPORT">
experiment description</eref> for more detail) revealed that some
Polycom devices on the same network made use of DHCPv4 option code 160
for <eref
target="https://community.polycom.com/t5/VoIP-SIP-Phones/DHCP-Standardization-160-vs-66/td-p/72577"
>other purposes</eref>.</t>
<t>The presence of DHCPv4 Option code 160 holding a value indicating the
Captive Portal API URL caused these devices to not function as desired.
For this reason, this document requests IANA deprecate option code 160 and
reallocate different value to be used for the Captive Portal API URL.</t>
</section>
</back>
</rfc>