fix ma so that the setup command is folded into the other commands, so
[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
41 Instruct system to trust user identity certifications made by KEYID.
42 Using the `-n' or `--domain' option allows you to indicate that you
43 only trust the given KEYID to make identifications within a specific
44 domain (e.g. "trust KEYID to certify user identities within the
45 @example.org domain").  A certifier trust level can be specified with
46 the `-t' or `--trust' option (possible values are `marginal' and
47 `full' (default is `full')).  A certifier trust depth can be specified
48 with the `-d' or `--depth' option (default is 1).  `c+' may be used in
49 place of `add-id-certifier'.
50 .TP
51 .B remove-id-certifier KEYID
52 Instruct system to ignore user identity certifications made by KEYID.
53 `c-' may be used in place of `remove-id-certifier'.
54 .TP
55 .B list-id-certifiers
56 List key IDs trusted by the system to certify user identities.  `c'
57 may be used in place of `list-id-certifiers'.
58 .TP
59 .B help
60 Output a brief usage summary.  `h' or `?' may be used in place of
61 `help'.
62 .TP
63 .B version
64 show version number
65
66 Other commands:
67 .TP
68 .B setup
69 Setup the server for Monkeysphere user authentication.  This command
70 is idempotent and run automatically by the other commands, and should
71 therefore not usually need to be run manually.  `s' may be used in
72 place of `setup'.
73 .TP
74 .B diagnostics
75 Review the state of the server with respect to authentication.  `d'
76 may be used in place of `diagnostics'.
77 .TP
78 .B gpg-cmd
79 Execute a gpg command, as the monkeysphere user, on the monkeysphere
80 authentication "sphere" keyring.  This takes a single argument
81 (multiple gpg arguments need to be quoted).  Use this command with
82 caution, as modifying the authentication sphere keyring can affect ssh
83 user authentication.
84
85 .SH SETUP USER AUTHENTICATION
86
87 If the server will handle user authentication through
88 monkeysphere-generated authorized_keys files, the server must be told
89 which keys will act as identity certifiers.  This is done with the
90 \fBadd-id-certifier\fP command:
91
92 $ monkeysphere-authentication add-id-certifier KEYID
93
94 where KEYID is the key ID of the server admin, or whoever's
95 certifications should be acceptable to the system for the purposes of
96 authenticating remote users.  You can run this command multiple times
97 to indicate that multiple certifiers are trusted.  You may also
98 specify a filename instead of a key ID, as long as the file contains a
99 single OpenPGP public key.  Certifiers can be removed with the
100 \fBremove-id-certifier\fP command, and listed with the
101 \fBlist-id-certifiers\fP command.
102
103 Remote users will then be granted access to a local account based on
104 the appropriately-signed and valid keys associated with user IDs
105 listed in that account's authorized_user_ids file.  By default, the
106 authorized_user_ids file for an account is
107 ~/.monkeysphere/authorized_user_ids.  This can be changed in the
108 monkeysphere-authentication.conf file.
109
110 The \fBupdate-users\fP command can then be used to generate
111 authorized_keys file for local accounts based on the authorized user
112 IDs listed in the account's authorized_user_ids file:
113
114 $ monkeysphere-authentication update-users USER
115
116 Not specifying USER will cause all accounts on the system to updated.
117 sshd can then use these monkeysphere generated authorized_keys files
118 to grant access to user accounts for remote users.  You must also tell
119 sshd to look at the monkeysphere-generated authorized_keys file for
120 user authentication by setting the following in the sshd_config:
121
122 AuthorizedKeysFile /var/lib/monkeysphere/authentication/authorized_keys/%u
123
124 It is recommended to add "monkeysphere-authentication update-users" to a
125 system crontab, so that user keys are kept up-to-date, and key
126 revocations and expirations can be processed in a timely manner.
127
128 .SH ENVIRONMENT
129
130 The following environment variables will override those specified in
131 the config file (defaults in parentheses):
132 .TP
133 MONKEYSPHERE_MONKEYSPHERE_USER
134 User to control authentication keychain (monkeysphere).
135 .TP
136 MONKEYSPHERE_LOG_LEVEL
137 Set the log level (INFO).  Can be SILENT, ERROR, INFO, VERBOSE, DEBUG, in
138 increasing order of verbosity.
139 .TP
140 MONKEYSPHERE_KEYSERVER
141 OpenPGP keyserver to use (pool.sks-keyservers.net).
142 .TP
143 MONKEYSPHERE_AUTHORIZED_USER_IDS
144 Path to user authorized_user_ids file
145 (%h/.monkeysphere/authorized_user_ids).
146 .TP
147 MONKEYSPHERE_RAW_AUTHORIZED_KEYS
148 Path to user-controlled authorized_keys file.  `-' means not to add
149 user-controlled file (%h/.ssh/authorized_keys).
150
151 .SH FILES
152
153 .TP
154 /etc/monkeysphere/monkeysphere-authentication.conf
155 System monkeysphere-authentication config file.
156 .TP
157 /var/lib/monkeysphere/authentication/authorized_keys/USER
158 Monkeysphere-generated user authorized_keys files.
159
160 .SH AUTHOR
161
162 Written by:
163 Jameson Rollins <jrollins@fifthhorseman.net>,
164 Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
165 Matthew Goins <mjgoins@openflows.com>
166
167 .SH SEE ALSO
168
169 .BR monkeysphere (1),
170 .BR monkeysphere-host (8),
171 .BR monkeysphere (7),
172 .BR gpg (1),
173 .BR ssh (1)