We wish to allow site admins to run a private hockeypuck service for their users without having to peer with public servers. We also would like to be able to find keys that have not been directly published on the SKS keyserver network. This can be done if we implement a recursive resolver (caching proxy) along the lines of DNS.
Motivation
With the breakdown of sync, and the proliferation of keystore models, publishing a key is no longer a sufficient guarantee of visibility:
- WKD is controlled by the domain owner and is not suitable for, or not available to, all users
- keys.openpgp.org does not serve third-party signatures, and does not federate
- keys.mailvelope.com, api.protonmail.ch, etc. are service-provider specific and don't federate
- keyserver.ubuntu.com no longer federates with other SKS servers
In addition, users may not wish to disclose their interest in a given key to the chosen keystore provider of their recipient. A (trusted) recursive resolver would provide an extra layer of anonymity in such cases.
Examples of interactions
- A user who searches for a key that is not in a recursive keyserver's database should have their query proxied to other keystores.
- A key published to a recursive keyserver should (optionally) be published to other keystores.
Design
A recursive keyserver MAY implement the following:
- If there is no result for a client query in the local database, the query should be forwarded to a configurable list of upstream keystores
- The proxied query should contain a query parameter to prevent looping
- Any results obtained should be returned to the client, and added to a local cache
- The cache should be refreshed via a parcimonie algorithm, and eventually expired
- If a "preferred keyserver" subpacket exists, it should be polled for updates
- The provenance of a cached key should be displayed in the index view
A recursive keyserver MAY also implement the following:
- Whenever a key is uploaded to the keyserver, it is forwarded to a configurable list of downstream keystores
The downstream list will in general be different from the list of upstream keystores
Out of scope
Long-term storage of recursively-obtained data.
Security and privacy considerations
Scraping keys from other keystores and storing them indefinitely may violate terms of service and data protection norms. A time-limited cache mitigates this concern by acting as a proxy rather than a republisher.
Compatibility
This functionality could be implemented as a standalone product, with a hockeypuck server as an upstream and/or downstream keystore, however this would be more complex to deploy, particularly for small operators.