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