151f975a92583f1b9cda28f8d1815562d063ca0d
[monkeysphere.git] / website / signing-server-keys.mdwn
1 # Signing a server OpenPGP key #
2
3 This page is meant to address the issue of signing server OpenPGP
4 keys.  Server's are not people (or monkeys), obviously, so the
5 circumstances under which one should sign a server key is a big
6 different than those under which a person should sign another person's
7 key.
8
9
10 # Why are signatures on the server key important? #
11
12 In order for users to connect to a server in a monkeysphere-enabled
13 network, the server key must have *full* validity for the connecting
14 user.  If the user has not themselves signed the server's key, then
15 the server's key can only be valid if other people that the user
16 trusts have signed the key.
17
18 If only one person has signed the server's key, then the user must
19 fully trust the single person who has signed the server key.  Full
20 trust should be granted sparingly and with consideration, though, so
21 unless the user knows the server admin very well, they will in general
22 not have full trust of this person.
23
24 However, full trust of the server key can also be achieved if the
25 server key has been signed by three or more people that the user has
26  *marginal* trust of.  In other words, three or more *marginally*
27 trusted signatures equals one *fully* trusted signature.  It is much
28 more common for users to have marginal trust of other users in the Web
29 of Trust.  For this reason, it is important to have as many people
30 sign the server key as possible.
31
32
33 ## What information should you have before signing a server key? ##
34
35 When signing the key of a person, you want to do two things:
36
37 1. verify the identity of the person.
38 2. verify that the person is actually in control of the key that you
39 are signing.
40
41 For a server, you want to do basically the same thing:
42
43 1. verify the identity of the server.
44 2. verify that the server is actually in control of the key that you
45 are signing.
46
47 However, with a server, verifying these things is a little trickier.
48
49 Verifying that the server is in control of the key is, in principle,
50 straightforward.  If you are logged on to the machine in question,
51 then you can check directly that the key exists on the system.
52
53 What is not so straightforward is what exactly it means to "verify the
54 identity" of a remote server on the web?  The identity in this case is
55 the fully qualified domain name (FQDN) of the host.  Verifying this
56 identity amounts to being sure that the host in question really is
57 located at that FQDN.
58
59
60 ## Signing the server key ##
61
62 If you are the person (or persons) that actually setup the server and
63 configured Monkeysphere and ssh on the server, then clearly you should
64 definitely sign the server key right away.  When the server is first
65 setup, the persons who set it up are the only ones who can actually
66 vouch for the server key, so their signatures are necessary to get
67 things going.  Their signatures are also necessary so that they can
68 verify the host key themselves and log into the server via
69 monkeysphere-enabled ssh in the future.
70
71 If you did not set up the server initially, you do not have an
72 accumulated full trust of the person(s) who did, and you do not
73 necessarily have console access to the server directly, it's hard to
74 confidently verify the server identity and key ownership.  You would
75 like to be able to walk up to the server, log in at the console, and
76 get the fingerprint of the ssh host key directly.  But this is usually
77 untenable.
78
79 However, it is still possible to verify the server identity *and*
80 server ownership of the key, even in this case.
81
82
83 ## Remotely verifying server identify and key possession ##
84
85 It is in fact possible to verify the identity and key ownership of a
86 server in one fell swoop with monkeysphere-enabled ssh.  Here is the
87 procedure:
88
89 > **Attempt to make a monkeysphere-enabled ssh connection to the host in
90 question.  Monkeysphere will check that the ssh host key offered by the
91 host matches the OpenPGP key with the correct host FQDN user ID.  If
92 the ssh host key and the OpenPGP key with the correct user ID match,
93 then you will have effectively:**
94
95 >**1. verified the host identity, because you actually connected to the
96 host in question, which you know because you:**
97
98 >**2. verified the host is in control of the key, because the ssh host
99 key offered by the host matches the OpenPGP key with correct host FQDN
100 user ID.**
101
102 Here is an example:
103
104         servo:~ 0$ ssh zimmermann.mayfirst.org
105         -------------------- Monkeysphere warning -------------------
106         Monkeysphere found OpenPGP keys for this hostname, but none had full validity.
107         An OpenPGP key matching the ssh key offered by the host was found:
108         
109         pub   2048R/860E8F9C 2008-10-29 [expires: 2009-02-26]
110         uid       [marginal] ssh://zimmermann.mayfirst.org
111         sig!         76CC057D 2008-11-15  Jamie McClelland <jamie@mayfirst.org>
112         sig!3        860E8F9C 2008-10-29  ssh://zimmermann.mayfirst.org
113         sig!         D21739E9 2008-10-29  Daniel Kahn Gillmor <dkg@fifthhorseman.net>
114         sig!         1CF2D62A 2008-11-16  Micah Anderson <micah@riseup.net>
115         
116         RSA key fingerprint is 81:96:13:3e:24:c9:3c:5b:3c:6d:55:ba:58:85:e9:9e.
117         -------------------- ssh continues below --------------------
118         The authenticity of host 'zimmermann.mayfirst.org (<no hostip for proxy command>)' can't be established.
119         RSA key fingerprint is 81:96:13:3e:24:c9:3c:5b:3c:6d:55:ba:58:85:e9:9e.
120         No matching host key fingerprint found in DNS.
121         Are you sure you want to continue connecting (yes/no)? no
122         Host key verification failed.
123         servo:~ 255$ 
124
125 I have attempted to connect to the host zimmermann.mayfirst.org.
126 zimmermann's host key has only *marginal* validity for the FQDN user
127 ID in question, so I am not able to connect.  However, the
128 monkeysphere has checked that the ssh host key actually does match the
129 OpenPGP key with the correct user ID `ssh://zimmermann.mayfirst.org`.
130 I have therefore verified the identity of zimmermann, and verified
131 that zimmermann is in possession of the key in question.