Re: [arch-d] Treating "private" address ranges specially

Ted Hardie <ted.ietf@gmail.com> Wed, 31 March 2021 09:08 UTC

Return-Path: <ted.ietf@gmail.com>
X-Original-To: architecture-discuss@ietfa.amsl.com
Delivered-To: architecture-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 597F03A2109 for <architecture-discuss@ietfa.amsl.com>; Wed, 31 Mar 2021 02:08:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.854
X-Spam-Level:
X-Spam-Status: No, score=-0.854 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, NUMERIC_HTTP_ADDR=1.242, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H4aV5hikfn4K for <architecture-discuss@ietfa.amsl.com>; Wed, 31 Mar 2021 02:08:26 -0700 (PDT)
Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4C8EB3A210B for <architecture-discuss@ietf.org>; Wed, 31 Mar 2021 02:08:26 -0700 (PDT)
Received: by mail-oi1-x230.google.com with SMTP id z15so19344369oic.8 for <architecture-discuss@ietf.org>; Wed, 31 Mar 2021 02:08:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CdSPMBUsiV70tbmCSoSXBBqdNdoSUaYLe61m37dkI3M=; b=gzbslt/3S/pf2Z1NOLqraZ5j6yAo2IVb9c1I1VH8em83G2pvvfrmA2GA/lD3A5pLRx CgZ3yJIKBFcD6hy6Z0JV+rdV+tnFvxTsagSFsNeUN3YwP28UjSRqY4Ar+vwL35hdCQhp NZ8fkNACqIv3Q0x9KbxBjiQ+Tt3ndobA3b04cLDlvp9hp+KhHQ78nrao9xRwvjc+zebN Hsocab4mdIYmhlT+P71zcGGn2d9zQO+uJNFTikzIt8Iwj3zPn+uf5eJ3yNTLJW4R/WO3 MTmN2nBRRY/MWnn6rRpqAGmaU1zI+sdEPCE16zOARKYijINCr0Nga7y5vLm9AnA7Kqi5 8X/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CdSPMBUsiV70tbmCSoSXBBqdNdoSUaYLe61m37dkI3M=; b=ctpiUwvW4+DLRtJyopygCSTHODBIzbCa9Ew5kS9pZw/lYUK2m1pRUD2J3qW27uEjUu Al4dScZUXcMmlbwXdr1W4IRf+c7t/DycHjYQFGVS0qmqFGuk6HHCdjzhLreDBzXmLk3q 42YKFkGa6VQGfX/AE4T9/aqtdxbaunsIXPnGLd3KgHZgN5mdzcEC/KYrzO/vag0YuPQO 3HR1JgDJiER5hf+B4Gu4hQXy4UDJJYxJ63P+WEHy5jcajCh5r92o90NMK1QwaQoRrS1c 0G6wEBYgs+F7Pp95HT0WIwqecxBtwrczYtHbH/bo4+o67F4Hvbu7lSZ0y/iNUDCgsA6w NeOw==
X-Gm-Message-State: AOAM530Tu7kwlrRKsDXeJpTPa3bXNe6RrnaqrEpbVnQlpKH9k0K55z6X EweeLPeKjAo+Teq2IzaRyLZgB3x2KB5CeJK0jOg=
X-Google-Smtp-Source: ABdhPJx2zzUT7qseDMumYIyDS3SUY+z0TcDAHYsbmTfBw+BZ980BP8DXuK6wJ5MKLupKMneaWfZZEl6L8dKtczun1sQ=
X-Received: by 2002:a05:6808:b21:: with SMTP id t1mr1604208oij.35.1617181704386; Wed, 31 Mar 2021 02:08:24 -0700 (PDT)
MIME-Version: 1.0
References: <4329d51a-d5ba-45b3-9fb0-6795dc6fccd3@www.fastmail.com> <CAMGpriWA4B8AThNKBOHo-bfAdQ2s5iYv8rBOB7X8UVc5GsqENA@mail.gmail.com> <CAMGpriUJkWYPyw7=oAj_GnGu2J14T3=VZYNWPZtAs870P=x0sg@mail.gmail.com> <a68636c2-5df0-46eb-8147-79ec6a992f8a@www.fastmail.com> <CAMGpriU_L8HbLFX_mMBtBXxy=XOc5BAnYgVR9R8TQO=DPvRD_g@mail.gmail.com> <F59E2FC3-19CE-4D14-9F1C-9F7125D89455@mnot.net> <CAMGpriVJCsird15oBfT=gSDTr59_yf9TkLmOSO7a9DGX0VRjOg@mail.gmail.com>
In-Reply-To: <CAMGpriVJCsird15oBfT=gSDTr59_yf9TkLmOSO7a9DGX0VRjOg@mail.gmail.com>
From: Ted Hardie <ted.ietf@gmail.com>
Date: Wed, 31 Mar 2021 10:07:58 +0100
Message-ID: <CA+9kkMB2iOA-QaCidJHVN=qqZ8TtPXV=xyfuKh+i44VzZLWG3w@mail.gmail.com>
To: Erik Kline <ek.ietf@gmail.com>
Cc: Mark Nottingham <mnot@mnot.net>, architecture-discuss@ietf.org
Content-Type: multipart/alternative; boundary="00000000000006fdd805bed175b6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/architecture-discuss/Rrq8Gn_xyHk1EYeumG45DlQoiLQ>
Subject: Re: [arch-d] Treating "private" address ranges specially
X-BeenThere: architecture-discuss@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: open discussion forum for long/wide-range architectural issues <architecture-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/architecture-discuss>, <mailto:architecture-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/architecture-discuss/>
List-Post: <mailto:architecture-discuss@ietf.org>
List-Help: <mailto:architecture-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/architecture-discuss>, <mailto:architecture-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Mar 2021 09:08:31 -0000

Following up Erik's message below.

On Wed, Mar 31, 2021 at 9:32 AM Erik Kline <ek.ietf@gmail.com> wrote:

> On Wed, Mar 31, 2021 at 12:15 AM Mark Nottingham <mnot@mnot.net> wrote:
>
>>
>>
>> > On 31 Mar 2021, at 6:07 pm, Erik Kline <ek.ietf@gmail.com> wrote:
>> >
>> > On Tue, Mar 30, 2021 at 11:21 PM Martin Thomson <mt@lowentropy.net>
>> wrote:
>> > On Wed, Mar 31, 2021, at 17:17, Erik Kline wrote:
>> > > My mistake.  I think the key text I didn't property absord was "the
>> > > current url's host".
>> >
>> > :) Yes, though if you have name resolution that produces a ULA (which
>> might happen in mDNS), then you would be contacting a "private" address.
>> >
>> > I will say that this approach would seem to functionally treat all
>> private spaces as equivalent.  It's fairly easy to think of there being,
>> essentially, _one_ public sphere, but I think in practice there can be many
>> different private spaces.  I'm not sure how well that will play out [1],
>> but maybe it's no worse than today.
>> >
>> > [1] I'm imagining a client w/ a private address and VPNs to two
>> different organizations using two different private spaces.  Now a web page
>> from ORG1's private address space can cause the client to issue queries to
>> ORG2's privately addressed resources.
>>
>> Is that the case? My understanding is that this proposal only reduces
>> privilege when interacting with resources that are considered private, it
>> doesn't add new privileges .  But I could misunderstand.
>>
>
> <more speculation>
>
> If we discard the "local" space discussion, then a request is private iff.
> the "request’s current url's host maps to a private address, and request’s
> client's IP address space is public"... I think (per 2.2)?  If I'm reading
> this correctly, then I would think that section 3.1 #2, "[r]equests whose
> client's IP address space is private are allowed to fetch resources from
> private and public addresses as they do today" would mean a private
> resource fetched from a private address in the context of a current URL
> privately addressed host does not incur any extra Fetch algorithm
> modification (it's not a "private network request").
>

The document's description of the address space architecture is:

2.1. IP Address Space

Every IP address belongs to an IP address space, which can be one of three
different values:

   1.

   local: contains the local host only. In other words, addresses whose
   target differs for every device.
   2.

   private: contains addresses that have meaning only within the current
   network. In other words, addresses whose target differs based on network
   position.
   3.

   public: contains all other addresses. In other words, addresses whose
   target is the same for all devices globally on the IP network.

The contents of each IP address space
<https://wicg.github.io/private-network-access/#ip-address-space> are
determined in accordance with the IANA Special-Purpose Address Registries (
[IPV4-REGISTRY]
<https://wicg.github.io/private-network-access/#biblio-ipv4-registry> and
[IPV6-REGISTRY]
<https://wicg.github.io/private-network-access/#biblio-ipv6-registry>). To
determine the IP address space
<https://wicg.github.io/private-network-access/#ip-address-space> of a
given IP address (address), run the following steps:

   1.

   If address is an IPv4 address <https://url.spec.whatwg.org/#concept-ipv4>
   in the "Loopback" address block (127.0.0.1/8 at time of writing), then
   return local
   <https://wicg.github.io/private-network-access/#ip-address-space-local>.
   2.

   If address is an IPv6 address <https://url.spec.whatwg.org/#concept-ipv6>
   in the "Loopback Address" address block (::1/128 at time of writing),
   then return local
   <https://wicg.github.io/private-network-access/#ip-address-space-local>.
   3.

   If address is an IPv6 address in the "IPv4-mapped Address" address block
   (::ffff:0:0/96 at time of writing), return the IP address space
   <https://wicg.github.io/private-network-access/#ip-address-space> of its
   embedded IPv4 address.
   4.

   If address belongs to an address block for which the Globally Reachable
   bit is set to False in the relevant IANA registry, then return private
   <https://wicg.github.io/private-network-access/#ip-address-space-private>
   .
   5.

   Otherwise return public
   <https://wicg.github.io/private-network-access/#ip-address-space-public>.

Note: Link-local IP addresses such as 169.254.0.0/16 are considered private
<https://wicg.github.io/private-network-access/#ip-address-space-private>,
since such addresses can identify the same target for all devices on a
network link. A previous version of this specification considered them to
be local
<https://wicg.github.io/private-network-access/#ip-address-space-local>
instead.
What I think this proposal would actually like to do is to determine
whether a resource referenced by a specific web server would also be
reachable by that server.  If it is:  allow the reference; if it is not,
but it is for the client: ask the user.  First, I'm not a huge fan of "ask
the user" in decisions that rely on an understanding of opaque inner
workings of the net, and this runs that risk.  Having users understand
whether specific disjoint reachability domains are disjoint on purpose or
because of some accident of history does not strike me as a likely win.
Second, I don't understand the intended client behavior here if it accesses
web resources via a proxy, and I didn't find any mention of proxy behavior
in the text.  Text about this in the final document would be useful.

Lastly, "public" and "private" are very poor proxies for the actual
reachability information for a specific host.  A host can have multiple
interfaces, address families, and scopes and the mitigations IPv4/IPv6
interworking make that even more complicated.  In the WebRTC case, the
presence of destinations reachable via TURN which are in distinct
reachability domains is another complication. The current reality is that
the destination address does not encode the reachability domain in any
meaningful way *for the host*.  This is especially true in the
unfortunately large number of organizations who have repurposed unrouted
addresses as "extra" private address space (
https://teamarin.net/2015/11/23/to-squat-or-not-to-squat/ is old, but the
practice is far from dead).

If the final proposal doesn't actually tackle that complexity, we will
likely be left with a system that doesn't protect what it intends to
because it lumps all reachability domains into broad classes.  Add to that
a consent request that most users can't parse and wouldn't have the real
data to answer, and I think this is more burden than benefit.

regards,

Ted Hardie



> (But I admit that I'm not versed in Fetch algorithm steps 1 through N so
> I'm not readily understanding "modifications to behaviour between steps m<n
> and n<=N".  Also, it's past my bedtime. :-)
>
> I merely meant that two different private spaces appear to be treated the
> same.  I suspect in practice there's no practical way to distinguish one
> private space from another (short of explicit PVD information).  I still
> think this proposal is no worse than the status quo in this regard, though.
> _______________________________________________
> Architecture-discuss mailing list
> Architecture-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/architecture-discuss
>