cfd13e7d5241dc6fc5b3b65de189b50e726c0c52
[monkeysphere.git] / man / man8 / monkeysphere-authentication.8
1 .TH MONKEYSPHERE-SERVER "8" "March 2009" "monkeysphere" "User Commands"
2
3 .SH NAME
4
5 monkeysphere\-authentication - Monkeysphere authentication admin tool.
6
7 .SH SYNOPSIS
8
9 .B monkeysphere\-authentication \fIsubcommand\fP [\fIargs\fP]
10
11 .SH DESCRIPTION
12
13 \fBMonkeysphere\fP is a framework to leverage the OpenPGP Web of Trust
14 (WoT) for OpenSSH authentication.  OpenPGP keys are tracked via GnuPG,
15 and added to the authorized_keys and known_hosts files used by OpenSSH
16 for connection authentication.
17
18 \fBmonkeysphere\-authentication\fP is a Monkeysphere server admin
19 utility for configuring SSH user authentication through the WoT.
20
21 .SH SUBCOMMANDS
22
23 \fBmonkeysphere\-authentication\fP takes various subcommands:
24 .TP
25 .B update\-users [ACCOUNT]...
26 Rebuild the monkeysphere-controlled authorized_keys files.  For each
27 specified account, the user ID's listed in the account's
28 authorized_user_ids file are processed.  For each user ID, gpg will be
29 queried for keys associated with that user ID, optionally querying a
30 keyserver.  If an acceptable key is found (see KEY ACCEPTABILITY in
31 monkeysphere(7)), the key is added to the account's
32 monkeysphere-controlled authorized_keys file.  If the
33 RAW_AUTHORIZED_KEYS variable is set, then a separate authorized_keys
34 file (usually ~USER/.ssh/authorized_keys) is appended to the
35 monkeysphere-controlled authorized_keys file.  If no accounts are
36 specified, then all accounts on the system are processed.  `u' may be
37 used in place of `update\-users'.
38 .TP
39 .B add\-id\-certifier KEYID|FILE
40 Instruct system to trust user identity certifications made by KEYID.
41 The key ID will be loaded from the keyserver.  A file may be loaded
42 instead of pulling the key from the keyserver by specifying the path
43 to the file as the argument, or by specifying `\-' to load from stdin.
44 Using the `\-n' or `\-\-domain' option allows you to indicate that you
45 only trust the given KEYID to make identifications within a specific
46 domain (e.g. "trust KEYID to certify user identities within the
47 @example.org domain").  A certifier trust level can be specified with
48 the `\-t' or `\-\-trust' option (possible values are `marginal' and
49 `full' (default is `full')).  A certifier trust depth can be specified
50 with the `\-d' or `\-\-depth' option (default is 1).  `c+' may be used in
51 place of `add\-id\-certifier'.
52 .TP
53 .B remove\-id\-certifier KEYID
54 Instruct system to ignore user identity certifications made by KEYID.
55 `c\-' may be used in place of `remove\-id\-certifier'.
56 .TP
57 .B list\-id\-certifiers
58 List key IDs trusted by the system to certify user identities.  `c'
59 may be used in place of `list\-id\-certifiers'.
60 .TP
61 .B help
62 Output a brief usage summary.  `h' or `?' may be used in place of
63 `help'.
64 .TP
65 .B version
66 show version number
67
68 Other commands:
69 .TP
70 .B setup
71 Setup the server in preparation for Monkeysphere user authentication.
72 This command is idempotent and run automatically by the other
73 commands, and should therefore not usually need to be run manually.
74 `s' may be used in place of `setup'.
75 .TP
76 .B diagnostics
77 Review the state of the server with respect to authentication.  `d'
78 may be used in place of `diagnostics'.
79 .TP
80 .B gpg\-cmd
81 Execute a gpg command, as the monkeysphere user, on the monkeysphere
82 authentication `sphere' keyring.  This takes a single argument
83 (i.e. multiple gpg arguments need to be quoted all together).  Use
84 this command with caution, as modifying the authentication sphere
85 keyring can affect ssh user authentication.
86
87 .SH SETUP USER AUTHENTICATION
88
89 If the server will handle user authentication through
90 monkeysphere-generated authorized_keys files, the server must be told
91 which keys will act as identity certifiers.  This is done with the
92 \fBadd\-id\-certifier\fP command:
93
94 $ monkeysphere\-authentication add\-id\-certifier KEYID
95
96 where KEYID is the key ID of the server admin, or whoever's
97 certifications should be acceptable to the system for the purposes of
98 authenticating remote users.  You can run this command multiple times
99 to indicate that multiple certifiers are trusted.  You may also
100 specify a filename instead of a key ID, as long as the file contains a
101 single OpenPGP public key.  Certifiers can be removed with the
102 \fBremove\-id\-certifier\fP command, and listed with the
103 \fBlist\-id\-certifiers\fP command.
104
105 Remote users will then be granted access to a local account based on
106 the appropriately-signed and valid keys associated with user IDs
107 listed in that account's authorized_user_ids file.  By default, the
108 authorized_user_ids file for an account is
109 ~/.monkeysphere/authorized_user_ids.  This can be changed in the
110 monkeysphere\-authentication.conf file.
111
112 The \fBupdate\-users\fP command can then be used to generate
113 authorized_keys file for local accounts based on the authorized user
114 IDs listed in the account's authorized_user_ids file:
115
116 $ monkeysphere\-authentication update\-users USER
117
118 Not specifying USER will cause all accounts on the system to updated.
119 sshd can then use these monkeysphere generated authorized_keys files
120 to grant access to user accounts for remote users.  You must also tell
121 sshd to look at the monkeysphere-generated authorized_keys file for
122 user authentication by setting the following in the sshd_config:
123
124 AuthorizedKeysFile /var/lib/monkeysphere/authentication/authorized_keys/%u
125
126 It is recommended to add "monkeysphere\-authentication update-users"
127 to a system crontab, so that user keys are kept up-to-date, and key
128 revocations and expirations can be processed in a timely manner.
129
130 .SH ENVIRONMENT
131
132 The following environment variables will override those specified in
133 the config file (defaults in parentheses):
134 .TP
135 MONKEYSPHERE_MONKEYSPHERE_USER
136 User to control authentication keychain. (monkeysphere)
137 .TP
138 MONKEYSPHERE_LOG_LEVEL
139 Set the log level.  Can be SILENT, ERROR, INFO, VERBOSE, DEBUG, in
140 increasing order of verbosity. (INFO)
141 .TP
142 MONKEYSPHERE_KEYSERVER
143 OpenPGP keyserver to use. (pool.sks\-keyservers.net)
144 .TP
145 MONKEYSPHERE_AUTHORIZED_USER_IDS
146 Path to user's authorized_user_ids file. %h gets replaced with the
147 user's homedir, %u with the username.
148 (%h/.monkeysphere/authorized_user_ids)
149 .TP
150 MONKEYSPHERE_RAW_AUTHORIZED_KEYS
151 Path to regular ssh-style authorized_keys file to append to
152 monkeysphere-generated authorized_keys.  `none' means not to add any
153 raw authorized_keys file.  %h gets replaced with the user's homedir,
154 %u with the username. (%h/.ssh/authorized_keys)
155 .TP
156 MONKEYSPHERE_PROMPT
157 If set to `false', never prompt the user for confirmation. (true)
158
159
160 .SH FILES
161
162 .TP
163 /etc/monkeysphere/monkeysphere\-authentication.conf
164 System monkeysphere-authentication config file.
165 .TP
166 /var/lib/monkeysphere/authorized_keys/USER
167 Monkeysphere-generated user authorized_keys files.
168
169 .SH AUTHOR
170
171 Written by:
172 Jameson Rollins <jrollins@fifthhorseman.net>,
173 Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
174 Matthew Goins <mjgoins@openflows.com>
175
176 .SH SEE ALSO
177
178 .BR monkeysphere (1),
179 .BR monkeysphere\-host (8),
180 .BR monkeysphere (7),
181 .BR gpg (1),
182 .BR ssh (1),
183 .BR sshd (8)