Add some info on client.py to README

This commit is contained in:
s3lph 2022-01-12 04:13:00 +01:00
parent 7c8a5a377b
commit c54d86412d

View file

@ -4,8 +4,6 @@
--- ---
This is a work-in-progress project. See ROADMAP.md for details
## What is WKD/WKS? ## What is WKD/WKS?
Due to all the issues involved with the PGP key servers we're using today, GnuPG introduced a feature named [**Web Key Due to all the issues involved with the PGP key servers we're using today, GnuPG introduced a feature named [**Web Key
@ -75,7 +73,7 @@ Configuration is done in `/etc/easywks.yml` (or any other place as specified by
```yaml ```yaml
--- ---
# EasyWKS works inside this directory. Its PGP keys as well# as all # EasyWKS works inside this directory. Its PGP keys as well as all
# the submitted and published keys are stored here. # the submitted and published keys are stored here.
directory: /var/lib/easywks directory: /var/lib/easywks
@ -129,7 +127,7 @@ lmtpd:
# - {domain}: The email domain for with the request is processed. # - {domain}: The email domain for with the request is processed.
# - {sender}: The submitter's mail address. # - {sender}: The submitter's mail address.
# - {submission}: The submission address. # - {submission}: The submission address.
# When overriding the "error" template, theres an additional # When overriding the "error" template, there's an additional
# placeholder you can use: # placeholder you can use:
# - {error}: The error message. # - {error}: The error message.
#responses: #responses:
@ -254,6 +252,57 @@ gpgwks@example.org lmtp:localhost:10024
webkey@example.com lmtp:localhost:10024 webkey@example.com lmtp:localhost:10024
``` ```
## EasyWKS Client
The file `client.py` contains a self-contained WKS client, which
prompts you for your email address and IMAP/SMTP/POP3 password, and
then attempts to figure out the mail servers via common
autoconfiguration methods. Afterwards it will attempt a WKS key submission:
```console?prompt=$, 
$ ./client.py
Enter email: john.doe@example.org
Chose A58D3221F8079F35FF084890505A563492A56583
Enter IMAP/POP3/SMTP password (will not echo): ********
Autoconfigured incoming server: imaps://john.doe@example.org@imap.example.org:993
Autoconfigured outgoing server: smtp+starttls://john.doe@example.org@smtp.example.org:587
Please confirm: [Y/n] y
Retrieved submission key
Retrieved key to publish
Created encrypted message
Sending submission request
Awaiting response
Received confirmation request
Nonce: 95184efbc5d2f75ed4b56162
Creating confirmation response. GnuPG may prompt you for your passphrase.
Sending confirmation response
Awaiting publish response
Decrypting WKS response. GnuPG may prompt you for your passphrase.
Hi there!
This is the EasyWKS system at example.org
Your key has been published to the Web Key Directory.
You can test WKD key retrieval e.g. with:
gpg --auto-key-locate=wkd,nodefault --locate-key john.doe@example.org
For more information on WKD and WKS see:
https://gnupg.org/faq/wkd.html
https://gnupg.org/faq/wks.html
Regards
EasyWKS
--
Dance like nobody is watching.
Encrypt live everybody is.
```
[wkd]: https://wiki.gnupg.org/WKD [wkd]: https://wiki.gnupg.org/WKD
[wks]: https://wiki.gnupg.org/WKS [wks]: https://wiki.gnupg.org/WKS
[ietf]: https://datatracker.ietf.org/doc/html/draft-koch-openpgp-webkey-service-12 [ietf]: https://datatracker.ietf.org/doc/html/draft-koch-openpgp-webkey-service-12