[dev] Providing keys through Web Key Directory protocol
Wiktor Kwapisiewicz
wiktor at metacode.biz
Tue Oct 16 10:25:58 UTC 2018
Hello Horde Dev,
I would like to add support for providing user's PGP keys in Horde
through Web Key Directory protocol.
Relevant ticket: https://bugs.horde.org/ticket/14465
A quick explanation what WKD does: modern GnuPG allows looking up PGP
keys by e-mail addresses by converting e-mails to HTTPS URLs that are
used to fetch the key (more info at https://wiki.gnupg.org/WKD ).
For example, using "gpg --locate-key torvalds at kernel.org" fetches the
key from
https://kernel.org/.well-known/openpgpkey/hu/pf113mfnx1f3eb1yiwhsipa91xfc7o4x
(the local part is SHA1-ed and encoded using ZBase32)
Horde could store the encoded username hash in database, have an
endpoint that would catch "/.well-known/openpgpkey/hu" calls, retrieve
user's pgpPublicKey and return the binary key (or 404 if the key doesn't
exist).
I think storing additional attribute - encoded localpart is needed
because it's not possible to easily reverse the hash to username. I've
checked the Pgp component and it seems Horde_Pgp_Element_PublicKeys have
to_bytes() method that can be used to return binary encoded OpenPGP key.
Could you check if this reasoning is sound? I would appreciate any tips
in development of this feature as the sheer size of the code base is a
little bit intimidating :)
Currently I've got a small problem with horde-git-tools (in attachment)
but I'll try some alternative methods to get the source.
Thank you for your time!
Kind regards,
Wiktor
--
https://metacode.biz/@wiktor
-------------- next part --------------
$ ./bin/horde-git-tools git clone
[ INFO ] Using cached data for https://api.github.com/orgs/horde/repos
[ INFO ] You have 59 GitHub API requests left until Tue, 16 Oct 2018 10:42:34 +0000
[ INFO ] Using cached data for https://api.github.com/organizations/379293/repos?page=2
[ INFO ] You have 58 GitHub API requests left until Tue, 16 Oct 2018 10:42:34 +0000
[ INFO ] Using cached data for https://api.github.com/organizations/379293/repos?page=3
[ INFO ] You have 57 GitHub API requests left until Tue, 16 Oct 2018 10:42:34 +0000
[ INFO ] Using cached data for https://api.github.com/organizations/379293/repos?page=4
[ INFO ] You have 56 GitHub API requests left until Tue, 16 Oct 2018 10:42:34 +0000
[ INFO ] Using cached data for https://api.github.com/organizations/379293/repos?page=5
[ INFO ] You have 55 GitHub API requests left until Tue, 16 Oct 2018 10:42:34 +0000
[ INFO ] Using cached data for https://api.github.com/organizations/379293/repos?page=6
[ INFO ] You have 54 GitHub API requests left until Tue, 16 Oct 2018 10:42:34 +0000
PHP Fatal error: Uncaught Horde_Http_Exception: Operation timed out after 5001 milliseconds with 0 bytes received in /home/wiktor/var/horde-git-tools/vendor/pear-pear.horde.org/Horde_Http/Horde/Http/Request/Curl.php:124
Stack trace:
#0 /home/wiktor/var/horde-git-tools/vendor/pear-pear.horde.org/Horde_Http/Horde/Http/Client.php(237): Horde_Http_Request_Curl->send()
#1 /home/wiktor/var/horde-git-tools/vendor/pear-pear.horde.org/Horde_Http/Horde/Http/Client.php(126): Horde_Http_Client->request('GET', 'https://raw.git...', NULL, Array)
#2 /home/wiktor/var/horde-git-tools/lib/Action/Git/ListRemote.php(94): Horde_Http_Client->get('https://raw.git...')
#3 /home/wiktor/var/horde-git-tools/lib/Action/Git/ListRemote.php(49): Horde\GitTools\Action\Git\ListRemote->_isHordeRepo('Url')
#4 /home/wiktor/var/horde-git-tools/lib/Module/Git.php(100): Horde\GitTools\Action\Git\ListRemote->run()
#5 /home/wiktor/var/horde-git-tools/lib/Module/Git.php(70): Horde\GitTools\Module\Git->_doClone()
#6 /home/wiktor/var/horde-git-tools/lib/Cli.php(58): Ho in /home/wiktor/var/horde-git-tools/vendor/pear-pear.horde.org/Horde_Http/Horde/Http/Request/Curl.php on line 124
More information about the dev
mailing list