Local HTTPS

Unofficial Proposal Draft,

More details about this document
This version:
https://WICG.github.io/local-peer-to-peer/local-https.html
Issue Tracking:
GitHub
Inline In Spec
Editors:
(Intel)
(Intel)
(Twintag)
(Intel)

Abstract

Local HTTPS lets user agents validate HTTPS servers under .local against name-constrained trust anchors that the user added through a Local Peer-to-Peer trust ceremony, using ordinary certificate path validation.

Status of this document

Note: This document was split out of the Local Peer-to-Peer API specification. It is an early, unofficial draft that sets a direction. Open questions are marked as issues.

Local HTTPS is a work in progress. [Issue #34]

1. Introduction

This section is non-normative.

Browsers can’t reach a NAS, printer or TV on the local network over HTTPS without a public name, a certificate authority and an internet connection. Local HTTPS uses ordinary X.509 certificate path validation [RFC5280] instead, with two differences from the Web PKI:

  1. Trust anchors are added by the user through a trust ceremony, such as Local Peer-to-Peer authentication, instead of a root program. Each anchor is limited to a namespace under .local.

  2. Requests from a page are scoped to the anchors for devices that the page was granted.

The origin model, CORS, the Origin header and Local Network Access are unchanged.

2. Local trust anchors

Local HTTPS uses the local trust store of Local Peer-to-Peer, one per user profile, separate from the Web PKI root store. Its trust anchors, here called local trust anchors, are added through a trust ceremony as defined there. For Local HTTPS, each anchor’s scope is a namespace, kept as name constraints in the trust store entry, as in [RFC5914]:

The namespace comes from the name the device advertises, and is trusted only once the ceremony has authenticated the device. Anchors with the same key merge, as defined by Local Peer-to-Peer. Anchors with different keys MUST NOT both be able to certify a host: the most specific namespace that contains a host decides which anchor may certify it, as with DNS delegation, and a trust ceremony MUST NOT add an anchor that would change which key certifies a host already in use, such as a known peer or a host with site data. So at most one key can certify a given host.

Define how the ceremony conveys and confirms the namespace, for devices and for referees.

Rotating an anchor key needs a proof of continuity, which is out of scope.

3. Local origins

A local host is a host that is a domain under local., which is resolved by Multicast DNS and never by global DNS [RFC6762].

A URL targets a local origin if its host is a local host within the namespace of one of the request’s applicable anchors. If its scheme is http, the user agent upgrades it to https, as for a known HSTS host. For any other URL, behaviour is unchanged.

Should other special-use local domains, such as home.arpa [RFC8375], be included?

3.1. Validation

The user agent finds the address of a local origin through discovery, which is untrusted, as DNS is. It sends the host in SNI and validates the certificate path [RFC5280] with:

Certificate errors for a local origin MUST NOT be overridable. Leaves and intermediates can be short-lived and rotate freely.

Should the user agent also authenticate as a client? The requesting origin would still only be asserted.

3.2. Upgrade signal

A device might signal that it supports Local HTTPS, and which anchor it chains to, so that the user agent can try the upgrade or offer the matching trust ceremony. Such a signal would only be a hint and MUST NOT add an anchor or affect validation.

Define whether and how a device signals support. Candidates are tied to HTTP or TLS, for example a response header on http: in the spirit of HSTS and Alt-Svc, or the certificate chain presented when an https: connection is attempted. The IETF SETTLE working group may define one.

4. Scopes

The applicable anchors for a request are:

A peer grant covers part of a namespace, by default one device and its services, such as nas.local and *.nas.local. It acts as an extra name constraint, so a page granted one device can’t reach another device under the same referee.

The user agent MUST NOT resolve, connect to or probe a local host for a page outside its applicable anchors.

Which scope applies to navigations that a page starts?

Is a peer grant keyed by origin or by top-level site?

5. Origins, Fetch and Local Network Access

A local origin has the usual tuple, for example (https, nas.local, 443), and is a secure context. Because at most one key can certify a host, the tuple is unambiguous within a profile. A different nas device fails validation, and an unpaired http://nas.local is a different origin.

When a local trust anchor is removed, the user agent MUST clear site data for all hosts in its namespace.

Requests to local origins are ordinary requests [FETCH]: servers apply CORS based on the Origin header, and WebTransport servers check Origin [WEBTRANSPORT]. A peer grant satisfies the Local Network Access permission for the hosts it covers only. CSP is not extended: connect-src https://*.local works.

Note: Unlike "Expanding what HTTPS means", this doesn’t add the server’s key to the origin tuple; allowing at most one key per host already makes names unambiguous.

6. User interface

For a top-level local origin, the user agent SHOULD show a "paired device" indicator with the host, and the referee if any (for example "via Home"), outside the content area.

The user agent MUST NOT show a name supplied by the device unless it obtained the name after the trust ceremony authenticated the device.

7. Examples

This section is non-normative.

A device with several services: a daemon on the NAS holds the anchor key and acts as a local intermediate, issuing leaves to print.nas.local and media.nas.local. A page granted the NAS can use both.
A referee, as in REQ-ARCH-02 of the SETTLE requirements: the user pairs once with a home hub for *.home.local. The hub issues a device intermediate for *.nas.home.local, which issues service leaves. New devices work without pairing each one.
A Matter fabric: a browser that joins a fabric as an ordinary node, as any Matter node does, trusts that fabric’s root. That root could act as an anchor for a namespace for the fabric, such as *.matter.local.

8. Security and privacy considerations

Conformance

Document conventions

Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [RFC2119]

Examples in this specification are introduced with the words “for example” or are set apart from the normative text with class="example", like this:

This is an example of an informative example.

Informative notes begin with the word “Note” and are set apart from the normative text with class="note", like this:

Note, this is an informative note.

Index

Terms defined by this specification

Terms defined by reference

References

Normative References

[HTML]
Anne van Kesteren; et al. HTML Standard. Living Standard. URL: https://html.spec.whatwg.org/multipage/
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://datatracker.ietf.org/doc/html/rfc2119
[URL]
Anne van Kesteren. URL Standard. Living Standard. URL: https://url.spec.whatwg.org/

Non-Normative References

[FETCH]
Anne van Kesteren. Fetch Standard. Living Standard. URL: https://fetch.spec.whatwg.org/
[LOCAL-NETWORK-ACCESS]
Local Network Access. Draft Community Group Report. URL: https://wicg.github.io/local-network-access/
[RFC5280]
D. Cooper; et al. Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile. May 2008. Proposed Standard. URL: https://www.rfc-editor.org/info/rfc5280/
[RFC5914]
R. Housley; S. Ashmore; C. Wallace. Trust Anchor Format. June 2010. Proposed Standard. URL: https://www.rfc-editor.org/info/rfc5914/
[RFC6762]
S. Cheshire; M. Krochmal. Multicast DNS. February 2013. Proposed Standard. URL: https://www.rfc-editor.org/info/rfc6762/
[RFC8375]
P. Pfister; T. Lemon. Special-Use Domain 'home.arpa.'. May 2018. Proposed Standard. URL: https://www.rfc-editor.org/info/rfc8375/
[RFC9525]
P. Saint-Andre; R. Salz. Service Identity in TLS. November 2023. Proposed Standard. URL: https://www.rfc-editor.org/info/rfc9525/
[WEBTRANSPORT]
Jan-Ivar Bruaroey; Victor Vasiliev; Nidhi Jaju. WebTransport. URL: https://w3c.github.io/webtransport/

Issues Index

Local HTTPS is a work in progress. [Issue #34] ↵
Define how the ceremony conveys and confirms the namespace, for devices and for referees. ↵
Rotating an anchor key needs a proof of continuity, which is out of scope. ↵
Should other special-use local domains, such as home.arpa [RFC8375], be included? ↵
Should the user agent also authenticate as a client? The requesting origin would still only be asserted. ↵
Define whether and how a device signals support. Candidates are tied to HTTP or TLS, for example a response header on http: in the spirit of HSTS and Alt-Svc, or the certificate chain presented when an https: connection is attempted. The IETF SETTLE working group may define one. ↵
Which scope applies to navigations that a page starts? ↵
Is a peer grant keyed by origin or by top-level site? ↵