[Wpack] package: URL scheme

Jeffrey Yasskin <jyasskin@google.com> Wed, 10 June 2020 22:00 UTC

Return-Path: <jyasskin@google.com>
X-Original-To: wpack@ietfa.amsl.com
Delivered-To: wpack@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A1E503A10F9 for <wpack@ietfa.amsl.com>; Wed, 10 Jun 2020 15:00:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.599
X-Spam-Level:
X-Spam-Status: No, score=-17.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 680ZxaTKMwBm for <wpack@ietfa.amsl.com>; Wed, 10 Jun 2020 15:00:17 -0700 (PDT)
Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (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 1E6313A1554 for <wpack@ietf.org>; Wed, 10 Jun 2020 15:00:17 -0700 (PDT)
Received: by mail-qk1-x72f.google.com with SMTP id l17so3687063qki.9 for <wpack@ietf.org>; Wed, 10 Jun 2020 15:00:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=e3ICSjnRHLCqq5ulz7jOHscFFTXAeMTIRmg3Fb0u7DM=; b=aYkAIK7njON/AWJZ0MLzvG7mCR6bEFBwxKaW2j8efoE0JVVf2vfq4IX5zC2gahI0/4 2UpnEKjCV/RkdWF8ZAP18bgsk8mppnxeJ94bIHGsJrjknhqP15CGAa8IhsA/vvQqS2bi oyPAEcMdPtM1+hipFPFEcnzpgJzM4jF/OI+5/W7Yxm5egAWTd/bYWm1YsV6Jj3vtBlQQ oBqZhoKfGIz0ms6pu9ySPQRr+ueGffyU/T83EmMcpsTqoHbeOoDw77GXGBZQkdD+B7je wzpvmbNVJiNN4cJDLxOtL1KL7qPEjzkQzEI+bP5R/cMPMY5Bpsk473U9VKvElOpi58L4 qgEQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=e3ICSjnRHLCqq5ulz7jOHscFFTXAeMTIRmg3Fb0u7DM=; b=mRiIR8k4nQEi2TDW5+310AAzSDOVDMp8W3JeHRzGl71dDWxpBpqfNpgjX/2tB6PTF8 YM4+AnuzlZmWGsT+BaZS5o7cC6OW4erNUa/Wwo7a25rivQ8v2MYyRkskKkYfprjcsDJN un/A9zJtKdEWZsdAJECV1sgPHeSUeQ4vMqnQNm6DWH/+K4iEWIUayIvYNO9U4sFpneQH 9t8UduQiAAz6dx4Z4xGhfjzRYlgXlbey1ISRuG3Z9PdjhSf3JVZ7ChNapi/a4w3qgJOw /nHnEswNci4CVGq5U69QkgmQPrfYDP5D37jJ+yU3913Zn92AMyWs4xOyKDji0YO2M40D 6Orw==
X-Gm-Message-State: AOAM530/szzrpxD62CJCpiTryoTnbPKuQ8HfMAJqMQ48MQpUg3rXMLOI 1xwdqG+Xz6ZQsEyBUzJdT+iV3I5TNJZ+/IGLDp/RhRSSwPo=
X-Google-Smtp-Source: ABdhPJwKbumLSHJRu5r112j6xBkW1Px6PTlmBY05G/Ajgeik1WeNCmNzZqY5lQBIKEwR/SJY4v1GPhP0h9dfNzEXHXg=
X-Received: by 2002:a37:e110:: with SMTP id c16mr5514970qkm.38.1591826413669; Wed, 10 Jun 2020 15:00:13 -0700 (PDT)
MIME-Version: 1.0
From: Jeffrey Yasskin <jyasskin@google.com>
Date: Wed, 10 Jun 2020 15:00:01 -0700
Message-ID: <CANh-dXndPaue3zAADhpc+wyNb8dxs=nVKOAp1n=6SMCKoUe=eQ@mail.gmail.com>
To: WPACK List <wpack@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000eee29d05a7c1f791"
Archived-At: <https://mailarchive.ietf.org/arch/msg/wpack/XS9f1lc8VcpihQ04L_DwKKwhwe8>
Subject: [Wpack] package: URL scheme
X-BeenThere: wpack@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Web Packaging <wpack.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/wpack>, <mailto:wpack-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/wpack/>
List-Post: <mailto:wpack@ietf.org>
List-Help: <mailto:wpack-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/wpack>, <mailto:wpack-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Jun 2020 22:00:20 -0000

Hi all,

I wanted to raise awareness of a discussion about the URL scheme for
addressing resources within bundles (draft-yasskin-wpack-bundled-exchanges).

We seem to be heading toward a URL of the form
package:<encoded-package-url>$<encoded-resource-uri>, which for a package
URL of https://distributor.example/package.wbn and resource URI of
https://publisher.example/page.html?q=query would lead to a URL of:

*package:https:,,distributor.example,package.wbn;q=query$https:,,publisher.example/page.html?q=query*

This arises from several considerations:
1. A bundle is served from a URL.
2. After a user downloads the bundle, it gets a new URL, often file:///...
3. We can also hash the bundle to get a URI that stays stable across
transfers.
4. Resources inside a bundle are named by URIs (which, since the bundle has
an index, are also URLs even if, like urn:uuid:..., they wouldn't normally
be locators).
5. Once a user downloads a bundle, for web browsers to give its content
storage that's persistent across reloads, as requested in
https://github.com/WICG/webpackage/issues/498, the content needs to be
assigned a non-opaque origin.

I'm updating one of the documents about this in
https://github.com/WICG/webpackage/pull/584 and would welcome comments here
or there.

The URLs are obviously gross, so
https://github.com/WICG/webpackage/pull/560 suggests
that browsers avoid showing them to users in most cases.

We could potentially simplify things if packages named things with just
paths instead of full URIs. We'd then name things based on the bundle's
origin. However, this loses archiving use cases.

This is all further discussed in the following documents and issues, but
you shouldn't feel responsible to read everything here:

*
https://docs.google.com/document/d/1BYQEi8xkXDAg9lxm3PaoMzEutuQAZi1r8Y0pLaFJQoo/edit#
*
https://chromium-review.googlesource.com/c/chromium/src/+/2226248/7#message-0a3efda5aff84770a1729422a5b26aeca3ee4e80
* https://github.com/WICG/webpackage/issues/583
*
https://github.com/WICG/webpackage/blob/master/explainers/navigation-to-unsigned-bundles.md#urls-for-bundle-components
* https://lists.w3.org/Archives/Public/uri/2019Nov/0000.html

Thanks,
Jeffrey