dfa74445347e3ea975f23f59252f19643427dc01
[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 and managing SSH user authentication through
20 the WoT.
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 in preparation for Monkeysphere user authentication.
73 This command is idempotent and run automatically by the other
74 commands, and should therefore not usually need to be run manually.
75 `s' may be used in 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 (i.e. multiple gpg arguments need to be quoted all together).  Use
85 this command with caution, as modifying the authentication sphere
86 keyring can affect ssh 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 be granted access to local accounts based on the
107 appropriately-signed and valid keys associated with user IDs listed in
108 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 is used to generate authorized_keys
114 files for local accounts based on the authorized user IDs listed in
115 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 The ssh server can then use these monkeysphere\-generated
121 authorized_keys files to grant access to user accounts for remote
122 users.  In order for sshd to look at the monkeysphere\-generated
123 authorized_keys file for user authentication, the AuthorizedKeysFile
124 parameter must be set in the sshd_config to point to the
125 monkeysphere\-generated authorized_keys files:
126
127 AuthorizedKeysFile /var/lib/monkeysphere/authentication/authorized_keys/%u
128
129 It is recommended to add "monkeysphere\-authentication update-users"
130 to a system crontab, so that user keys are kept up-to-date, and key
131 revocations and expirations can be processed in a timely manner.
132
133 .SH ENVIRONMENT
134
135 The following environment variables will override those specified in
136 the config file (defaults in parentheses):
137 .TP
138 MONKEYSPHERE_MONKEYSPHERE_USER
139 User to control authentication keychain. (monkeysphere)
140 .TP
141 MONKEYSPHERE_LOG_LEVEL
142 Set the log level.  Can be SILENT, ERROR, INFO, VERBOSE, DEBUG, in
143 increasing order of verbosity. (INFO)
144 .TP
145 MONKEYSPHERE_KEYSERVER
146 OpenPGP keyserver to use. (pool.sks\-keyservers.net)
147 .TP
148 MONKEYSPHERE_AUTHORIZED_USER_IDS
149 Path to user's authorized_user_ids file. %h gets replaced with the
150 user's homedir, %u with the username.
151 (%h/.monkeysphere/authorized_user_ids)
152 .TP
153 MONKEYSPHERE_RAW_AUTHORIZED_KEYS
154 Path to regular ssh-style authorized_keys file to append to
155 monkeysphere-generated authorized_keys.  `none' means not to add any
156 raw authorized_keys file.  %h gets replaced with the user's homedir,
157 %u with the username. (%h/.ssh/authorized_keys)
158 .TP
159 MONKEYSPHERE_PROMPT
160 If set to `false', never prompt the user for confirmation. (true)
161
162 .SH FILES
163
164 .TP
165 /etc/monkeysphere/monkeysphere\-authentication.conf
166 System monkeysphere-authentication config file.
167 .TP
168 /var/lib/monkeysphere/authorized_keys/USER
169 Monkeysphere-generated user authorized_keys files.
170
171 .SH AUTHOR
172
173 Written by:
174 Jameson Rollins <jrollins@fifthhorseman.net>,
175 Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
176 Matthew Goins <mjgoins@openflows.com>
177
178 .SH SEE ALSO
179
180 .BR monkeysphere (1),
181 .BR monkeysphere\-host (8),
182 .BR monkeysphere (7),
183 .BR gpg (1),
184 .BR ssh (1),
185 .BR sshd (8)