Open Bug 1998102 Opened 1 year ago Updated 1 month ago

Consider adding hkps://mail-api.proton.me to the default key server list

Categories

(MailNews Core :: Security: OpenPGP, enhancement)

enhancement
Points:
3

Tracking

(relnote-thunderbird +, thunderbird_esr140 wontfix, thunderbird152 wontfix, thunderbird153 fixed)

REOPENED
Tracking Status
relnote-thunderbird --- +
thunderbird_esr140 --- wontfix
thunderbird152 --- wontfix
thunderbird153 --- fixed

People

(Reporter: mkmelin, Assigned: mkmelin)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open)

Attachments

(4 external files)

See https://proton.me/blog/address-verification-pgp-support

We should consider adding hkps://mail-api.proton.me to the default keyserver list

Assignee: nobody → mkmelin+mozilla

I think this is unnecessary, because Proton also hosts their keys on WKD, and we already query WKD.

Can you please check? Even without your patch, Thunderbird should already be able to find keys for proton mail users.

Well, duplication of key source is not necessarily bad. There are some benefits:

  • "Refresh Online" doesn't use WKD, so refreshing for a Proton user won't work atm. xref bug 1735033.
  • you get multiple sources (for upcoming confidence work)
  • for future "trust keyserver" that's not possible if I have to trust WKD, which would seem somewhat less safe

Actually seems our wkd for proton isn't really what it should be either... https://searchfox.org/comm-central/rev/99bc428ec6be3c5bad4b5986765655ecf5bc1e47/mail/extensions/openpgp/content/modules/wkdLookup.sys.mjs#305-324

Status: NEW → ASSIGNED
See Also: → 2047358

Besides bug 2047358 the new implementation works with all the example email addresses that I have tested.

Target Milestone: --- → 153 Branch

Pushed by martin@humanoids.be:
https://hg.mozilla.org/comm-central/rev/ffae2ca378aa
Add hkps://mail-api.proton.me to the default key server list. r=kaie

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED

Is this relnote worthy? Or does the WKD stuff already mostly cover protonmail for recipients without custom domain?

reopen to fix tests

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/d2a4124c10b6
Follow up to fix keyserver test. r=mkmelin

Status: REOPENED → RESOLVED
Closed: 5 months ago → 5 months ago
Resolution: --- → FIXED

Release Note Request (optional, but appreciated)
[Why is this notable]: Better interoperability with Proton mail users.
[Suggested wording]: Added the Proton Mail key server to the default keyserver list. Refreshing the key of a Proton Mail user will now work. We also removed an old, related workaround from before Proton had WKD support. As a consequence, keys for Proton hosted domains can now be found by Thunderbird using WKD.

Reopening, per request from Proton this feature will need more testing and there is risk that incorrect data is returned for email addresses that aren't managed by Proton.

We should back out for the 153 release, and reconsider later.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment on attachment 9608952 [details]
Bug 1998102 - Backed out changeset d2a4124c10b6. r=#thunderbird-back-end-reviewers

Uplift Approval Request

  • Please state case for uplift consideration and ensure bug severity is set: Must backout because the added keyserver is known to return incorrect information that will cause the OpenPGP feature to misbehave.
  • User impact if declined: OpenPGP key download misbehaving.
  • Is this code covered by automated tests?: Unknown
  • Has the fix been verified in Daily?: N/A
  • Has the fix been verified in Beta?: N/A
  • Needs manual test from QA?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): it's a backout, the previous state of the code was in use for a long time.
  • Does the fix cause any migrations to be skipped?: No
  • String changes made/needed:
Attachment #9608952 - Flags: approval-comm-beta?
Attachment #9608953 - Flags: approval-comm-beta?

Comment on attachment 9608952 [details]
Bug 1998102 - Backed out changeset d2a4124c10b6. r=#thunderbird-back-end-reviewers

[Triage Comment]
Approved for beta

Attachment #9608952 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9608953 [details]
Bug 1998102 - Backed out changeset ffae2ca378aa. r=#thunderbird-back-end-reviewers

[Triage Comment]
Approved for beta

Attachment #9608953 - Flags: approval-comm-beta? → approval-comm-beta+
Keywords: leave-open

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/522950c4567c
Backed out changeset d2a4124c10b6. r=aleca
https://hg.mozilla.org/comm-central/rev/c82dd09c5df3
Backed out changeset ffae2ca378aa. r=kaie

Points: --- → 3

The code was backed out.

This patch now remains open for working on the proper fix.

We need close guidance from Proton prior to reconsidering to land this change.

So how do we proceed here?
I assume they wanted to change something, as having a key server that nobody should use isn't that useful to anyone.

Flags: needinfo?(kaie)

Daniel (twiss) had suggested to query DNS. If we want to query an email at address at @domain, we could query the "ns" nameservers for @domain. If those point to proton servers, then it would be ok to query the proton keyserver. If non-proton nameservers are found, we should query it.

That means we couldn't add the proton keyserver to our standard keyserver list, or if we did, we need to have special code embedded to implement that logic for that keyserver.

Daniel, why couldn't your keyserver simply return an empty result for all domains that aren't handled by Proton?

Flags: needinfo?(kaie) → needinfo?(d.huigens)

(In reply to Kai Engert [:KaiE:] from comment #22)

Daniel, why couldn't your keyserver simply return an empty result for all domains that aren't handled by Proton?

Well, even if Proton did that, Thunderbird would leak queries for unrelated email addresses to Proton unnecessarily.

It seems that querying WKD for proton domains would be better, as Proton could simply ensure that WKD is configured for all their domains.

I'd not be worried about leaking queries to Proton.
But I don't understand the purpose of having the server if it can't be used. Some people will have added it themselves anyway.

In the meanwhile we could add a hack to not really query this particular server if the address wasn't one of protonmail.ch,protonmail.com,pm.me (and perhaps there are more?)

I think if Proton has special requirements for how their server may be safely used, maybe this bug should depend on Proton providing a safe algorithm for querying it.

I think we shouldn't try to come up with our own hack, but rather we should follow Proton's guidance.

Sorry for the delayed response.

Daniel, why couldn't your keyserver simply return an empty result for all domains that aren't handled by Proton?

This is in fact normally the case but there's an edge case if an address does exist for Proton but the DNS points to e.g. gmail, then in some cases we do return a key for the address but gmail will most likely not be able to decrypt the message. I'll see if we can fix that on our side and get back to you.

In the meantime, checking DNS could indeed work as a workaround.

It seems that querying WKD for proton domains would be better, as Proton could simply ensure that WKD is configured for all their domains.

We've looked into this in the past and unfortunately it would not be simple for us as we'd have to handle HTTPS certificates for every domain that points to Proton, instead of simply adding a DNS record; the plan is that the latter will be possible for HKPv2: https://www.ietf.org/archive/id/draft-gallagher-openpgp-hkp-10.html#name-the-openpgpkey-srv-record. (Though this will of course still not cover existing domains that point to Proton and don't have this set up.)

Flags: needinfo?(d.huigens)

I'm not sure what we should do here.

WKD is not a solution, as you explained.

I think requiring special code to answer the question "is it reasonable to query key server A for email address B" isn't great.

I think that a rule "query DNS for the nameserver of domain of B, and check if the nameserver is in the allow-list for key server A" isn't great.
We'd have to do that for every new key server and provider that might appear in the future.

I think we need to find a solution that doesn't require this key. Maybe it would be better to standardize a new DNS record that Proton (and other providers) could set in each domain it controls and allows on the keyserver. For example, a "preferred keyserver" record.

With that, Thunderbird's strategy could be:

  • get domain of address B
  • query preferred-keyserver.domain-of-b
  • if record exists, query that keyserver in addition to other keyservers configured in thunderbird

I think Thunderbird's list of keyservers that are queried by default should be limited to "open" keyservers, that are open to serve keys for any email address, regardless of domain.

By that rule, Proton wouldn't get added, but would only be queried if DNS records are discovered, per the idea from above comment 27.

Target Milestone: 153 Branch → ---
No longer blocks: tb-maintenance-2026-q3

Maybe it would be better to standardize a new DNS record that Proton (and other providers) could set in each domain it controls and allows on the keyserver. For example, a "preferred keyserver" record.

Yes, that would be reasonable and has been proposed as part of HKPv2: https://www.ietf.org/archive/id/draft-ietf-openpgp-hkp-01.html#certificate-discovery-using-hkps.

I can't make promises about when we'll implement that (although theoretically, custom domain owners could independently decide to set this DNS record without us nudging them to do so), and it won't automatically work for existing custom domains (each domain owner will need to add this DNS record themselves). But, for future domains (that need to set up DNS records anyway) this will be a good solution.

See Also: → 2083691
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: