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