< draft-ietf-capport-api-02.txt   draft-ietf-capport-api-03.txt >
Captive Portal Interaction T. Pauly, Ed. Captive Portal Interaction T. Pauly, Ed.
Internet-Draft Apple Inc. Internet-Draft Apple Inc.
Intended status: Standards Track D. Thakore, Ed. Intended status: Standards Track D. Thakore, Ed.
Expires: September 12, 2019 CableLabs Expires: January 7, 2020 CableLabs
March 11, 2019 July 06, 2019
Captive Portal API Captive Portal API
draft-ietf-capport-api-02 draft-ietf-capport-api-03
Abstract Abstract
This document describes an HTTP API that allows clients to interact This document describes an HTTP API that allows clients to interact
with a Captive Portal system. with a Captive Portal system.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 32 skipping to change at page 1, line 32
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 12, 2019. This Internet-Draft will expire on January 7, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 14 skipping to change at page 2, line 14
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4. API Details . . . . . . . . . . . . . . . . . . . . . . . . . 3 4. API Details . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.1. URI of Captive Portal API endpoint . . . . . . . . . . . 3 4.1. URI of Captive Portal API endpoint . . . . . . . . . . . 3
4.1.1. Server Authentication . . . . . . . . . . . . . . . . 4 4.1.1. Server Authentication . . . . . . . . . . . . . . . . 4
4.2. JSON Keys . . . . . . . . . . . . . . . . . . . . . . . . 4 4.2. JSON Keys . . . . . . . . . . . . . . . . . . . . . . . . 4
4.3. An Example Interaction . . . . . . . . . . . . . . . . . 5 4.3. Example Interaction . . . . . . . . . . . . . . . . . . . 5
5. Security Considerations . . . . . . . . . . . . . . . . . . . 6 5. Security Considerations . . . . . . . . . . . . . . . . . . . 6
5.1. Privacy Considerations . . . . . . . . . . . . . . . . . 6 5.1. Privacy Considerations . . . . . . . . . . . . . . . . . 7
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 7 6.1. Captive Portal API JSON Media Type Registration . . . . . 7
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 6.2. Captive Portal API Keys Registry . . . . . . . . . . . . 8
8.1. Normative References . . . . . . . . . . . . . . . . . . 7 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8
8.2. Informative References . . . . . . . . . . . . . . . . . 8 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 8.1. Normative References . . . . . . . . . . . . . . . . . . 9
8.2. Informative References . . . . . . . . . . . . . . . . . 9
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10
1. Introduction 1. Introduction
This document describes a HyperText Transfer Protocol (HTTP) This document describes a HyperText Transfer Protocol (HTTP)
Application Program Interface (API) that allows clients to interact Application Program Interface (API) that allows clients to interact
with a Captive Portal system. The API defined in this document has with a Captive Portal system. The API defined in this document has
been designed to meet the requirements in the Captive Portal been designed to meet the requirements in the Captive Portal
Architecture [I-D.ietf-capport-architecture]. Specifically, the API Architecture [I-D.ietf-capport-architecture]. Specifically, the API
provides: provides:
skipping to change at page 2, line 47 skipping to change at page 2, line 49
captivity captivity
o An encrypted connection (TLS for both the API and portal URI) o An encrypted connection (TLS for both the API and portal URI)
2. Terminology 2. Terminology
This document leverages the terminology and components described in This document leverages the terminology and components described in
[I-D.ietf-capport-architecture] and additionally uses the following [I-D.ietf-capport-architecture] and additionally uses the following
association: association:
o Captive Portal Client: The client that interacts with the captive o Captive Portal Client: The client that interacts with the Captive
portal API is typically some application running on the User Portal API is typically some application running on the User
Equipment that is connected to the Captive Network. This is also Equipment that is connected to the Captive Network. This is also
referred to as the "client" in this document. referred to as the "client" in this document.
o Captive Portal API Server: The server exposing the API's defined o Captive Portal API Server: The server exposing the API's defined
in this document to the client. This is also referred to as the in this document to the client. This is also referred to as the
"API server" in this document. "API server" in this document.
3. Workflow 3. Workflow
The Captive Portal Architecture defines three steps of interaction The Captive Portal Architecture defines several categories of
between clients and a Captive Portal service: interaction between clients and Captive Portal systems:
1. Provisioning, in which a client discovers that a network has a 1. Provisioning, in which a client discovers that a network has a
captive portal, and learns the URI of the API server captive portal, and learns the URI of the API server.
2. API Server interaction, in which a client queries the state of 2. API Server interaction, in which a client queries the state of
the captive portal and retrieves the necessary information to get the captive portal and retrieves the necessary information to get
out of captivity out of captivity.
3. Enforcement, in which the enforcement device in the network 3. Enforcement, in which the enforcement device in the network
blocks disallowed traffic, and sends ICMP messages to let clients blocks disallowed traffic.
know they are blocked by the captive portal
This document is focused on the second step. It is assumed that the This document defines the mechanisms used in the second category. It
location of the Captive Portal API server has been discovered by the is assumed that the location of the Captive Portal API server has
client as part of the first step. The mechanism for discovering the been discovered by the client as part of Provisioning. The mechanism
API Server endpoint is not covered by this document. for discovering the API Server endpoint is not covered by this
document.
4. API Details 4. API Details
4.1. URI of Captive Portal API endpoint 4.1. URI of Captive Portal API endpoint
The URI of the API endpoint MUST be accessed using HTTP over TLS The URI of the API endpoint MUST be accessed using HTTP over TLS
(HTTPS) and SHOULD be served on port 443 [RFC2818]. The client (HTTPS) and SHOULD be served on port 443 [RFC2818]. The client
SHOULD NOT assume that the URI for a given network attachment will SHOULD NOT assume that the URI for a given network attachment will
stay the same, and SHOULD rely on the discovery or provisioning stay the same, and SHOULD rely on the discovery or provisioning
process each time it joins the network. Depending on how the Captive process each time it joins the network. Depending on how the Captive
skipping to change at page 4, line 50 skipping to change at page 4, line 50
If the client is unable to validate the certificate presented by the If the client is unable to validate the certificate presented by the
API server, it MUST NOT proceed with any of the behavior for API API server, it MUST NOT proceed with any of the behavior for API
interaction described in this document. The client will proceed to interaction described in this document. The client will proceed to
interact with the captive network as if the API capabilities were not interact with the captive network as if the API capabilities were not
present. It may still be possible for the user to access the network present. It may still be possible for the user to access the network
by being redirected to a web portal. by being redirected to a web portal.
4.2. JSON Keys 4.2. JSON Keys
The Captive Portal API data structures are specified in JavaScript The Captive Portal API data structures are specified in JavaScript
Object Notation (JSON) [RFC7159]. Requests and responses for the Object Notation (JSON) [RFC8259]. Requests and responses for the
Captive Portal API use the "application/captive+json" media type. Captive Portal API use the "application/captive+json" media type.
Clients SHOULD include this media type as an Accept header in their Clients SHOULD include this media type as an Accept header in their
GET requests, and servers MUST mark this media type as their Content- GET requests, and servers MUST mark this media type as their Content-
Type header in responses. Type header in responses.
The following keys are defined at the top-level of the JSON structure The following keys are defined at the top-level of the JSON structure
returned by the API server: returned by the API server:
o "captive" (required, boolean): indicates whether the client is in o "captive" (required, boolean): indicates whether the client is in
a state of captivity, i.e it has not satisfied the conditions to a state of captivity, i.e it has not satisfied the conditions to
access the external network. If the client is captive (i.e. access the external network. If the client is captive (i.e.
captive=true), it can still be allowed enough access for it to captive=true), it can still be allowed enough access for it to
perform server authentication Section 4.1.1. perform server authentication Section 4.1.1.
o "user-portal-url" (required, string): provides the URL of a web o "user-portal-url" (optional, string): provides the URL of a web
portal with which a user can interact. portal with which a user can interact.
o "vendor-info-url" (optional, string): provides the URL of a o "venue-info-url" (optional, string): provides the URL of a webpage
webpage or site on which the operator of the network has or site on which the operator of the network has information that
information that it wishes to share with the user (e.g. store it wishes to share with the user (e.g., store info, maps, flight
info, maps, flight status, or entertainment). status, or entertainment).
o "expire-date" (optional, string formatted as [RFC3339] datetime): o "expire-date" (optional, string formatted as [RFC3339] datetime):
indicates the date and time after which the client will be in a indicates the date and time after which the client will be in a
captive state. The API server SHOULD include this value if the captive state. The API server SHOULD include this value if the
client is not captive (i.e. captive=false) and SHOULD omit this client is not captive (i.e. captive=false) and SHOULD omit this
value for captive clients. value for captive clients.
o "bytes-remaining" (optional, integer): indicates the number of o "bytes-remaining" (optional, integer): indicates the number of
bytes remaining, after which the client will be in placed into a bytes remaining, after which the client will be in placed into a
captive state. captive state. The byte count represents the total number of IP
packet (layer 3) bytes sent and received by the client. Captive
portal systems might not count traffic to whitelisted servers,
such as the API server, but clients cannot rely on such behavior.
4.3. An Example Interaction The valid JSON keys can be extended by adding entries to the Captive
Portal API Keys Registry Section 6. If a client receives a key that
it does not recognize, it MUST ignore the key and any associated
values. All keys other than the ones defined in this document as
"required" will be considered optional.
4.3. Example Interaction
A client connected to a captive network upon discovering the URI of A client connected to a captive network upon discovering the URI of
the API server will query the API server to retrieve information the API server will query the API server to retrieve information
about its captive state and conditions to escape captivity. To about its captive state and conditions to escape captivity. To
request the Captive Portal JSON content, a client sends an HTTP GET request the Captive Portal JSON content, a client sends an HTTP GET
request: request:
GET /captive-portal/api/X54PD GET /captive-portal/api/X54PD
Host: example.org Host: example.org
Accept: application/captive+json Accept: application/captive+json
skipping to change at page 6, line 13 skipping to change at page 6, line 19
The server then responds with the JSON content for that client: The server then responds with the JSON content for that client:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Cache-Control: private Cache-Control: private
Date: Mon, 04 Dec 2013 05:07:35 GMT Date: Mon, 04 Dec 2013 05:07:35 GMT
Content-Type: application/captive+json Content-Type: application/captive+json
{ {
"captive": true, "captive": true,
"user-portal-url": "https://example.org/portal.html", "user-portal-url": "https://example.org/portal.html",
"vendor-info-url": "https://flight.example.com/entertainment", "venue-info-url": "https://flight.example.com/entertainment",
"expire-date": "2014-01-01T23:28:56.782Z" "expire-date": "2014-01-01T23:28:56.782Z"
} }
Upon receiving this information the client will provide this Upon receiving this information the client will provide this
information to the user so that they may navigate the web portal (as information to the user so that they may navigate the web portal (as
specified by the user-portal-url value) to enable access to the specified by the user-portal-url value) to enable access to the
external network. Once the user satisfies the requirements for external network. Once the user satisfies the requirements for
extenal network access, the client SHOULD query the API server again extenal network access, the client SHOULD query the API server again
to verify that it is no longer captive. to verify that it is no longer captive.
5. Security Considerations 5. Security Considerations
TBD: Provide complete security requirements and analysis. One of the goals of this protocol is to improve the security of the
communication between client hosts and Captive Portal systems.
Client traffic is protected from passive listeners on the local
network by requiring TLS-encrypted connections between the client and
the Captive Portal API server, as described in Section 4. All
communication between the clients and the API server MUST be
encrypted.
In addition to encrypting communications between clients and Captive
Portal systems, this protocol requires a basic level of
authentication from the API server, as described in Section 4.1.1.
Specifically, the API server MUST present a valid certificate on
which the client can perform revocation checks. This allows the
client to ensure that the API server has authority for a hostname
that can be presented to a user.
It is important to note that while the server authentication checks
can validate a specific hostname, it is certainly possible for the
API server to present a valid certificate for a hostname that uses
non-standard characters or is otherwise designed to trick the user
into believing that its hostname is some other, more trustworthy,
name. This is a danger of any scenario in which a hostname is not
typed in by a user.
5.1. Privacy Considerations 5.1. Privacy Considerations
Information passed in this protocol may include a user's personal Information passed in this protocol may include a user's personal
information, such as a full name and credit card details. Therefore, information, such as a full name and credit card details. Therefore,
it is important that Captive Portal API Servers do not allow access it is important that Captive Portal API Servers do not allow access
to the Captive Portal API over unencrypted sessions. to the Captive Portal API over unencrypted sessions.
6. IANA Considerations 6. IANA Considerations
IANA is requested to create a registration for an "application/
captive+json" media type (Section 6.1) and a registry for fields in
that format (Section 6.2).
6.1. Captive Portal API JSON Media Type Registration
This document registers the media type for Captive Portal API JSON This document registers the media type for Captive Portal API JSON
text, "application/captive+json". text, "application/captive+json".
Type name: application Type name: application
Subtype name: captive+json Subtype name: captive+json
Required parameters: None Required parameters: None
Optional parameters: None Optional parameters: None
skipping to change at page 7, line 26 skipping to change at page 8, line 13
Authors' Addresses section. Authors' Addresses section.
Intended usage: COMMON Intended usage: COMMON
Restrictions on usage: None Restrictions on usage: None
Author: CAPPORT IETF WG Author: CAPPORT IETF WG
Change controller: IETF Change controller: IETF
6.2. Captive Portal API Keys Registry
IANA is asked to create and maintain a new registry called "Captive
Portal API Keys", which will reserve JSON keys for use in Captive
Portal API data structures. The initial contents of this registry
are provided in Section 4.2.
Each entry in the registry contains the following fields:
Key: The JSON key being registered, in string format.
Type: The type of the JSON value to be stored, as one of the value
types defined in [RFC8259].
Description: A brief description explaining the meaning of the
value, how it might be used, and/or how it should be interpreted
by clients.
New assignments for Captive Portal API Keys Registry will be
administered by IANA through Expert Review [RFC8126]. The Designated
Expert is expected to validate the existence of documentation
describing new keys in a permanent publicly available specification.
The expert is expected to validate that new keys have a clear meaning
and do not create unnecessary confusion or overlap with existing
keys. Keys that are specific to non-generic use cases, particularly
ones that are not specified as part of an IETF document, are
encouraged to use a domain-specific prefix.
7. Acknowledgments 7. Acknowledgments
This work in this document was started by Mark Donnelly and Margaret This work in this document was started by Mark Donnelly and Margaret
Cullen. Thanks to everyone in the CAPPORT Working Group who has Cullen. Thanks to everyone in the CAPPORT Working Group who has
given input. given input.
8. References 8. References
8.1. Normative References 8.1. Normative References
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818,
DOI 10.17487/RFC2818, May 2000, DOI 10.17487/RFC2818, May 2000,
<https://www.rfc-editor.org/info/rfc2818>. <https://www.rfc-editor.org/info/rfc2818>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>. <https://www.rfc-editor.org/info/rfc3339>.
skipping to change at page 8, line 5 skipping to change at page 9, line 20
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>. <https://www.rfc-editor.org/info/rfc3339>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<https://www.rfc-editor.org/info/rfc5280>. <https://www.rfc-editor.org/info/rfc5280>.
[RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
Uniform Resource Identifiers (URIs)", RFC 5785,
DOI 10.17487/RFC5785, April 2010,
<https://www.rfc-editor.org/info/rfc5785>.
[RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch,
"Network Time Protocol Version 4: Protocol and Algorithms "Network Time Protocol Version 4: Protocol and Algorithms
Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010,
<https://www.rfc-editor.org/info/rfc5905>. <https://www.rfc-editor.org/info/rfc5905>.
[RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS)
Extensions: Extension Definitions", RFC 6066, Extensions: Extension Definitions", RFC 6066,
DOI 10.17487/RFC6066, January 2011, DOI 10.17487/RFC6066, January 2011,
<https://www.rfc-editor.org/info/rfc6066>. <https://www.rfc-editor.org/info/rfc6066>.
[RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A.,
Galperin, S., and C. Adams, "X.509 Internet Public Key Galperin, S., and C. Adams, "X.509 Internet Public Key
Infrastructure Online Certificate Status Protocol - OCSP", Infrastructure Online Certificate Status Protocol - OCSP",
RFC 6960, DOI 10.17487/RFC6960, June 2013, RFC 6960, DOI 10.17487/RFC6960, June 2013,
<https://www.rfc-editor.org/info/rfc6960>. <https://www.rfc-editor.org/info/rfc6960>.
[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March Writing an IANA Considerations Section in RFCs", BCP 26,
2014, <https://www.rfc-editor.org/info/rfc7159>. RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>.
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", STD 90, RFC 8259,
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/info/rfc8259>.
8.2. Informative References 8.2. Informative References
[I-D.ietf-capport-architecture] [I-D.ietf-capport-architecture]
Larose, K. and D. Dolson, "CAPPORT Architecture", draft- Larose, K. and D. Dolson, "CAPPORT Architecture", draft-
ietf-capport-architecture-03 (work in progress), December ietf-capport-architecture-04 (work in progress), June
2018. 2019.
Authors' Addresses Authors' Addresses
Tommy Pauly (editor) Tommy Pauly (editor)
Apple Inc. Apple Inc.
One Apple Park Way One Apple Park Way
Cupertino, California 95014 Cupertino, California 95014
United States of America United States of America
Email: tpauly@apple.com Email: tpauly@apple.com
 End of changes. 24 change blocks. 
45 lines changed or deleted 112 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/