You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### OpenPGP Web Key Service ([WKS](https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-05))
357
+
358
+
An important aspect of using OpenPGP is trusting the (public) key. Off-channel key exchange is not always practical, OpenPGP DANE protocol lacks confidentially, HKPS' a mess, and keybase is wicked. OpenPGP proposed a new protocol to automate and build trust in the process of exchanging public keys.
359
+
360
+
Web Key Service has two main functions for our Email Service:
361
+
1. Allow all users to locate and retreive public keys by email address using HTTPS
362
+
2. Allow local user's email client to automatically publish and revoke public keys
363
+
364
+
Self-hosting has the advantage of full authority on the user mail addresses for their domain name. By design, only one WKS can exist for a domain name. Furthermore, only local users can make requests to WKS Submission Address, and replies to local users only. Moreover, the service automatically verifies the sender is in possesion of the secret key, before publishing their public key. Self-hosting the public key server finally makes OpenPGP oportunistic encryption user friendly.
365
+
366
+
To get started, a GnuPG 2.1 safe configuration is provided: [`gpg.conf`](src/home/puffy/.gnupg/gpg.conf)
367
+
368
+
Web Key Service maintains a Web Key Directory (WKD) which needs the following configuration for each *virtual* domain:
369
+
```sh
370
+
mkdir -m 755 /var/lib/gnupg/wks/example.com
371
+
chown vmail:vmail /var/lib/gnupg/wks/example.com
372
+
373
+
cd /var/lib/gnupg/wks/example.com
374
+
375
+
ln -sf /var/www/openpgpkey/hu .
376
+
chown -h vmail:vmail hu
377
+
378
+
ln -s /var/www/openpgpkey/submission-address .
379
+
chown -h vmail:vmail submission-address
380
+
381
+
doas -u vmail \
382
+
env -i HOME=/var/vmail \
383
+
gpg-wks-server --list-domains
384
+
```
385
+
386
+
Web Key Service uses a Submission Address, which needs the following configuration:
387
+
388
+
Add *virtual* password for the Submission Address:
*n.b.*: [Enigmail](https://www.enigmail.net)/Thunderbird, [Kmail](https://userbase.kde.org/KMail) and [Mutt](http://www.mutt.org/) (perhaps other MUA) support the Web Key Service. Once published, a communication partner's MUA automatically downloads the public key (if their GnuPG 2.1 --enable-wks-tools) with the following `gpg.conf` directive:
*n.b*: If the same local-part of an email address exists for multiple domains (e.g. **puffy**@example.com and **puffy**@example.net), the hash of the string will be the same and each key publication overwrites the same file. The *workaround* is using **+tags** to create a secondary UID (e.g. puffy**+enc**@example.com) for the key, and go through the process of key submission and confirmation using the MUA interface with the tagged email address (e.g. puffy**+enc**@example.com).
Copy file name to clipboardExpand all lines: README.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,13 @@ Root your Inbox :mailbox_with_mail:
25
25
- Flexible: switching roles is easy, making the process of changing VPS hosts a breeze (no downtime)
26
26
- DMARC (with DKIM and SPF) email-validation system, to detect and prevent email spoofing
27
27
- Uncensored DNS validating resolver from root nameservers
28
+
- OpenPGP Web Key Service with Web Key Directory, the most trusted and secure key exchange protocol
28
29
- MUA Autoconfiguration, for modern clients
29
30
- Daily (spartan) stats, to keep track of things
30
31
- Your sieve scripts and managesieve configuration, let's get started
31
32
32
33
## Considerations
33
-
By design, email message headers need to be public, for exchanges to happen. The body of the message can be encrypted by the user, if desired. Moreover, there is no way to prevent the host from having access to the virtual machine. Therefore, [full disk encryption](https://www.openbsd.org/faq/faq14.html#softraidFDE) (at rest) may not be necessary.
34
+
By design, email message headers need to be public, for exchanges to happen. The body of the message can be [encrypted](INSTALL.md#openpgp-web-key-service-wks) by the user, if desired. Moreover, there is no way to prevent the host from having access to the virtual machine. Therefore, [full disk encryption](https://www.openbsd.org/faq/faq14.html#softraidFDE) (at rest) may not be necessary.
34
35
35
36
Given our low memory requirements, and the single-purpose concept of email service, Roundcube or other web-based IMAP email clients should be on a different VPS.
36
37
@@ -49,7 +50,7 @@ See the [**Installation Guide**](INSTALL.md) for details.
*Open*BSD Email Service - Upgrade an existing installation
3
3
4
-
[`6.3.0-beta`](https://github.com/vedetta-com/caesonia/tree/v6.3.0-beta) to [`6.3.1-beta`](https://github.com/vedetta-com/caesonia/tree/v6.3.1-beta)
4
+
[`6.3.1-beta`](https://github.com/vedetta-com/caesonia/tree/v6.3.1-beta) to [`6.3.2-beta`](https://github.com/vedetta-com/caesonia/tree/v6.3.2-beta)
5
5
6
6
> Upgrades are only supported from one release to the release immediately following it. Read through and understand this process before attempting it. For critical or physically remote machines, test it on an identical, local system first. -- [OpenBSD Upgrade Guide](https://www.openbsd.org/faq/index.html)
7
7
8
8
## Upgrade Guide
9
9
10
-
Split TLS and non-TLS configuration, update TLS cipher strength and key exchange (score A+ with 100% on every [ssllabs.com](https://www.ssllabs.com/ssltest/) test while supporting all devices), and improve Mozilla [Autoconfiguration](https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration) with the following `httpd.conf` changes:
10
+
### Introducing OpenPGP Web Key Service (WKS) to OpenBSD
11
+
12
+
To start implementing Web Key Service, please make sure the new DNS [prerequisites](README.md#openpgp-web-key-directory-wkd) are met.
13
+
14
+
```sh
15
+
pkg_add gnupg-2.2.4
16
+
```
17
+
18
+
Edit [`/etc/httpd.conf`](src/etc/httpd.conf) to add a WKD alias and location:
11
19
```console
12
20
# Host:443
13
21
server "mercury.example.com" {
14
22
alias "autoconfig.*"
23
+
alias "wkd.*"
15
24
16
25
listen on $IPv4 tls port https
17
26
listen on $IPv6 tls port https
@@ -35,6 +44,13 @@ server "mercury.example.com" {
35
44
36
45
block
37
46
47
+
# OpenPGP Web Key Directory
48
+
location "/.well-known/openpgpkey/*" {
49
+
root "/openpgpkey"
50
+
root strip 2
51
+
pass
52
+
}
53
+
38
54
location "/*" {
39
55
root "/htdocs/mercury.example.com"
40
56
pass
@@ -44,66 +60,82 @@ server "mercury.example.com" {
44
60
# Host:80
45
61
server "mercury.example.com" {
46
62
alias "autoconfig.*"
63
+
alias "wkd.*"
64
+
...
65
+
```
47
66
48
-
listen on $IPv4 port http
49
-
listen on $IPv6 port http
50
-
51
-
tcp nodelay
52
-
connection { max requests 500, timeout 3600 }
67
+
Add WKD LetsEncrypt certificate:
68
+
```sh
69
+
acme-client -vr mercury.example.com
70
+
```
53
71
54
-
log { access "access.log", error "error.log" }
72
+
Edit [`/etc/acme-client.conf`](src/etc/acme-client.conf) to add every service (virtual) WKD subdomains as alternat
73
+
ive names:
74
+
```console
75
+
...
76
+
alternative names { \
77
+
autoconfig.example.com \
78
+
autoconfig.example.net \
79
+
wkd.example.com \
80
+
wkd.example.net }
81
+
...
82
+
```
55
83
56
-
block
84
+
```sh
85
+
acme-client -v mercury.example.com
86
+
get-ocsp.sh mercury.example.com
87
+
```
57
88
58
-
location "/.well-known/acme-challenge/*" {
59
-
root "/acme"
60
-
root strip 2
61
-
pass
62
-
}
89
+
Edit [`/etc/doas.conf`](src/etc/doas.conf) to add WKS permissions:
0 commit comments