Re: [openpgp] OpenPGP Web Key Directory I-D

Bart Butler <bartbutler@protonmail.com> Fri, 09 November 2018 23:19 UTC

Return-Path: <bartbutler@protonmail.com>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D53291277CC for <openpgp@ietfa.amsl.com>; Fri, 9 Nov 2018 15:19:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=protonmail.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 KSC6LSEHJs3w for <openpgp@ietfa.amsl.com>; Fri, 9 Nov 2018 15:19:11 -0800 (PST)
Received: from mail1.protonmail.ch (mail1.protonmail.ch [185.70.40.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B8F661274D0 for <openpgp@ietf.org>; Fri, 9 Nov 2018 15:19:09 -0800 (PST)
Date: Fri, 09 Nov 2018 23:18:57 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1541805542; bh=Gll9t1HuAEekxbr1hWORW/MsQVQp9h61eLbVHfJOKT0=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=eV7g3pBgs6RMzphdn+TvMhLCfDjjjjPFsrfv6PSC2SGijdfywJgBa5MGdDrUu8syr USbn32cG+JeuPl7S2pxkLBH/3jld31ZAAe9kIUzomR8QlJYtUNr+/2B4+6Njed6IFj oj+7f+Bt04M6SvJ7pkQrvh6Ej19oeUFedTQ6uJiU=
To: Werner Koch <wk@gnupg.org>
From: Bart Butler <bartbutler@protonmail.com>
Cc: Paul Fawkesley <paul@fluidkeys.com>, "openpgp@ietf.org" <openpgp@ietf.org>
Reply-To: Bart Butler <bartbutler@protonmail.com>
Message-ID: <e8YBN6CQZpY7QiCOtFMY7IDhHVT5-gymd9AW-BgtUrGMFTQPppr_qdhcoPAYDNYXv5IXAjZi3wPakOju_5CzUg==@protonmail.com>
In-Reply-To: <87ftwbye1s.fsf@wheatstone.g10code.de>
References: <23523.16831.292658.490356@chiark.greenend.org.uk> <874lcsyr3p.fsf@wheatstone.g10code.de> <2bc2bffb-86f5-1457-c19c-bf8a541b8e92@fluidkeys.com> <87ftwbye1s.fsf@wheatstone.g10code.de>
Feedback-ID: XShtE-_o2KLy9dSshc6ANALRnvTQ9U24aqXW2ympbGschdpHbU6GYCTUCtfmGhY9HmOyP1Uweyandwh1AVDFrQ==:Ext:ProtonMail
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha512"; boundary="---------------------4e0fbff813624bef82da5260eb102f9d"; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/azSZl2M-v24aqyOZNJFt434QdhA>
Subject: Re: [openpgp] OpenPGP Web Key Directory I-D
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Nov 2018 23:19:14 -0000

Hi all,

Based on discussions in Brussels, our current plan at ProtonMail is to implement, on the 'serving' side:

.well-known/openpgpkey/hu/<hash>?l=Joe.Doe@example.org

accepting everything including and empty string for the hash and using the 'l' query string parameter exclusively for lookup for all the reasons previously mentioned in this thread and discussed in Brussels (case sensitivity, +aliases/subaddresses, Unicode, catch-all addresses). The hash would be ignored.

I think that long-term, two parameters that do the same thing and could conflict is bad and that while compatibility is a good short-term goal, we should try drop the hash and to migrate to this final form as soon as possible:

.well-known/openpgpkey/hu/?l=Joe.Doe@example.org

While this doesn't allow a filesystem to serve WKD directly, I'm fairly certain that one could do it reasonably easily with, say mod_rewrite and some minimal transformations or use RewriteMap with a script which does whichever transformation you'd like (lowercase, remove subaddresses, etc).

As for the SRV record discussion, I agree that JS support is a problem and unfortunately that means supporting HTTPS. I'm wondering if we should simplify this and simply mandate the 'wkd' subdomain, full stop, rather than having a fallback mechanism to the main domain. The reason for this is that a client could determine whether the HTTP lookup is worth doing from whether the WKD subdomain resolves rather than making an experimental HTTP request for every domain periodically and contributing to the internet's 404 rate.

With the current scheme, relatively high-volume clients like us would probably need to do requests for the policy document periodically for each domain we send to and cache the result to avoid getting banned for generating too many 404s. The TTL for that caching would be decided by the us, the client. With the 'wkd' subdomain all clients would get that kind of caching for free via DNS, with a TTL controlled by the WKD server, which is both simpler and more logical I think.

-Bart Butler

Sent from ProtonMail, encrypted email based in Switzerland.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, November 8, 2018 4:00 AM, Werner Koch <wk@gnupg.org> wrote:

> On Thu, 8 Nov 2018 12:08, paul@fluidkeys.com said:
> 

> > The requirement for the client to filter the return key for matching
> > user IDs is a fairly big blocker for us.
> 

> We can't request a certain address and then work with any address
> returned from the server. I am pretty sure that there will be server's
> which store the entire key and not used the key stripped off all other
> user-ids. Thus the filtering on the client site is important.
> 

> > We (and previous large organisations I've worked in) use + aliases
> > feature extensively to distinguish different services, for example:
> 

> Yes, I know. We discussed this withe protonmail folks. One idea was to
> ask the server for the rules it uses to canonicalize the address. That
> will be quite complex and needs additional roundtrips. So the other
> idea is to simply go with the '+' separator and have a special case for
> it. Implementation wise it this requires changes at several palce to
> have a consistent user experience.
> 

> > To stay compatible, keep supporting static files and resolve the case
> > and aliasing issues, I'd support:
> > 

> > 1.  keep supporting sha1-z-base-32 identifier
> 

> Already doing that.
> 

> > 2.  additionally start supporting z-base-32 identifier with no SHA1
> >     2.a maybe put them at different path
> >     2.b don't lowercase anything before searching for these
> >     

> 

> GnuPG 2.2.11 does this as descipned in my last mail.
> For example the URI to lookup the key for Joe.Doe@Example.ORG is now
> 

> https://example.org/.well-known/openpgpkey/
> hu/iy9q119eutrkn8s1mk4r39qejnbu3n5q?l=Joe.Doe@example.org
> 

> No hashing is required, the case is not changed; the parameters undergo
> the usual percent-quoting.
> 

> > 2.c in the client, don't filter on the user id for these
> 

> That is the harder part. The matching in gpg is anyway case-insensitive
> and I would like to implement '+' style sub-addresses; that is ignoring
> everything from '+' to '@'.
> 

> > Given that SRV records can't be accessed by Javascript implementations,
> > I don't think we can point to that as a solution
> 

> It is a pity that solid network techniques need to be dropped in favor
> of large but uncooperative browser vendors. Adding an interface for SRV
> records would be really easy and helps to support flexible network
> administration. Note that I don't wan't them to use SRV records for
> generic http requests but extensions should be able to use it instead of
> resorting to external DNS lookup providers. [Arggh, it is the whole
> everything must be http thing - I bet we will sooner or later see a new
> IP protocol number for HTTP-ng].
> 

> > > This is an open question but for a different reason: Current web
> > > browsers have no way to lookup SRV records.
> > 

> > I'd support this.
> > I'd also support dropping the whole SRV records part to simplify the spec.
> 

> I recently looked into a protocol *forgot which one) which didn't used
> SRV but a domain name prefix. So, do you think that a strategy of:
> 

> First try
> 

> https://openpgpkey.example.org/.well-known/openpgpkey/...
> 

> if that host can't be resolved (or accessed?), fallback to
> 

> https://example.org/.well-known/openpgpkey/...
> 

> be a practical replacement for SRV records here?
> 

> Shalom-Salam,
> 

> Werner
> 

> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 

> Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.