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